[PATCH] top: fix and merge code to parse /proc/meminfo
Timo Teras
timo.teras at iki.fi
Mon Jul 21 16:13:16 UTC 2014
On Mon, 21 Jul 2014 11:34:01 -0400
Jason Cipriani <jason.cipriani at gmail.com> wrote:
> On Jul 21, 2014 6:11 AM, "Timo Teras" <timo.teras at iki.fi> wrote:
> >
> > On Mon, 21 Jul 2014 13:55:38 +0300
> > Timo Teräs <timo.teras at iki.fi> wrote:
> >
> > > snprintf(line_buf, LINE_BUF_SIZE,
> > > - "Mem total:%s anon:%s map:%s free:%s",
> > > - Z[TOTAL], Z[ANON], Z[MAP], Z[MFREE]);
> > > + "Mem total:%ul anon:%ul map:%ul free:%ul",
> >
> > Duh. All these should be %lu. Sending fixed patch in a minute.
> >
>
> Did you test this patch?
I did, on linux-3.14.12. I also tested the part that had the wrong
specifier, but for some reason I did not pay attention to the 'l' in the
end of the number at first. I was just checking that the numbers matched
what they should be. I guess I was needing coffee ;)
More information about the busybox
mailing list