[parted-devel] Machine Parseable Output

Anant Narayanan anant at kix.in
Sat Dec 2 20:05:55 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

I just made a commit to master that adds the '-m' option for machine
parseable output. This should make it easier for scripts to quickly
extract disk information. The option only works for the 'print' family
of commands.

Here's a brief description of the output format:

- - All lines end with a semicolon (;)
- - The first line indicates the units in which the output is expressed.
CHS, CYL and BYT stands for CHS, Cylinder and Bytes respectively.
- - The second line is made of disk information in the following format:

"path":"size":"transport-type":"logical-sector-size":"physical-sector-size":"partition-table-type":"model-name";

- - If the first line was either CYL or CHS, the next line will contain
information on no. of cylinders, heads, sectors and cylinder size.
- - Partition information begins from the next line. This is of the format:

(for BYT)
"number":"begin":"end":"size":"filesystem-type":"partition-name":"flags-set";

(for CHS/CYL)
"number":"begin":"end":"filesystem-type":"partition-name":"flags-set";

Your comments on the system will be appreciated. Also, any suggestions
on which other commands we would like such output would be helpful.

The commit also removes the '-i' flag, if you think we need it; feel
free to revert that part.

Cheers,
Anant
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFcc6TTon3xA72kU4RAnBPAJ9NaVqIveuQQToaF9z1tedXN2pvnwCdGDtO
DY5xT3o4vWzTRUynBg6Ce5Q=
=41cM
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list