LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Append to buffer in proc_fs file - kernel module programming (https://www.linuxquestions.org/questions/linux-newbie-8/append-to-buffer-in-proc_fs-file-kernel-module-programming-4175496545/)

rahil khera 02-28-2014 09:31 AM

Append to buffer in proc_fs file - kernel module programming
 
How to append in a file of type proc_fs. When my application calls the write function of proc file, it over-writes previous contents. I have tried O_APPEND, although it is working with normal file but not with the proc_fs file.

jpollard 02-28-2014 10:22 AM

You can't.

procfs is there to interface with kernel tables, and parameters. These cannot be extended as it would corrupt the kernel, so you can't do that. It is a property of procfs (and sysfs, and devfs for that matter).

rahil khera 03-03-2014 04:14 AM

Quote:

Originally Posted by jpollard (Post 5126516)
You can't.

procfs is there to interface with kernel tables, and parameters. These cannot be extended as it would corrupt the kernel, so you can't do that. It is a property of procfs (and sysfs, and devfs for that matter).

Sir, Thanks a lot for your help.


All times are GMT -5. The time now is 03:05 PM.