lkml.org 
[lkml]   [2008]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Create proc entry under /proc/sys/kernel
On Sun, Jun 08, 2008 at 04:00:57PM +0800, RuoMu Hu wrote:
> Is it possible to create a proc entry under /proc/sys/kernel directly by
> create_proc_read_entry in the way shown below?

No longer.

> 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.

Use register_sysctl_table() for sysctls.



\
 
 \ /
  Last update: 2008-06-08 13:25    [W:0.029 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site