login
Header Space

 
 

how to access kernel command line

April 18, 2008 - 8:48pm
Submitted by Anonymous on April 18, 2008 - 8:48pm.
Linux

What is the recommended way to access the Linux command line from a kernel module? I need to pass some info from the bootloader to my module. I see that /proc/cmdline (proc_misc.c) includes and accesses "saved_command_line" directly but when I try the same I get

Unknown symbol saved_command_line

That makes sense since I don't see that symbol exported for my architecture but I don't see how /proc/cmdline is able to see it.


linux$ grep -r 'EXPORT_SYMBOL(saved_command_line)' *
arch/sparc/kernel/sparc_ksyms.c:EXPORT_SYMBOL(saved_command_line);
arch/sparc64/kernel/sparc64_ksyms.c:EXPORT_SYMBOL(saved_command_line);

just declare parameters

April 19, 2008 - 1:19am

just declare parameters for your module, no need to reinvent anything

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary