Messages in this thread | | | Date | Mon, 09 Apr 2001 15:51:48 -0400 | From | Jeff Garzik <> | Subject | Re: Question on accessing /proc |
| |
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." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |