mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: July 17 2007,01:43 |
|
I don't want to be a pain, but I think there might be a bug (sort of) in this very same function.
Here's what I assume is the intended behavior of the function: If you have a boot option foo=bar, you use getbootparam("foo=") and it will return "bar". If you have the boot option "foo", you use getbootparam("foo") and it will return foo. Maybe I'm wrong about this second one, but it seems to (sort of) work this way.
However, depending on how you have written your boot line, it may not return what you expect. If you have a boot option "foobar=bar" or "bar=foo" or "foobar", and you use getbootparam("foo"), it will return "foo".
Of course the more I think about it, the more I wonder if it is actually not intended to be used without "=" as part of the function parameter. In that case, I apologize for bringing this up. If it wasn't intended to be used this way, I think it *could* possibly be fixed to do so, and then you could use the same function to grab either "foo" or "foo=bar" type of boot parameters.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|