]> granicus.if.org Git - zfs/commit
Fix zpool subcommands error message with some unsupported options
authorloli10K <loli10K@users.noreply.github.com>
Wed, 4 Sep 2019 20:36:25 +0000 (22:36 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 4 Sep 2019 20:36:25 +0000 (13:36 -0700)
commitd02186ee2b0570069cfbb0d08d5c52752648f388
treef6b31f94a82e160fdb8d6bffa4d6a0a6b528029c
parenta49dbbbe06c6c0d0c401530c756c0c056d49fbb7
Fix zpool subcommands error message with some unsupported options

Both 'detach' and 'online' zpool subcommands, when provided with an
unsupported option, forget to print it in the error message:

   # zpool online -t rpool vda3
   invalid option ''
   usage:
      online [-e] <pool> <device> ...

This changes fixes the error message in order to include the actual
option that is not supported.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #9270
cmd/zpool/zpool_main.c