lkml.org 
[lkml]   [2003]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectprofs open hook
I have done this little patch for the procfs_example.c

diff procfs_example.c
kernels/linux-2.4.20/Documentation/DocBook/procfs_example.c
87,91d86
< static int open_qp(struct inode * inode, struct file * file)
< {
< printk("Open my node %p %p \n",inode,file);
< return -EINVAL;
< }
180c175
< foo_file->proc_fops->open=open_qp;
---
>

And when loading this module. The procfs gets broken. I get EINVAL for
open on
/proc/meminfo and all other procfs info. Why? Should procfs inodes don't
have full
filesematics? And it don't help to unload the module.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.020 / U:1.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site