mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
Apply suggested patch- seems reasonable.
PR: 12020 Submitted by: Matthew D. Fuller <fullermd@futuresouth.com>
This commit is contained in:
parent
fad2f0e686
commit
0de83b4407
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49061
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)msgs.1 8.2 (Berkeley) 4/28/95
|
||||
.\" $Id$
|
||||
.\" $Id: msgs.1,v 1.6 1999/07/12 20:23:47 nik Exp $
|
||||
.\"
|
||||
.Dd April 28, 1995
|
||||
.Dt MSGS 1
|
||||
@ -118,7 +118,16 @@ is incorrect it can be fixed by removing it;
|
||||
.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
|
||||
|
@ -42,7 +42,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: msgs.c,v 1.12 1998/07/09 14:06:54 ghelmer Exp $";
|
||||
"$Id: msgs.c,v 1.13 1998/07/14 19:07:30 ghelmer Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -246,8 +246,23 @@ int argc; char *argv[];
|
||||
* determine current message bounds
|
||||
*/
|
||||
snprintf(fname, sizeof(fname), "%s/%s", _PATH_MSGS, BOUNDS);
|
||||
if (stat(fname, &buf) < 0)
|
||||
err(errno, "%s", fname);
|
||||
|
||||
/*
|
||||
* Test access rights to the bounds file
|
||||
* This can be a little tricky. if(send_msg), then
|
||||
* we will create it. We assume that if(send_msg),
|
||||
* then you have write permission there.
|
||||
* Else, it better be there, or we bail.
|
||||
*/
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user