Date: Wed, 3 Mar 2010 07:49:18 -0500 From: John Baldwin <jhb@freebsd.org> To: Maxim Sobolev <sobomax@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI <delphij@gmail.com> Subject: Re: svn commit: r204615 - head/sbin/newfs Message-ID: <201003030749.18429.jhb@freebsd.org> 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 Tuesday 02 March 2010 10:19:43 pm Maxim Sobolev wrote: > Xin LI wrote: > > On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev <sobomax@freebsd.org> wrote: > >> Author: sobomax > >> Date: Wed Mar 3 02:05:09 2010 > >> New Revision: 204615 > >> URL: http://svn.freebsd.org/changeset/base/204615 > >> > >> Log: > >> Teach newfs(8) to understand size modifiers for all options taking > >> size or size-like argument. I.e. "-s 32k" instead of "-s 32768". > >> Size parsing function has been shamelessly stolen from the truncate(1). > >> I'm sure many sysadmins out there will appreciate this small > >> improvement. > > > > 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 > code 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. Reducing code duplication and enforcing consistency is a reason to use the version from the library. Folks worried about space can always link libutil statically as well. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003030749.18429.jhb>