Hi!
I'm writing a kernel module to add a file under /proc/sys/kernel, but
alway fail to create_proc_entry "sys/kernel/test".
I found that in proc_create() in fs/proc/generic.c (2.6.25.4):
/* At this point there must not be any '/' characters beyond *fn */
if (strchr(fn, '/'))
goto out;
So you cannot create_proc_entry with a name containing "/", but
acturally create_proc_entry with "sysvipc/test" succeeds, and there are
much other codes in the kernel that do this, e.g.:
fs/nfsd/nfsctl.c: entry = create_proc_entry("fs/nfs/exports", 0,
NULL);
fs/proc/proc_tty.c: create_proc_read_entry("tty/ldiscs", 0, NULL,
tty_ldiscs_read_proc, NULL);
I got pretty confused. Any idea? and is it possible to create a file
in /proc/sys/kernel ? How?
Thanks!
Romu
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html