Created attachment 250161 [details] 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 sy id 4 0 0 494M 1.2G 278 0 1 0 351 22 0 0 1.7k 603 279 3499288 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. Changing "lld" to "ld" fixes the bug.
https://github.com/freebsd/freebsd-src/pull/1344
MARKED AS SPAM