XyrisOS/xyris

Kernel Argument Parser

Closed this issue · 2 comments

Stivale2 and Multiboot2 both allow command line arguments to be passed to the kernel. We should devise a system where callbacks can be registered to an argument parser. This will help areas like controlling debug output levels as well as enabling or disabling features.

The one problem with a callback system is that there's no good way to store the callbacks along with their associated flag strings. We could do something like a fixed array of Argument class instances (where an Argument contains the callback pointer and matching string), but that limits us in how many arguments can be accepted, which might be a fair tradeoff.

If we were to impose a limit, what is acceptable? 32? 64? 128?

Going to go with a static array. Going to open an issue for a dictionary class, because that would be nice.