svn commit: r204615 - head/sbin/newfs
John Baldwin
jhb at freebsd.org
Wed Mar 3 13:22:32 UTC 2010
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 at 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
More information about the svn-src-all
mailing list