From owner-freebsd-bugs Mon Mar 8 18:30:17 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 70D3114D2D for ; Mon, 8 Mar 1999 18:30:16 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id SAA88907; Mon, 8 Mar 1999 18:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Mon, 8 Mar 1999 18:30:02 -0800 (PST) Message-Id: <199903090230.SAA88907@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Matthew D. Fuller" Subject: Re: bin/9471: msgs: /var/msgs/bounds: No such file or directory Reply-To: "Matthew D. Fuller" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/9471; it has been noted by GNATS. From: "Matthew D. Fuller" To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/9471: msgs: /var/msgs/bounds: No such file or directory Date: Mon, 8 Mar 1999 20:23:28 -0600 Here's the patch with the manpage update as well. Index: msgs.1 =================================================================== RCS file: /usr/cvs/src/usr.bin/msgs/msgs.1,v retrieving revision 1.5 diff -u -r1.5 msgs.1 --- msgs.1 1998/06/23 16:52:59 1.5 +++ msgs.1 1999/02/13 00:46:40 @@ -117,7 +117,16 @@ .Nm will make a new .Pa bounds -file the next time it is run. +file the next time it is run with the +.Fl s +option. +If +.Nm +is run with any option other than +.Fl s , +an error will be displayed if +.Pa /var/msgs/bounds +does not exist. .Pp The .Fl s Index: msgs.c =================================================================== RCS file: /usr/cvs/src/usr.bin/msgs/msgs.c,v retrieving revision 1.13 diff -u -r1.13 msgs.c --- msgs.c 1998/07/14 19:07:30 1.13 +++ msgs.c 1999/02/13 00:39:01 @@ -246,8 +246,14 @@ * determine current message bounds */ snprintf(fname, sizeof(fname), "%s/%s", _PATH_MSGS, BOUNDS); - if (stat(fname, &buf) < 0) - err(errno, "%s", fname); + if (send_msg != YES) { + if (stat(fname, &buf) < 0) { + if (hush != YES) + err(errno, "%s", fname); + else + exit(1); + } + } bounds = fopen(fname, "r"); if (bounds != NULL) { --- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* | Matthew Fuller http://www.over-yonder.net/~fullermd | * fullermd@futuresouth.com fullermd@over-yonder.net * | UNIX Systems Administrator Specializing in FreeBSD | * FutureSouth Communications ISPHelp ISP Consulting * | "The only reason I'm burning my candle at both ends, | * is because I haven't figured out how to light the * | middle yet" | *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message