just want to clarify the various combinations for creating /proc files

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

 



  based on my reading of LDD3 and the procfs_example.c file in the
kernel Doc directory, i just want to clarify all possible ways to
create the different types of /proc files.

  first, to create a simple read and/or write file, you can use
create_proc_entry() supplying the name, mode and directory, after
which (depending on whether you're implementing read, write or both)
you'd assign to the "read_proc" and/or "write_proc" members of the
proc_dir_entry structure, right?

  as a shorter alternative, if you want *strictly* a read-only file,
you could use create_proc_read_entry().

  and, finally, if you want a seq_file, you need to use
create_proc_entry, and then you'd assign to the "proc_fops" member of
the proc_dir_entry.

  is that about it?

rday


-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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