XyrisOS / xyris

The Xyris Kernel
https://xyr.is
MIT License
154 stars 11 forks source link

Kernel Argument Parser #290

Closed Kfeavel closed 3 years ago

Kfeavel commented 3 years ago

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.

Kfeavel commented 3 years ago

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?

Kfeavel commented 3 years ago

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