Create proc entry under /proc/sys/kernel

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

 



Hi!

Is it possible to create a proc entry under /proc/sys/kernel directly by create_proc_read_entry in the way shown below?

test_pde = create_proc_read_entry("/proc/sys/kernel/test", 0, NULL,
                                   test_read_proc, NULL);
if (test_pde == NULL) {
   printk(KERN_ERR "Failed to create the test proc file.\n");
   return -ENOMEM;
}

I'm using this in my kernel module but create_proc_read_entry always returns fail, while there's no problem creating proc entries directly under /proc. The kernel source I'm building my kernel module against is 2.6.25.4.

Any idea?


Thanks
Romu
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux