next up previous
Next: proc_dointvec Up: Predefined proc callbacks Previous: Predefined proc callbacks

proc_dostring

read/ write strings callback proc handler. If this callback receives non-string data, it simply will set the buffer to NULL.


static char somestring[]="the initial string";
...
ctl_table simple_table[] = {
   {DEV_SIMPLE_SOMESTRING, "somestring", 
      &somestring, sizeof(somestring), 
      0644, NULL, &proc_dostring},
   {0}};

Passing an oversized string by writing to the proc file will be truncated to sizeof(somestring) as set at compile time.



Der Herr Hofrat
2003-03-26