Re: obtaining linux kernel command line from a module

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

 



On 21 May 2010, at 12:08 PM, Jason Nymble wrote:

> 
> On 21 May 2010, at 12:07 PM, Jason Nymble wrote:
> 
>> Is there a way (e.g. exported variable or kernel API) for a kernel module to obtain the linux kernel command line? i.e. the contents as seen from userspace by 'cat /proc/cmdline'
> 
> I see linux/init.h has:
> extern char __initdata boot_command_line[];
> 
> Will try that...

Does not work, neither does saved_command_line, presumably because neither of them are exported (get "Unknown symbol in module" when loading the module)... linux/fs/proc/cmdline.c provides /proc/cmdline, and that just prints saved_command_line variable, but presumably it can use that variable since its not dynamically loaded kernel module.

Any bright ideas?


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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