cvs commit: src/usr.sbin/memcontrol memcontrol.c
David O'Brien
obrien at FreeBSD.org
Tue Mar 29 12:28:36 PST 2005
On Tue, Mar 29, 2005 at 08:17:47PM +0000, Eric Anholt wrote:
> anholt 2005-03-29 20:17:47 UTC
>
> FreeBSD src repository
>
> Modified files:
> usr.sbin/memcontrol memcontrol.c
> Log:
> Correct formatting of pointers in the listing by using "0x%" PRIx64 instead of
> "%" PRIu64 "x".
I'd like to tweak this even more:
+ printf("%#.*" PRIx64 "/%" PRIu64 " %.8s ",
+ sizeof mrd[i].mr_base, mrd[i].mr_base, mrd[i].mr_len,
+ mrd[i].mr_owner[0] ? mrd[i].mr_owner : "-");
This gives output like:
0x00010000/65536 BIOS write-back fixed-base fixed-length set-by-firmware active
0x00080000/16384 BIOS write-back fixed-base fixed-length set-by-firmware active
I think lengths in decimal are more clear, and having addresses lined up
also makes it easier to read the output.
More information about the cvs-all
mailing list