grehan-freebsd / grub2-bhyve

GNU General Public License v3.0
51 stars 21 forks source link

grub-bhyve: "VM" argument not described in usage; no useful error printed #1

Closed cemeyer closed 9 years ago

cemeyer commented 9 years ago

If you failed to supply the "VM" (vm name) argument, grub-bhyve unhelpfully dumps --help and exits. Help output just shows:

Usage: grub-bhyve [OPTION...]

And --usage doesn't show the vm name being required either:

Usage: grub-bhyve [-nv?V] [-d DIR] [-H[SECS]] [-m FILE] [-M MBYTES]
            [-r DEVICE_NAME] [--directory=DIR] [--hold[=SECS]]
            [--device-map=FILE] [--memory=MBYTES] [--ncons]
            [--root=DEVICE_NAME] [--verbose] [--help] [--usage] [--version]

Please:

  1. Add a useful error message if the parameter is missing, and
  2. Document the parameter in --help / --usage.

Thanks.

grehan-freebsd commented 9 years ago

Thanks for the report. I'll get to it this week, and might throw in a few more items in cmd-line parsing (e.g. humanize_number for the mem size to match bhyve).

grehan-freebsd commented 9 years ago

Fixed somewhat with e67fd51d6559bbba80d30ed0ce90dcddec0f0012 gnulib argp doesn't seem to provide an easy way of documenting required parameters.

cemeyer commented 9 years ago

Thanks.