Skip to contentSkip to conversation

Sysctl problem

DISCUSSION Emmanuel Varagnat 1 participant 1 message May 31, 2001

lore
Share & tools
lore
#0 lore raw

I registered a new directory and its tree in the proc filesystem with some register_sysctl_table. And naturally I use unregister_sysctl_table when the module is unloaded.
And everything seems to work fine.

Execpt that I can't read the corresponding data with the 'cat' command. A 'strace'
shows me that 'cat' is in a loop :
...
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
...

I'm using my own function to change the data value, but helped by proc_dointvec.
My function doesn't seem to be called.

Does anybody ever met something like this ?

Thanks

-Manu