Finishing up the libxo conversion of geom by switching err(3) to their libxo equivalents.
While here, fix some style(9) issues. There are still a few left, but at least they're fewer now.
MFC: 2w
Differential D54938
geom: Convert err/warn() to xo_err/warn() and style(9) fixes Authored by js on Jan 29 2026, 9:15 AM. Tags None Referenced Files
Details Finishing up the libxo conversion of geom by switching err(3) to their libxo equivalents. While here, fix some style(9) issues. There are still a few left, but at least they're fewer now. MFC: 2w Somewhat tested by running some invalid commands like geom disk doesnotexist, using invalid flags to valid commands, geom union status without loading gunion and so on. I have not tested every single error, but I'm confident they will work.
Diff Detail
Event TimelineComment Actions It looks good to me. And I see that with --libxo=json, these errors append a {}. Are there any other cases where they do something differently than err? Comment Actions Not that I'm aware of. As for the brackets, I don't know why libxo does that. At first I thought it was because I had opened a container too early somewhere. But I get these brackets with geom --libxo:J -t -p union
geom: At most one of -P and -t may be specified.
{ }that error comes from row 845 in main(). There are no open containers (or lists (or instances)) at this point. The only libxo related function calls we've done this far is xo_parse_args() and xo_set_version(). @phil Have I done something wrong or are the brackets intended? |