From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 4 18:19:15 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BA1A1065698; Tue, 4 Jan 2011 18:19:15 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id ED3428FC1F; Tue, 4 Jan 2011 18:19:14 +0000 (UTC) Received: by pxi1 with SMTP id 1so2895752pxi.13 for ; Tue, 04 Jan 2011 10:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:message-id:references:to :x-mailer; bh=nTyIFHQvaGx3XHv/+N1PX/tx3K7rX3y/zE/z+R8USm8=; b=Mv+/OmCGygKeBMHoIHBVMKpOx/5ifZlV2YJub8eSqWIf06uuMH37USU132ZRn4izuI q/J967EkwYXVMgueML93/YQCRRCBbFYKEPhm0KBdLfx3ISlW6HOfc5Ie5vJbcTba2Vw2 vp7Q0knYsVaj5zGg2iIYrTTWH6cwsVrRnZ1mQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=pFMyROgs1wov9kxGgt9v9MGZjXnVLgk1o6jkLsaDnAZftbWyAsIaOkdqzhP5E8L6Nb scF0BWiaNFF3UX3UNk8gl56ROsj94GU2VHQtXRgkKYA3+itu6BjGKKnUUkhK4tBiWYou FHL2/ixn+WLp+aWvDZDi1bBylAh+X9+4Ix93A= Received: by 10.142.11.9 with SMTP id 9mr17004433wfk.59.1294165154298; Tue, 04 Jan 2011 10:19:14 -0800 (PST) Received: from [192.168.20.5] (c-24-130-151-210.hsd1.ca.comcast.net [24.130.151.210]) by mx.google.com with ESMTPS id q13sm31172925wfc.5.2011.01.04.10.19.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 Jan 2011 10:19:12 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1082) From: Garrett Cooper In-Reply-To: Date: Tue, 4 Jan 2011 10:19:09 -0800 Message-Id: References: <20110104112502.GM3140@deviant.kiev.zoral.com.ua> <201101040805.59412.jhb@freebsd.org> <20110104134940.GA8529@freebsd.org> <0CC6BFE3-3381-401A-A9E3-26EB7EB46A3E@gmail.com> To: Giorgos Keramidas X-Mailer: Apple Mail (2.1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Eitan Adler , hackers@freebsd.org, Kostik Belousov , Alexander Best Subject: Re: [patch] have rtprio check that arguments are numeric; change atoi to strtol 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: Tue, 04 Jan 2011 18:19:15 -0000 On Jan 4, 2011, at 10:12 AM, Giorgos Keramidas wrote: > On Tue, 4 Jan 2011 08:58:48 -0800, Garrett Cooper = wrote: >>>>> + errno =3D 0; >>>>> + res =3D strtol(str, &endp, 10); >>>>> + if (errno !=3D 0 || endp =3D=3D str || *endp !=3D '\0') >>>>> + err(1, "%s shall be a number", errname); >>>>=20 >>>> Small nit, maybe use 'must' instead of 'shall'. >>>=20 >>> it seems at some point there has been a massive usage of the term >>> 'shall' in manual pages, which people tried to get rid of. hence the >>> 'usr/share/examples/mdoc/deshallify.sh' script. >>=20 >> I know shall is used widely by opengroup when describing definitions >> and interfaces in the POSIX standards, but the connotation in English >> is very squishy, so I agree with John that must would be better. >>=20 >> BTW, only if errno was non-zero would using err(3) be >> logical. Otherwise it will just produce noise :). >=20 > That's a good point. I think we should change err() to errx() there. kib was quick and already did it in r216967. Cheers! -Garrett=