Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2010 20:59:55 -0800
From:      Xin LI <delphij@gmail.com>
To:        Maxim Sobolev <sobomax@freebsd.org>
Cc:        freebsd <freebsd-hackers@freebsd.org>
Subject:   Re: svn commit: r204615 - head/sbin/newfs
Message-ID:  <a78074951003022059w6cb69229td289046d3fcb3e32@mail.gmail.com>
In-Reply-To: <4B8DD54F.6060302@FreeBSD.org>
References:  <201003030205.o2325AMY010089@svn.freebsd.org> <a78074951003021808y1afb3f28m35a55876245a9e7d@mail.gmail.com> <4B8DD54F.6060302@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 2, 2010 at 7:19 PM, Maxim Sobolev <sobomax@freebsd.org> wrote:
> Xin LI wrote:
>>
>> On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev <sobomax@freebsd.org> wrot=
e:
>>>
>>> Author: sobomax
>>> Date: Wed Mar =C2=A03 02:05:09 2010
>>> New Revision: 204615
>>> URL: http://svn.freebsd.org/changeset/base/204615
>>>
>>> Log:
>>> =C2=A0Teach newfs(8) to understand size modifiers for all options takin=
g
>>> =C2=A0size or size-like argument. I.e. "-s 32k" instead of "-s 32768".
>>> =C2=A0Size parsing function has been shamelessly stolen from the trunca=
te(1).
>>> =C2=A0I'm sure many sysadmins out there will appreciate this small
>>> =C2=A0improvement.
>>
>> Bikeshed: why not expand_number()?
>
> I did not know that function existed, but even if I did, I am really not
> sure if adding dependency on external library just to save 200 bytes of c=
ode
> worth it. Considering that newfs(8) is often embedded into various
> space-tight/custom things, adding dependency could cause more harm than
> good. In any case, I do not feel strongly about that, so I can change it =
to
> use libutil if people feel like it.

[Moved from svn-all@ to -hackers@]

I'd prefer depending on libutil since it's installed as a /lib library
which is usually available, as libutil is not something easily
avoidable.

By the way I'm curious why these (humanize and friends) are not
available as libc function?  Because they are not part of POSIX
perhaps?

Cheers,
--=20
Xin LI <delphij@delphij.net> http://www.delphij.net



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