[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
proc_file_write
Is there a description available of how to use proc_file_write? I have a
module in kernel 2.4.18 that uses the proc filesystem for output, and am
modifying it to read settings from proc. The (broken) algorithm that I am
using is:
static ssize_t my_proc_file_write(
struct file *file,
const char *buffer,
size_t count,
loff_t *ppos )
{
int len = <read data with scanf>;
printk( "Flag\n" );
return( len );
}
which printk's "Flag" infinitely when I "echo 1 > /proc/my_proc_file".
What is thre proper way to use proc_file_write?
James
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/