summaryrefslogtreecommitdiff
path: root/usr.bin/mesg
diff options
context:
space:
mode:
authorflipk <flipk@cvs.openbsd.org>1997-07-31 14:56:34 +0000
committerflipk <flipk@cvs.openbsd.org>1997-07-31 14:56:34 +0000
commitf0a5d659327a0b7946ebbded2b54c18373682030 (patch)
tree87f73240ff735e0e94c272ba3e05aa807b73ac1f /usr.bin/mesg
parentcc89395f04e3c51a73e2c7ea552ceb42197ca72c (diff)
1) minor typo in manpage
2) make proggy consistent with manpage wrt exit values
Diffstat (limited to 'usr.bin/mesg')
-rw-r--r--usr.bin/mesg/mesg.14
-rw-r--r--usr.bin/mesg/mesg.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/mesg/mesg.1 b/usr.bin/mesg/mesg.1
index 84be738fd84..093ab83298f 100644
--- a/usr.bin/mesg/mesg.1
+++ b/usr.bin/mesg/mesg.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mesg.1,v 1.3 1997/03/29 18:16:40 deraadt Exp $
+.\" $OpenBSD: mesg.1,v 1.4 1997/07/31 14:56:32 flipk Exp $
.\" $NetBSD: mesg.1,v 1.3 1994/12/23 07:16:31 jtc Exp $
.\"
.\" Copyright (c) 1987, 1990, 1993
@@ -46,7 +46,7 @@
.Sh DESCRIPTION
The
.Nm mesg
-utility is invoked by a users to control write access others
+utility is invoked by a user to control write access others
have to the terminal device associated with the standard error
output.
Write access is allowed by default, and programs such as
diff --git a/usr.bin/mesg/mesg.c b/usr.bin/mesg/mesg.c
index 35f43c3e677..a6d6dd53b6a 100644
--- a/usr.bin/mesg/mesg.c
+++ b/usr.bin/mesg/mesg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mesg.c,v 1.3 1997/01/15 23:42:53 millert Exp $ */
+/* $OpenBSD: mesg.c,v 1.4 1997/07/31 14:56:33 flipk Exp $ */
/* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */
/*
@@ -49,7 +49,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mesg.c 8.2 (Berkeley) 1/21/94";
#endif
-static char rcsid[] = "$OpenBSD: mesg.c,v 1.3 1997/01/15 23:42:53 millert Exp $";
+static char rcsid[] = "$OpenBSD: mesg.c,v 1.4 1997/07/31 14:56:33 flipk Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -81,9 +81,9 @@ main(argc, argv)
argv += optind;
if ((tty = ttyname(STDERR_FILENO)) == NULL)
- err(1, "ttyname");
+ err(2, "ttyname");
if (stat(tty, &sb) < 0)
- err(1, "%s", tty);
+ err(2, "%s", tty);
if (*argv == NULL) {
if (sb.st_mode & S_IWGRP) {
@@ -97,11 +97,11 @@ main(argc, argv)
switch (*argv[0]) {
case 'y':
if (chmod(tty, sb.st_mode | S_IWGRP) < 0)
- err(1, "%s", tty);
+ err(2, "%s", tty);
exit(0);
case 'n':
if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0)
- err(1, "%s", tty);
+ err(2, "%s", tty);
exit(1);
}