Re: Bug in IP accounting explained

Raul Miller (rdm@test.legislate.com)
Mon, 2 Jun 1997 13:12:38 -0400


On Jun 2, Bill Hawes wrote
> There's an easy cheesy fix, which is just to make all of the sprintf()
> format conversions have a fixed width, so that the converted length
> can't change between calls. The right way to fix it would be to make
> all the returned lines the same length, then divide the offset by the
> length to calculate how many list nodes to skip over before starting the
> new conversion.

How about putting, say, 1024 bytes into foffset for each line, and
not feel obligated to print that many bytes when lines are shorter.

I seem to recall seeing that technique used in fs/proc/array.c

-- 
Raul