Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2005 19:10:26 -0800
From:      Eric Anholt <anholt@FreeBSD.org>
To:        obrien@FreeBSD.org
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/memcontrol memcontrol.c
Message-ID:  <1112152226.32986.2.camel@leguin>
In-Reply-To: <20050329202834.GA35518@dragon.NUXI.org>
References:  <200503292017.j2TKHlaa062618@repoman.freebsd.org> <20050329202834.GA35518@dragon.NUXI.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2005-03-29 at 12:28 -0800, David O'Brien wrote:
> 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.

I like the 0 prepending on the offset, for sure.  I'm ambivalent about
length being decimal (really could go either way).



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