freebsd-dev/cmd/zpool
наб 61b50107a5
libzutil: zfs_isnumber(): return false if input empty
zpool list, which is the only user, would mistakenly try to parse the
empty string as the interval in this case:

  $ zpool list "a"
  cannot open 'a': no such pool
  $ zpool list ""
  interval cannot be zero
  usage: <usage string follows>
which is now symmetric with zpool get:
  $ zpool list ""
  cannot open '': name must begin with a letter

Avoid breaking the  "interval cannot be zero" string.
There simply isn't a need for this, and it's user-facing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11841 
Closes #11843
2021-04-06 12:25:53 -07:00
..
compatibility.d Add compatibility file sets (ZoL 0.6.1, 0.6.4, OpenZFS 2.1) 2021-03-31 09:40:25 -07:00
os Removed duplicated includes 2021-03-22 12:34:58 -07:00
zpool.d Style fixes 2020-06-27 17:38:55 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Add compatibility file sets (ZoL 0.6.1, 0.6.4, OpenZFS 2.1) 2021-03-31 09:40:25 -07:00
zpool_iter.c zpool: correctly align columns with -p 2020-11-16 09:26:20 -08:00
zpool_main.c libzutil: zfs_isnumber(): return false if input empty 2021-04-06 12:25:53 -07:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h zpool: correctly align columns with -p 2020-11-16 09:26:20 -08:00
zpool_vdev.c Fix various typos 2021-04-02 18:52:15 -07:00