Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 1999 15:16:43 +0200 (EET)
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/9471: msgs: /var/msgs/bounds: No such file or directory
Message-ID:  <199901131316.PAA05291@relay.ucb.crimea.ua>

next in thread | raw e-mail | index | archive | help

>Number:         9471
>Category:       bin
>Synopsis:       msgs: /var/msgs/bounds: No such file or directory
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 13 05:20:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Ermilov
>Release:        FreeBSD 2.2.8-STABLE i386
>Organization:
United Commercial Bank
>Environment:

	Both 3.0 and 2.2.8.

>Description:

New installations do not install /var/msgs/bounds file.
Enabling `msgs -f' in either /etc/profile or /etc/cshrc
causes $Synopsis to be displayed every time user logs in.
According to msgs(1):

| The file /var/msgs/bounds shows the low and high number of the messages
| in the directory so that msgs can quickly determine if there are no
| messages for you.  If the contents of bounds is incorrect it can be fixed
| by removing it; msgs will make a new bounds file the next time it is run.
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This bug was introduced in revision 1.10, and then merged
into RELENG_2_2 in revision 1.8.2.2.


>How-To-Repeat:

Remove /var/msgs/bounds.
Run `msgs'.

>Fix:
	
Index: msgs.c
===================================================================
RCS file: /usr/FreeBSD-CVS/src/usr.bin/msgs/msgs.c,v
retrieving revision 1.8.2.4
diff -u -r1.8.2.4 msgs.c
--- msgs.c	1998/07/17 04:20:04	1.8.2.4
+++ msgs.c	1999/01/13 13:00:13
@@ -170,7 +170,6 @@
 	int rcback = 0;			/* amount to back off of rcfirst */
 	int firstmsg = 0, nextmsg = 0, lastmsg = 0;
 	int blast = 0;
-	struct stat buf;		/* stat to check access of bounds */
 	FILE *bounds;
 
 #ifdef UNBUFFERED
@@ -246,8 +245,6 @@
 	 * determine current message bounds
 	 */
 	snprintf(fname, sizeof(fname), "%s/%s", _PATH_MSGS, BOUNDS);
-	if (stat(fname, &buf) < 0)
-		err(errno, "%s", fname);
 	bounds = fopen(fname, "r");
 
 	if (bounds != NULL) {

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901131316.PAA05291>