Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 17:38:06 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Xin LI <delphij@gmail.com>
Cc:        Alexander Best <arundel@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: Switching to [KMGTPE]i prefixes?
Message-ID:  <89A0FF76-7907-4815-85D2-F87968939B66@bsdimp.com>
In-Reply-To: <BANLkTinQAwLCwZi7VXJKB90wn0kw0FvfHQ@mail.gmail.com>
References:  <20110325002115.GA323@freebsd.org> <20110325015508.GA14565@freebsd.org> <20110325024658.GA19544@freebsd.org> <336A9ACD-29BF-41C9-BC25-917CC1E4587D@bsdimp.com> <20110325195325.GA69264@freebsd.org> <AANLkTinEcT__Wtc6LkSyqqMnQwuKVUbZC4dPZvZH_dSX@mail.gmail.com> <D29C3B5E-5BB1-40B5-ACE3-7F560DCAE86D@bsdimp.com> <BANLkTinQAwLCwZi7VXJKB90wn0kw0FvfHQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 25, 2011, at 5:28 PM, Xin LI wrote:

> On Fri, Mar 25, 2011 at 2:50 PM, Warner Losh <imp@bsdimp.com> wrote:
>> How did you guys deal with programs like df that now need to do =
special buffer size hacks to get consistent results?
>=20
> I think it doesn't really matter - caller have to specify using IEC
> prefixes explicitly, so old binaries won't be broken.  They must be
> updated to use the IEC prefixes.

My patch had a 'force IEC prefixes' compile time option which did.

However, you'll have to monkey around with df to get it to do the right =
thing since the buffer sizes and such will need to be 1 longer for the =
extra 'i' in the mix now...  And it can' t be unconditional, since then =
you'd get different results with the non IEC case.

That's a short way of saying that this patch is necessary, but not =
sufficient for the current system.  We'll need a lot of tweaks to the =
rest of the system for it to behave correctly.

Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89A0FF76-7907-4815-85D2-F87968939B66>