Difference between kernel_param and obs_kernel_param

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I was looking at code that is used to parse the kernel comand line. I
found the __setup() macro, and that it uses the obs_kernel_param
struct.
What i understand is that if i need to pass an additional argument say
foo, like foo=...

then i do:

int bar(char *str)
{
...
...
}

__setup("foo=", bar);


Now, in init/main.c, the kernel calls parse_args(...). This however
calls parse_one(...) in kernel/params.c. It handles all the params and
then if it does not get a match calls unknown_bootoption() which calls
obs_checksetup() which handles the __setup() cases.

My question is this: what is the difference between these two
"conventions"? And how can i "register" using the new format?

TIA
rahul

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux