Date: Thu, 12 Feb 1998 14:24:14 -0800 (PST) From: Curt Sampson <cjs@portal.ca> To: Philippe Charnier <charnier@xp11.frmug.org> Cc: hackers@FreeBSD.ORG Subject: Re: tail -F patches Message-ID: <Pine.NEB.3.96.980212140318.16101H-100000@cynic.portal.ca> In-Reply-To: <199802121930.UAA01693@xp11.frmug.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <charnier@xp11.frmug.org> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.980212140318.16101H-100000>