[parted-devel] "print all" commmand
Håkon Løvdal
hlovdal at gmail.com
Tue Jun 20 02:42:02 UTC 2006
On 19/06/06, leslie.polzer at gmx.net <leslie.polzer at gmx.net> wrote:
> The "print all" command, our "fdisk -l" equivalent, unfortunately does
> not work as intended, because the script mode of parted demands a device
> name as first command.
>
> There are two possible ways to remedy this problem:
>
> a) introduce a command-line parameter (which one?).
>
> b) add a branch to detect the "print" instead of a device.
>
> Which one do you like better?
I think option b) will turn out be very complex to get right, because
if "parted print all" is supposed to work then all vairants of
"parted unit s print all" ought to work as well.
In my oppinion the best solution will be to use a non-device
indicator as device name. This could be a special magic file
name keyword like "any", "none", "autodetect" or similar but
I suggest using the empty string ("") as an indication of
no specific device selected. I think this should be relatively
easy to understand (and it will not be very different from the
tradition of using "-" to mean standard input).
This way the no new command line options are needed.
The following commands would then work exactly like
today if I specify /dev/hda instead of the empty string
parted "" print all
parted "" unit s print all
parted "" version
parted "" print all unit s version select /dev/hdb print
BR Håkon Løvdal
More information about the parted-devel
mailing list