diff --git a/align/scan.c b/align/scan.c index 5f1d98a22..e7327eab1 100644 --- a/align/scan.c +++ b/align/scan.c @@ -87,6 +87,7 @@ usage (int status) " --help Display brief help\n" " -P nr_threads Use at most nr_threads\n" " -q|--quiet No output, just exit code\n" + " --uuid Print UUIDs instead of names\n" " -v|--verbose Verbose messages\n" " -V|--version Display version and exit\n" " -x Trace libguestfs API calls\n" diff --git a/df/main.c b/df/main.c index e04b14e49..23cdaeef0 100644 --- a/df/main.c +++ b/df/main.c @@ -78,12 +78,12 @@ usage (int status) " --csv Output as Comma-Separated Values\n" " -d|--domain guest Add disks from libvirt guest\n" " --format[=raw|..] Force disk format for -a option\n" - " -h|--human-readable Human-readable sizes in --long output\n" + " -h|--human-readable Print sizes in human-readable format\n" " --help Display brief help\n" " -i|--inodes Display inodes\n" " --one-per-guest Separate appliance per guest\n" " -P nr_threads Use at most nr_threads\n" - " --uuid Add UUIDs to --long output\n" + " --uuid Print UUIDs instead of names\n" " -v|--verbose Verbose messages\n" " -V|--version Display version and exit\n" " -x Trace libguestfs API calls\n" diff --git a/edit/edit.c b/edit/edit.c index 2d3ccc61f..eb9dfbd4c 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -70,20 +70,20 @@ usage (int status) " %s [--options] -d domname file [file ...]\n" " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n" "Options:\n" - " -a|--add image Add image\n" - " -b|--backup .ext Backup original as original.ext\n" - " -c|--connect uri Specify libvirt URI for -d option\n" - " -d|--domain guest Add disks from libvirt guest\n" - " --echo-keys Don't turn off echo for passphrases\n" - " -e|--expr expr Non-interactive editing using Perl expr\n" - " --format[=raw|..] Force disk format for -a option\n" - " --help Display brief help\n" - " --keys-from-stdin Read passphrases from stdin\n" + " -a|--add image Add image\n" + " -b|--backup .ext Backup original as original.ext\n" + " -c|--connect uri Specify libvirt URI for -d option\n" + " -d|--domain guest Add disks from libvirt guest\n" + " --echo-keys Don't turn off echo for passphrases\n" + " -e|--edit|--expr expr Non-interactive editing using Perl expr\n" + " --format[=raw|..] Force disk format for -a option\n" + " --help Display brief help\n" + " --keys-from-stdin Read passphrases from stdin\n" " -m|--mount dev[:mnt[:opts[:fstype]]]\n" - " Mount dev on mnt (if omitted, /)\n" - " -v|--verbose Verbose messages\n" - " -V|--version Display version and exit\n" - " -x Trace libguestfs API calls\n" + " Mount dev on mnt (if omitted, /)\n" + " -v|--verbose Verbose messages\n" + " -V|--version Display version and exit\n" + " -x Trace libguestfs API calls\n" "For more information, see the manpage %s(1).\n"), guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name); diff --git a/fish/fish.c b/fish/fish.c index e639d3d17..d2cf359dd 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -126,6 +126,7 @@ usage (int status) " --echo-keys Don't turn off echo for passphrases\n" " -f|--file file Read commands from file\n" " --format[=raw|..] Force disk format for -a option\n" + " --help Display brief help\n" " -i|--inspector Automatically mount filesystems\n" " --keys-from-stdin Read passphrases from stdin\n" " --listen Listen for remote commands\n" diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c index 42e7e8273..8ece991e9 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -82,16 +82,16 @@ usage (int status) " %s [--options] input.tar.gz output.img\n" " %s [--options] directory output.img\n" "Options:\n" - " --floppy Make a virtual floppy disk\n" - " --format=raw|qcow2|.. Set output format\n" - " --help Display brief help\n" - " --label=label Filesystem label\n" - " --partition=mbr|gpt|.. Set partition type\n" - " --size=size|+size Set size of output disk\n" - " --type=ext4|.. Set filesystem type\n" - " -v|--verbose Verbose messages\n" - " -V|--version Display version and exit\n" - " -x Trace libguestfs API calls\n" + " --floppy Make a virtual floppy disk\n" + " -F|--format=raw|qcow2|.. Set output format\n" + " --help Display brief help\n" + " --label=label Filesystem label\n" + " --partition=mbr|gpt|.. Set partition type\n" + " -s|--size=size|+size Set size of output disk\n" + " -t|--type=ext4|.. Set filesystem type\n" + " -v|--verbose Verbose messages\n" + " -V|--version Display version and exit\n" + " -x Trace libguestfs API calls\n" "For more information, see the manpage %s(1).\n"), guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name, diff --git a/p2v/main.c b/p2v/main.c index 6d6f55504..35f0b59ae 100644 --- a/p2v/main.c +++ b/p2v/main.c @@ -86,7 +86,7 @@ usage (int status) "Options:\n" " --help Display brief help\n" " --cmdline=CMDLINE Used to debug command line parsing\n" - " --colours Use ANSI colour sequences even if not tty\n" + " --colors|--colours Use ANSI colour sequences even if not tty\n" " --iso Running in the ISO environment\n" " --test-disk=DISK.IMG For testing, use disk as /dev/sda\n" " -v|--verbose Verbose messages\n" diff --git a/podcheck.pl b/podcheck.pl index fca91fbd6..527a2e47d 100755 --- a/podcheck.pl +++ b/podcheck.pl @@ -153,6 +153,17 @@ delete $tool_option_exists{"--color"}; delete $tool_option_exists{"--colour"}; delete $tool_option_exists{"--debug-gc"}; +# Run the tool with --help. +my $help_content; +open PIPE, "LANG=C $tool --help |" + or die "$progname: $tool --help: $!"; +{ + local $/ = undef; + $help_content = ; +} +close PIPE; + +# Do the tests. my $errors = 0; # Check each option exists in the manual. @@ -184,9 +195,43 @@ foreach (sort keys %pod_options) { } } +# Check the tool's --help output mentions all the options. (For OCaml +# tools this is a waste of time since the --help output is generated, +# but for C tools it is a genuine test). +my $help_options_checked = 0; + +my %help_options = (); +$help_options{$_} = 1 foreach ( $help_content =~ /(? 0; -printf "$progname: $tool: checked $tool_options_checked tool options against $pod_options_checked documented options\n"; +printf "$progname: $tool: checked $tool_options_checked tool options, $pod_options_checked documented options, $help_options_checked help options\n"; exit 0;