Received: (at 19836) by debbugs.gnu.org; 12 Feb 2015 17:53:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 12 12:53:50 2015 Received: from localhost ([127.0.0.1]:40968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YLxxV-0006x6-Oc for submit <at> debbugs.gnu.org; Thu, 12 Feb 2015 12:53:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39393) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <bcl@HIDDEN>) id 1YLxxT-0006wx-8f for 19836 <at> debbugs.gnu.org; Thu, 12 Feb 2015 12:53:48 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1CHrjl6015372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Feb 2015 12:53:46 -0500 Received: from lister.brianlane.com ([10.3.113.8]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1CHriHT014849 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 12 Feb 2015 12:53:45 -0500 Date: Thu, 12 Feb 2015 09:53:44 -0800 From: "Brian C. Lane" <bcl@HIDDEN> To: Johan Oudinet <johan.oudinet@HIDDEN> Subject: Re: bug#19836: Missing partition type in machine parseable output Message-ID: <20150212175343.GA4613@HIDDEN> References: <54DB8406.7020702@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54DB8406.7020702@HIDDEN> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19836 Cc: 19836 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) On Wed, Feb 11, 2015 at 05:32:06PM +0100, Johan Oudinet wrote: > Hi, > > I'd like to use parted in a script to list primary and logical > partitions only (i.e., without extended partitions). > I do see the partition type if I use the following command: > # parted -s /dev/sdc print > Model: Generic STORAGE DEVICE (scsi) > Disk /dev/sdc: 3965MB > Sector size (logical/physical): 512B/512B > Partition Table: msdos > Disk Flags: > > Number Start End Size Type File system Flags > 1 4194kB 71,3MB 67,1MB primary fat16 boot, lba > 2 71,3MB 3965MB 3894MB extended lba > 5 75,5MB 344MB 268MB logical > 6 344MB 612MB 268MB logical > 7 612MB 621MB 8388kB logical ext4 > 8 621MB 3965MB 3344MB logical ext4 > > However, if I run the same command with the --machine option, I get the > following output: > # parted -sm /dev/sdc print > BYT; > /dev/sdc:3965MB:scsi:512:512:msdos:Generic STORAGE DEVICE:; > 1:4194kB:71,3MB:67,1MB:fat16::boot, lba; > 2:71,3MB:3965MB:3894MB:::lba; > 5:75,5MB:344MB:268MB:::; > 6:344MB:612MB:268MB:::; > 7:612MB:621MB:8388kB:ext4::; > 8:621MB:3965MB:3344MB:ext4::; > > where the partition type is missing. This is unfortunate :-\ Thanks for the report. You're correct, the machine output kinda sucks. We can fix it, but there are at least 2 issue I see: 1. confusion for existing machine output users (parted test cases for one). When we add a field everyone will have to adjust so we can't just toss it in there. 2. Different disklabels have different info. GPT doesn't have pri/etc. for example so the output there will either always be blank or different. It would make sense to hand off display of partition specific details to the disklabel, but that would also mean users of machine output would need to switch based on disklabel type in the first line. -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
bug-parted@HIDDEN
:bug#19836
; Package parted
.
Full text available.Received: (at submit) by debbugs.gnu.org; 11 Feb 2015 16:50:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 11 11:50:17 2015 Received: from localhost ([127.0.0.1]:40296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YLaUT-00024l-8K for submit <at> debbugs.gnu.org; Wed, 11 Feb 2015 11:50:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59855) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaDB-0001eG-W9 for submit <at> debbugs.gnu.org; Wed, 11 Feb 2015 11:32:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaD0-0006LN-Uf for submit <at> debbugs.gnu.org; Wed, 11 Feb 2015 11:32:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaD0-0006LI-RO for submit <at> debbugs.gnu.org; Wed, 11 Feb 2015 11:32:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaCz-0004Et-Lc for bug-parted@HIDDEN; Wed, 11 Feb 2015 11:32:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaCv-0006Ke-Jd for bug-parted@HIDDEN; Wed, 11 Feb 2015 11:32:13 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:65083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <johan.oudinet@HIDDEN>) id 1YLaCv-0006KI-8w for bug-parted@HIDDEN; Wed, 11 Feb 2015 11:32:09 -0500 Received: from [192.168.1.131] ([193.51.194.209]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0LhzeA-1Xq9Tw2p3y-00n9JL for <bug-parted@HIDDEN>; Wed, 11 Feb 2015 17:32:06 +0100 Message-ID: <54DB8406.7020702@HIDDEN> Date: Wed, 11 Feb 2015 17:32:06 +0100 From: Johan Oudinet <johan.oudinet@HIDDEN> Organization: Green Communications User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: bug-parted@HIDDEN Subject: Missing partition type in machine parseable output Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2tMG3Qml3RjmNNKRJ3dD0Oq2TELlt9PcW" X-Provags-ID: V03:K0:AGhzxRSTRlePCDoMUn3chvV2oDDvi9Dk3hAhxMm95YQuvv6gFwL 5VKvSGh5jKQkO/6t55YrfVrD0xoWNVoqVrrCFieDXGEoXDnoiNU3qOxDQaRkbDkiqOnhByM gUKDCGhASa6kOA1iO6NgK62MvQ1gwkEUho3bLgTYmPd4fBSq32jmekcaZzc9fWhI3yDS1BA oB3bgM5U7L66U+KP9ZOQA== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Feb 2015 11:50:16 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2tMG3Qml3RjmNNKRJ3dD0Oq2TELlt9PcW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I'd like to use parted in a script to list primary and logical partitions only (i.e., without extended partitions). I do see the partition type if I use the following command: # parted -s /dev/sdc print Model: Generic STORAGE DEVICE (scsi) Disk /dev/sdc: 3965MB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 4194kB 71,3MB 67,1MB primary fat16 boot, lba 2 71,3MB 3965MB 3894MB extended lba 5 75,5MB 344MB 268MB logical 6 344MB 612MB 268MB logical 7 612MB 621MB 8388kB logical ext4 8 621MB 3965MB 3344MB logical ext4 However, if I run the same command with the --machine option, I get the following output: # parted -sm /dev/sdc print BYT; /dev/sdc:3965MB:scsi:512:512:msdos:Generic STORAGE DEVICE:; 1:4194kB:71,3MB:67,1MB:fat16::boot, lba; 2:71,3MB:3965MB:3894MB:::lba; 5:75,5MB:344MB:268MB:::; 6:344MB:612MB:268MB:::; 7:612MB:621MB:8388kB:ext4::; 8:621MB:3965MB:3344MB:ext4::; where the partition type is missing. This is unfortunate :-\ $ parted --version parted (GNU parted) 3.2 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by <http://git.debian.org/?p=3Dparted/parted.git;a=3Dblob_plain;f=3DAUTHORS>= =2E Best regards, --=20 Johan Oudinet R&D Engineer - Green Communications johan.oudinet@HIDDEN --2tMG3Qml3RjmNNKRJ3dD0Oq2TELlt9PcW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU24QGAAoJEDzKzBvsE+7Uz3AH/2R8gwNvIcX5qe229HC+EP9Z OCrO9+PfYzBWoksd7wiM6KbuphYZmpFwbEzAdart1IZjSrhJYqcu5V499/7u6OZt cEbLEau/a1V7Xk7XNdfNrQnoXnVv5t/Tr+8Vnab762lSyo24GH0qzvt8oKuhrkXm /M1GtUynTZ9jJnYMkdYlTTAs2u5+2W+l5WMIhdXafmJq/mHiFhOitdr3YgSUeSAV U3gFgnTStqMWKBEozQM3kZv5Ecf/UgFSSMuiaEeTXPh8DqtScDLWT+z6hIGL5sI1 M+3kzn75jr1tOzhf+FsgObUQWSgJ5F/Z67ObeXeodbLpzRhZd4Akz+vXOfOoOM8= =d+px -----END PGP SIGNATURE----- --2tMG3Qml3RjmNNKRJ3dD0Oq2TELlt9PcW--
Johan Oudinet <johan.oudinet@HIDDEN>
:bug-parted@HIDDEN
.
Full text available.bug-parted@HIDDEN
:bug#19836
; Package parted
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.