lkml.org 
[lkml]   [2001]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectprocfs feature or bug?
[Do cc me replies. Thanks.]

Hi!

I was trying out the multipage procfs entries, when i found out that i
was having a problem.

I am trying to use the "hack" by Paul Russell to allow mangling of
filepos using ``*start'' entries as my personal page offset. Now, for
multipage entries, whatever i set as *start should be coming back to
me as offset when the next page is called.

But in fs/proc/generic.c in proc_file_read() at the end we have (
after the first page has been "copied_to_user")

*ppos += start < page ? (long) start : n;

But this _adds_ the contents of start to the offset, in the case where
I am supplying the offset in ``start''. Shouldn't this just be
_replacing_ ? 'Cause in this case the offsets get cumulatively added,
causing an oops at the end for me :(

Or am I missing something big???

- Sandip

--
-----------------------------------------------------------
Sandip Bhattacharya
Office: sandip@mindsw.com Home: sandipb@bigfoot.com
Mindframe Software
-----------------------------------------------------------
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.060 / U:1.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site