]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r295844:
authordim <dim@FreeBSD.org>
Mon, 7 Mar 2016 07:46:17 +0000 (07:46 +0000)
committerdim <dim@FreeBSD.org>
Mon, 7 Mar 2016 07:46:17 +0000 (07:46 +0000)
commit04c8b89217e2f85c7715441cd76296f9795dff3b
tree26df5df7711a755d89f3cb5d550e94757a05f933
parenta0a9dc5d39bce93901950e25e91887b10edd6402
MFC r295844:

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
Differential Revision: https://reviews.freebsd.org/D5365
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
cddl/contrib/opensolaris/cmd/zpool/zpool_main.c