[lkml]   [1997]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Bug in IP accounting explained
    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


     \ /
      Last update: 2005-03-22 13:39    [W:0.017 / U:53.948 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site