Messages in this thread | | | From | Werner Almesberger <> | Subject | Re: getting more that 4K out of a proc file? | Date | Thu, 17 Feb 2000 13:07:08 +0100 (MET) |
| |
Alan Cox wrote: > 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
Doesn't work that well in cases where information is quite variable-length, e.g. drivers/atm/eni.c:eni_proc_read. Besides, all of the /proc/atm files are meant to be human-read, so the usual formatting policy is "try to stay within 80 columns, but overflow if necessary". One would have to \0-pad in order to get this, which is probably worse than funny file positions.
IMHO, seeking to non-zero positions in /proc is a little bogus anyway, because many files have sufficiently variable content that you can't really tell where you might end up.
Would be nice if once could flag /proc as non-seekable and make them appear as pipes, though.
- Werner
-- _________________________________________________________________________ / Werner Almesberger, ICA, EPFL, CH werner.almesberger@ica.epfl.ch / /_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
- 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/
| |