Page MenuHomeFreeBSD

Rework logpage extensibility.
ClosedPublic

Authored by imp on Feb 20 2019, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 4:20 PM
Unknown Object (File)
Oct 17 2024, 2:13 AM
Unknown Object (File)
Oct 14 2024, 9:15 PM
Unknown Object (File)
Sep 24 2024, 8:12 AM
Unknown Object (File)
Sep 22 2024, 10:27 PM
Unknown Object (File)
Sep 20 2024, 12:38 AM
Unknown Object (File)
Sep 11 2024, 9:01 AM
Unknown Object (File)
Sep 2 2024, 7:37 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.