Messages in this thread | | | Date | Sun, 29 Jan 2012 17:13:18 -0800 | From | Earl Chew <> | Subject | Re: [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
| |