From owner-svn-src-head@FreeBSD.ORG Wed Mar 3 13:22:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4951065676; Wed, 3 Mar 2010 13:22:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AE5C48FC1A; Wed, 3 Mar 2010 13:22:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5DFD046B52; Wed, 3 Mar 2010 08:22:31 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 72ABF8A01F; Wed, 3 Mar 2010 08:22:30 -0500 (EST) From: John Baldwin To: Maxim Sobolev Date: Wed, 3 Mar 2010 07:49:18 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> In-Reply-To: <4B8DD54F.6060302@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003030749.18429.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 03 Mar 2010 08:22:30 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 13:22:32 -0000 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 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