Re: getting more that 4K out of a proc file?

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Thu Feb 17 2000 - 07:14:21 EST


"A month of sundays ago Alan Cox wrote:"
> > In net/atm/proc.c, the file position is abused as an item counter.
> > Works pretty well. (Hardly anybody does calculated seeks, and the
> > more common "rewind" and "return to previously seen position" cases
> > are okay.)
>
> Yuck. Take a look at the routing code for IP stuff. We use fixed width records
> with space padding. Then you just shift right to get the item counter
> and it still works byte level

I have rewritten the generic proc read routine to at least be
comprehensible. (It's the stuff that interfaces the read calls
made at FS level to the functions registered with proc).

I was waiting for notices to come in of uses of some of its (to me obscure
and probably disused) modes before I changed the functionality to get rid
of them. I've been collecting the notices here and will cheerfully post a
suggested patch shortly ... (snowed under here).

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:18 EST