From owner-freebsd-hackers Thu Feb 12 14:26:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA14420 for hackers-outgoing; Thu, 12 Feb 1998 14:26:04 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cynic.portal.ca (root@cynic.portal.ca [204.174.36.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA14342 for ; Thu, 12 Feb 1998 14:25:27 -0800 (PST) (envelope-from cjs@portal.ca) Received: from localhost ([[UNIX: localhost]]) by cynic.portal.ca (8.8.5/8.8.5) with SMTP id OAA20259; Thu, 12 Feb 1998 14:24:14 -0800 (PST) X-Authentication-Warning: cynic.portal.ca: cjs owned process doing -bs Date: Thu, 12 Feb 1998 14:24:14 -0800 (PST) From: Curt Sampson To: Philippe Charnier cc: hackers@FreeBSD.ORG Subject: Re: tail -F patches In-Reply-To: <199802121930.UAA01693@xp11.frmug.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You should mention which system you're talking about. In NetBSD's misc.c, which is from 4.4-lite, err() does not print strerror(errno), and there is no errx(). cjs Curt Sampson cjs@portal.ca Info at http://www.portal.ca/ Internet Portal Services, Inc. Through infinite mist, software reverberates Vancouver, BC (604) 257-9400 In code possess'd of invisible folly. On Thu, 12 Feb 1998, Philippe Charnier wrote: > To: cjs@netbsd.org > Cc: hackers@FreeBSD.ORG, support@bsdi.com > Subject: Re: tail -F patches > Date: Thu, 12 Feb 1998 20:30:27 +0100 > From: Philippe Charnier > X-Loop: FreeBSD.ORG > > Hello, > > In the patch you posted: > + if ((fp = fopen(fname, "r")) == NULL) > + err(1, "can't reopen %s: %s", > + fname, strerror(errno)); > > Err(3) already displays the output of `strerror(errno)', so the following > will suffice: > err(1, "can't reopen %s", fname); > > - err(1, "-f option only appropriate for a single file"); > + err(1, "-f and -F options only appropriate for a single file"); > > No need to use err(3) here because errno is nothing but garbage. Use errx(3) > instead. > > Have a nice day. > ------ ------ > Philippe Charnier charnier@{lirmm.fr,xp11.frmug.org,FreeBSD.org} > > ``a PC not running FreeBSD is like a venusian with no tentacles'' > ------------------------------------------------------------------------ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe hackers" in the body of the message