lkml.org 
[lkml]   [2012]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Support single byte reads from integers published in procfs by kernel/sysctl.c
> I suspect what we want for writes is to read the existing value into an
> internal buffer, and then allow partial writes to the internal buffer.

Oh I see. Hmm ... I get the feeling that doubles the scope of the exercise ;-)

I'll give it some more thought.

> I don't know if writable seq_files exist.

No, they don't -- at least not out-of-the-box. From fs/seq_file.c :

> /*
> * seq_files support lseek() and pread(). They do not implement
> * write() at all, but we clear FMODE_PWRITE here for historical
> * reasons.
> *
> * If a client of seq_files a) implements file.write() and b) wishes to
> * support pwrite() then that client will need to implement its own
> * file.open() which calls seq_open() and then sets FMODE_PWRITE.
> */
> file->f_mode &= ~FMODE_PWRITE;

Earl



\
 
 \ /
  Last update: 2012-01-30 02:15    [W:0.048 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site