[mpls-linux-general] writting into proc file
Status: Beta
Brought to you by:
jleu
From: <vvk...@hs...> - 2002-01-04 08:58:37
|
Hi Folks ! Can anybody explain how will be the mechanism to write into file in the /proc filesystem from kernel space ........... In the 2.4.x linux kernel , for less than PAGE_SIZE data transfer , i am using the following mechanism to register the entry in the /PROC filesytem... struct proc_dir_entry *entry=create_proc_entry("xyz", S_IRUGO | S_IWUGO , NULL ); if ( entry ) { entry->read_proc = xyz_read_proc; entry->write_proc = xyz_write_proc; } are these mean to say that accessing this file from userspace........or kernel space.......... Is this mean to say that , when user invokes "read" or "write" system directly or indirectly with ANSI library will be available for user to access this file ? I want to write the content into a file ..i.e in /proc .... from kernel space......... What will be various options to acheive this ? can anybody send a small template for this , will be greatly appreciated.......... Thanks in advance......... With thanx and regards, Ramakrishna kvv. |