Way back in the day (like 6 year ago), I think there was some issue about sscanf() being okay to use in the kernel (as this function is exported to kernel code and does its own checking). Am I right? I may have shot from the hip on this one.
Printable View
Way back in the day (like 6 year ago), I think there was some issue about sscanf() being okay to use in the kernel (as this function is exported to kernel code and does its own checking). Am I right? I may have shot from the hip on this one.
I wouldn't think so. There is a kernel version of sscanf() - declared in kernel.h, but to read from the console, you have to be in user mode (or _possibly_ call some read function in kernel mode) and then parse it with sscanf() if you feel that's the right thing to do - it isn't done very much in the kernel, really.
--
Mats
What does sscanf() have to do with reading from the console?Quote:
but to read from the console...
True that, it is more like reading from sysfs. Why (or more importantly HOW) could kernel code read from the console?