Skip site navigation (1)Skip section navigation (2)


| raw e-mail | index | archive | help
Created attachment 250161
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250161&action=
=3Dedit
Fix xo_emit format string for percentages

When (long) and (long long) are different sizes vmstat reports garbage for =
the
CPU percentage columns.  From arm.armv7 running FreeBSD 14:

# vmstat
 procs    memory    page                      disks       faults       cpu
 r  b  w  avm  fre  flt  re  pi  po   fr   sr mmc0  da0   in   sy   cs us s=
y id
 4  0  0 494M 1.2G  278   0   1   0  351   22    0    0 1.7k  603  279 3499=
288
538751558161 538751558161

The call to xo_emit in usr.bin/vmstat/vmstat.c function percent() passes "
{:user/%2lld/%lld}" as the format string but (long) as the argument type.=20
Changing "lld" to "ld" fixes the bug.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?>