From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 04:59:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DCEA106566B; Wed, 3 Mar 2010 04:59:58 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6848FC08; Wed, 3 Mar 2010 04:59:58 +0000 (UTC) Received: by pwj1 with SMTP id 1so702785pwj.13 for ; Tue, 02 Mar 2010 20:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PxaAV4P/Lu5aGhzTOIqu8wYqdF08ojsxFeASsKf0V20=; b=uVwkHqLyqxIVqEUQTA9vKTQGNwDDLo2j3jAZuYPFOcQoWr+2SRd68BxPDIS4XxbLHO l6KDLOdlqTF1pcrYIDI+hjl8/hG61B8n7Yc0DN7aHpYLG2RTLtAfz8r1UJtrvM0yPtln 9P7r5c8DdPMwpNPEIiO+BBj7Q6+hsiHrBMAks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Qq6thplKGYCJHVoQTcURz9LLAib6XDPb+FiDRNLNuk/ktoHMRFqmhcX8pxyJY0ufM6 fgu9qhHn3H19qQZ186smvjJ0fmBbV/XaX1ysY13u+NtVQsDi4Dts2rY9PU/Wg4qtlPTJ PNo3k39QsL9jiRRiZyK0hKam9tT65bYZ2m3II= MIME-Version: 1.0 Received: by 10.115.133.25 with SMTP id k25mr4019028wan.134.1267592395415; Tue, 02 Mar 2010 20:59:55 -0800 (PST) In-Reply-To: <4B8DD54F.6060302@FreeBSD.org> References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> Date: Tue, 2 Mar 2010 20:59:55 -0800 Message-ID: From: Xin LI To: Maxim Sobolev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 04:59:58 -0000 On Tue, Mar 2, 2010 at 7:19 PM, Maxim Sobolev wrote: > Xin LI wrote: >> >> On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev 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 http://www.delphij.net