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)
Sat, Dec 21, 12:44 AM
Unknown Object (File)
Wed, Dec 4, 11:33 PM
Unknown Object (File)
Nov 22 2024, 10:24 AM
Unknown Object (File)
Oct 30 2024, 7:56 PM
Unknown Object (File)
Sep 29 2024, 11:25 PM
Unknown Object (File)
Sep 27 2024, 4:16 AM
Unknown Object (File)
Sep 26 2024, 10:02 PM
Unknown Object (File)
Sep 26 2024, 5:59 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.