Confused about create_proc_entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux