Page MenuHomeFreeBSD

Fix invalid type '(null)' usage messages in zfs(8) and zpool(8)
ClosedPublic

Authored by dim on Feb 20 2016, 5:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 9 2024, 3:02 AM
Unknown Object (File)
Dec 28 2023, 7:26 AM
Unknown Object (File)
Dec 28 2023, 7:26 AM
Unknown Object (File)
Dec 24 2023, 10:41 PM
Unknown Object (File)
Dec 20 2023, 12:07 AM
Unknown Object (File)
Nov 2 2023, 6:02 AM
Unknown Object (File)
Aug 11 2023, 11:54 AM
Unknown Object (File)
Aug 11 2023, 11:53 AM
Subscribers

Details

Summary

Currently, zfs(8) and zpool(8) print (null) 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.

I'm unsure whether this should be sent upstream, as I don't know whether
OpenSolaris or IllumOS have the suboptarg variable.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim retitled this revision from to Fix invalid type '(null)' usage messages in zfs(8) and zpool(8).
dim updated this object.
dim edited the test plan for this revision. (Show Details)
dim added reviewers: delphij, mav, smh.
smh edited edge metadata.

We should get this up-streamed.

This revision is now accepted and ready to land.Feb 20 2016, 7:40 PM
This revision was automatically updated to reflect the committed changes.