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

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

 



On Sat, 2007-04-07 at 13:43 -0400, Robert P. J. Day wrote:
> 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().

	This probably is a wrapper over create_proc_entry, with only read
only permissions for users.

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

I think yes.

cheers,
sandeep


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