public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question on accessing /proc
@ 2001-04-09 19:41 Srinivasan Venkatraman
  2001-04-09 19:51 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivasan Venkatraman @ 2001-04-09 19:41 UTC (permalink / raw)
  To: linux-kernel


Hi,

 I am new to this list. I did go through the FAQ before posting this
question. I have a specific requirment - creating,modifying and deleting
data structures inside the kernel values of which will be passed by an
user application. I know we could do this by writing a system call or by
ioctl command to a character device. My question is can we do this by
writing to /proc file system ? Can we actually create, modify and delete
data structures by accessing this file system ?
 Any pointers will be appreciated.

Thanks,
Srini.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question on accessing /proc
  2001-04-09 19:41 Question on accessing /proc Srinivasan Venkatraman
@ 2001-04-09 19:51 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2001-04-09 19:51 UTC (permalink / raw)
  To: Srinivasan Venkatraman; +Cc: linux-kernel

Srinivasan Venkatraman wrote:
>  I am new to this list. I did go through the FAQ before posting this
> question. I have a specific requirment - creating,modifying and deleting
> data structures inside the kernel values of which will be passed by an
> user application. I know we could do this by writing a system call or by
> ioctl command to a character device. My question is can we do this by
> writing to /proc file system ? Can we actually create, modify and delete
> data structures by accessing this file system ?

You could definitely use procfs, but it sounds like your example would
be complex.  Lately mounting filesystems has become a cheap operation in
Linux.  Mount/umount is also a convenient synchronization point.  So,
maybe consider implementing your own tiny filesystems - a data
filesystem, where you mmap(2)/read(2)/write(2) data values, and a
control filesystem, where you control the system and manipulate data
values.

That way, you can use standard Unix syscalls, standard Unix tools and
standard Unix permissions to accomplish your domain-specific task.

-- 
Jeff Garzik       | Sam: "Mind if I drive?"
Building 1024     | Max: "Not if you don't mind me clawing at the dash
MandrakeSoft      |       and shrieking like a cheerleader."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-09 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-09 19:41 Question on accessing /proc Srinivasan Venkatraman
2001-04-09 19:51 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox