Re: using /proc for input (module)

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

 



Greetings,

On Fri, May 30, 2003 at 06:33:34PM -0700, V.Subramanian@asu.edu wrote:
> Hi folks,
> I am trying to code an example from  "The Linux Kernel Module Programming
> Guide". One of the examples is using a /proc file for input.(chapter 6)
> 
> The author uses the file_operations field of the inode_operations struct to
> set up the field for reading.
> Basically he creates a file_operations struct with the right values and then
> sets the file_operations field in the inode_operations struct which is in turn
> used in the proc_dir_entry.
> 
> But in 2.4.20 , the inode_operations struct doe not have a file_operations
> member. So the technique described cannot be used(IMHO). How can I achieve  
> the same result in 2.4.20?
> There is no function called create_proc_write_entry() similar to
> create_proc_read_entry().
> 
> Any help is appreciated .
> Thanks in advance.
> Vijay

You can use create_proc_entry() for both reading and writing to /proc.
Checkout Documentation/DocBook/procfs_example.c for an example.
Cheers,

-- 
Andrea Luzzardi <al@sig11.org>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux