Switching to [KMGTPE]i prefixes?

Alexander Best arundel at freebsd.org
Fri Mar 25 19:53:26 UTC 2011


On Fri Mar 25 11, Warner Losh wrote:
> One difference between this patch, and the patch I came up with, was that I used arrays of character pointers to the names of the symbols to use.  This got around the problem that you have with the 'shift' you had to introduce to get things more or less correct.  It also made for the possibility of having different kinds of units in the future that weren't a power of 2 -1 bytes long.  It also simplified the code a little.
> 
> Perhaps you would consider this improvement when devising future patches.

would you mind sharing your patch or pinpoint me to the according thread?

cheers.
alex

> 
> Warner
> 
> 
> On Mar 24, 2011, at 8:46 PM, Alexander Best wrote:
> 
> > here is a revised patch. it also includes the necessary changes to the
> > humanize_number(3) man page.
> > 
> > cheers.
> > alex
> > 
> > -- 
> > a13x
> > <IEC_80000_13.diff>_______________________________________________
> > freebsd-hackers at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

-- 
a13x


More information about the freebsd-hackers mailing list