I am trying to read the code for the sysctl interface in kernel 2.0.34.
Looking at the sysctl_string strategy routine, there is either a (probably
unimportant) problem with it, or I am still missing something.
sysctl_string is the generic string reading/writing strategy routine.
It seems to do some sanity checks, and to read/write the string afterwards
from/to table->data, making sure it is properly terminated with a #0.
So far, so good. But after it has done this, it returns with a 'return 0'.
Now, looking at the comments and function do_sysctl_strategy, it seems to
me that if 0 is returned, a read/write will be done _again_, this time as
plain abstract data, overwriting the nice things and termination of
sysctl_string!
Concluding, I think sysctl_string should return a positive value instead
of zero. But if I am wrong, I would be grateful if anyone could point out
what I have overlooked.
Frodo
-- Frodo Looijaard <frodol@dds.nl> Find my PGP public key and more at http://huizen.dds.nl/~frodol/ Updated: a guide for installing glibc-2 as an additional target under Linux- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html