Date: Tue, 29 Mar 2005 12:28:34 -0800 From: "David O'Brien" <obrien@FreeBSD.org> To: Eric Anholt <anholt@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/memcontrol memcontrol.c Message-ID: <20050329202834.GA35518@dragon.NUXI.org> In-Reply-To: <200503292017.j2TKHlaa062618@repoman.freebsd.org> References: <200503292017.j2TKHlaa062618@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050329202834.GA35518>