Bug 243400 - add json output to diskinfo(8)
Summary: add json output to diskinfo(8)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-01-16 21:28 UTC by harrison
Modified: 2020-01-16 21:50 UTC (History)
1 user (show)

See Also:


Attachments
diff from head to provide json output (14.26 KB, patch)
2020-01-16 21:28 UTC, harrison
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description harrison 2020-01-16 21:28:46 UTC
Created attachment 210803 [details]
diff from head to provide json output

it would be nice to have the option to have diskinfo output json in addition to the correct text output.
Comment 1 Conrad Meyer freebsd_committer 2020-01-16 21:50:22 UTC
Usually this kind of thing is done with libxo -- rather than open-coding json, the program creates some structured output stream and the user can invoke the program and elect an output format (json, xml, etc).  I'm not an advocate for libxo (I think it's terrible) but if you want json from this binary, that seems to be the prevailing pattern.