]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).
authordim <dim@FreeBSD.org>
Sun, 21 Feb 2016 13:03:58 +0000 (13:03 +0000)
committerdim <dim@FreeBSD.org>
Sun, 21 Feb 2016 13:03:58 +0000 (13:03 +0000)
commit579b7ad49fdbcb4dd1e016603c5d0774b32c12d1
treef95ee84acdd587171cdb74c424bce73bb337a1a2
parentb01ee87c2b5517e378371d46e9b635dab4fa15a5
Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).

Currently, zfs(8) and zpool(8) print "invalid type '(null)'" or similar
messages, if you pass in invalid types, sources or column names for "zfs
get", "zfs list" and "zpool get".  This is because the commands use
getsubopt(3), and in case of failure, they print 'value', which is NULL
when sub options don't match.

They should print 'suboptarg' instead, which is the documented way to
get at the non-matching sub option value.

Reviewed by: smh
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D5365
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c