LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-28-2014, 10:31 AM   #1
rahil khera
LQ Newbie
 
Registered: Sep 2009
Posts: 14

Rep: Reputation: 0
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.

Last edited by rahil khera; 02-28-2014 at 10:34 AM.
 
Old 02-28-2014, 11:22 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,711

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
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).
 
1 members found this post helpful.
Old 03-03-2014, 05:14 AM   #3
rahil khera
LQ Newbie
 
Registered: Sep 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jpollard View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash programming-append single line to end of file pheasand Linux - General 4 02-28-2014 10:41 AM
Accessing User mode buffer in Kernel module akshaynm87 Linux - Newbie 0 05-15-2009 06:36 AM
Kernel module programming Error : module not found coolguy_iiit Programming 1 07-30-2006 08:23 AM
write and append to a file using shell programming christina_rules Programming 5 07-16-2006 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration