From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 4 18:32:20 2011 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 A9CCE1065674; Tue, 4 Jan 2011 18:32:20 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1BFFA8FC08; Tue, 4 Jan 2011 18:32:19 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: p04ICkbP018162 Received: from gkeramidas-glaptop.linux.gr (217-162-216-74.dclient.hispeed.ch [217.162.216.74]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id p04ICkbP018162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Jan 2011 20:12:53 +0200 From: Giorgos Keramidas To: Garrett Cooper References: <20110104112502.GM3140@deviant.kiev.zoral.com.ua> <201101040805.59412.jhb@freebsd.org> <20110104134940.GA8529@freebsd.org> <0CC6BFE3-3381-401A-A9E3-26EB7EB46A3E@gmail.com> Date: Tue, 04 Jan 2011 19:12:41 +0100 In-Reply-To: <0CC6BFE3-3381-401A-A9E3-26EB7EB46A3E@gmail.com> (Garrett Cooper's message of "Tue, 4 Jan 2011 08:58:48 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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:32:20 -0000 On Tue, 4 Jan 2011 08:58:48 -0800, Garrett Cooper wrote: >>>> + errno = 0; >>>> + res = strtol(str, &endp, 10); >>>> + if (errno != 0 || endp == str || *endp != '\0') >>>> + err(1, "%s shall be a number", errname); >>> >>> Small nit, maybe use 'must' instead of 'shall'. >> >> 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. > > 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. > > BTW, only if errno was non-zero would using err(3) be > logical. Otherwise it will just produce noise :). That's a good point. I think we should change err() to errx() there.