Page MenuHomeFreeBSD

geom: more libxo fixes
Needs ReviewPublic

Authored by guest-jsollvander on Fri, Oct 24, 7:53 AM.
Tags
None
Referenced Files
F133401257: D53313.diff
Sat, Oct 25, 12:46 PM
F133295177: D53313.id.diff
Fri, Oct 24, 5:32 PM
F133287936: D53313.diff
Fri, Oct 24, 3:57 PM
Unknown Object (File)
Fri, Oct 24, 12:45 PM
Unknown Object (File)
Fri, Oct 24, 11:42 AM
Unknown Object (File)
Fri, Oct 24, 10:51 AM
Subscribers

Details

Reviewers
phil
mckusick
Summary

After https://reviews.freebsd.org/D37615 was merged I received a some feedback on how to better use libxo from Phil, which can be found in https://reviews.freebsd.org/D53110. This PR addresses some of it, like tags should be lowercase, but it does not remove all nested containers/lists and replace them with {k:} or {l:} where it should be possible, as I thought that made the JSON/XML output look wrong from how I wanted it to look. I also renamed a few containers so that the JSON/XML output says "DISK" or "MULTIPATH" (depending on class) instead of a generic "Geom", which I thought was a nice touch, and it makes the --libxo:XP output resemble kern.geom.confxml some more.

Added some conditional checks to handle null derefs that appeared on some places.

As I was working on the above I noticed that the previous patches "broke" geom <class> status -s (script mode), the normal output was looking slightly off from how it used to, so I fixed that. And I also noticed that the JSON/XML outputted data looked different from when you used the flag vs if you didn't. This is now also fixed. Lastly, I added {t:} to trim extra whitespaces that sometimes appeared in the value fields of JSON/XML output.

Test Plan

Output looks good
No tests fail

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped