From owner-svn-src-all@FreeBSD.ORG Wed Mar 3 03:19:38 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCA99106564A; Wed, 3 Mar 2010 03:19:38 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id A24FB8FC08; Wed, 3 Mar 2010 03:19:38 +0000 (UTC) Received: from [192.168.1.38] (S0106005004e13421.vs.shawcable.net [70.71.175.212]) (authenticated bits=0) by sippysoft.com (8.14.3/8.14.3) with ESMTP id o233Jaea051296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 19:19:37 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4B8DD54F.6060302@FreeBSD.org> Date: Tue, 02 Mar 2010 19:19:43 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Xin LI References: <201003030205.o2325AMY010089@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 03:19:39 -0000 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. -Maxim