From fa918b166acd6123623fd0d03b5f4840b1579a02 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 8 Sep 2010 09:37:22 +0100 Subject: [PATCH] fish: Allow guestfish -N help for listing prepared disk image help. --- fish/fish.c | 5 ++++- fish/guestfish.pod | 6 +++--- fish/prep.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 9696545..6433942 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -318,7 +318,10 @@ main (int argc, char *argv[]) break; case 'N': - if (STRCASEEQ (optarg, "list")) { + if (STRCASEEQ (optarg, "list") || + STRCASEEQ (optarg, "help") || + STRCASEEQ (optarg, "h") || + STRCASEEQ (optarg, "?")) { list_prepared_drives (); exit (EXIT_SUCCESS); } diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 3b9aa20..e715e6e 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -103,7 +103,7 @@ a single ext2-formatted partition: To list what is available do: - guestfish -N list | less + guestfish -N help | less =head2 Remote control @@ -225,7 +225,7 @@ or you can use the L program. Disable autosync. This is enabled by default. See the discussion of autosync in the L manpage. -=item B<-N type> | B<--new type> | B<-N list> +=item B<-N type> | B<--new type> | B<-N help> Prepare a fresh disk image formatted as "type". This is an alternative to the I<-a> option: whereas I<-a> adds an existing disk, @@ -717,7 +717,7 @@ for an ext4 filesystem on a 1GB disk instead. To list the available types and any extra parameters they take, run: - guestfish -N list | less + guestfish -N help | less Note that the prepared filesystem is not mounted. You would usually have to use the C command or add the diff --git a/fish/prep.c b/fish/prep.c index 369dd6d..59fa8a7 100644 --- a/fish/prep.c +++ b/fish/prep.c @@ -95,7 +95,7 @@ parse_type_string (const char *type_string) if (i == NR_PREPS) { fprintf (stderr, _("\ guestfish: -N parameter '%s': no such prepared disk image known.\n\ -Use 'guestfish -N list' to list possible values for the -N parameter.\n"), +Use 'guestfish -N help' to list possible values for the -N parameter.\n"), type_string); exit (EXIT_FAILURE); } -- 1.8.3.1