Page MenuHomeFreeBSD

Rework logpage extensibility.
ClosedPublic

Authored by imp on Feb 20 2019, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 3:00 AM
Unknown Object (File)
Mar 4 2024, 9:52 AM
Unknown Object (File)
Jan 12 2024, 7:43 PM
Unknown Object (File)
Jan 8 2024, 8:11 PM
Unknown Object (File)
Dec 20 2023, 4:09 AM
Unknown Object (File)
Nov 22 2023, 3:49 AM
Unknown Object (File)
Oct 26 2023, 1:36 AM
Unknown Object (File)
Aug 25 2023, 7:49 AM
Subscribers
None

Details

Summary

Move from using a linker set to a constructor function that's
called. This simplifies the code and is slightly more obvious. We now
keep a list of page decoders rather than having an array we managed
before. Commands will move to something similar in the future.

Diff Detail

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

Event Timeline

I know the linkerset for commands is also ultimately my fault (I used it mfiutil and then mptutil and this looks like it was copied from there), but those should perhaps register in the same way. That is a bit harder because of the tree of lists though.

This revision is now accepted and ready to land.Feb 21 2019, 9:13 PM
In D19275#412819, @jhb wrote:

I know the linkerset for commands is also ultimately my fault (I used it mfiutil and then mptutil and this looks like it was copied from there), but those should perhaps register in the same way. That is a bit harder because of the tree of lists though.

I invented them independently for nvmecontrol.

I have another, somewhat more extensive patch in the works that does what you suggest. It also abstracts out the parsing so most code can just call the parser and it's all table driven. For commands with only a few options, this is about a wash. For commands with lots of options, this is a big win. I'm also adding a linux-compatible passthrough command, which has lots of options, and lots of long options. So that's in there too. Maybe we should make that thing I'm working on a private library and spread it around to the different FreeBSD utilities...

Thanks for the review.

This revision was automatically updated to reflect the committed changes.