=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mesg/mesg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/mesg/mesg.c 1997/01/15 23:42:53 1.3 --- src/usr.bin/mesg/mesg.c 1997/07/31 14:56:33 1.4 *************** *** 1,4 **** ! /* $OpenBSD: mesg.c,v 1.3 1997/01/15 23:42:53 millert Exp $ */ /* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */ /* --- 1,4 ---- ! /* $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,55 **** #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 $"; #endif /* not lint */ #include --- 49,55 ---- #if 0 static char sccsid[] = "@(#)mesg.c 8.2 (Berkeley) 1/21/94"; #endif ! static char rcsid[] = "$OpenBSD: mesg.c,v 1.4 1997/07/31 14:56:33 flipk Exp $"; #endif /* not lint */ #include *************** *** 81,89 **** argv += optind; if ((tty = ttyname(STDERR_FILENO)) == NULL) ! err(1, "ttyname"); if (stat(tty, &sb) < 0) ! err(1, "%s", tty); if (*argv == NULL) { if (sb.st_mode & S_IWGRP) { --- 81,89 ---- argv += optind; if ((tty = ttyname(STDERR_FILENO)) == NULL) ! err(2, "ttyname"); if (stat(tty, &sb) < 0) ! err(2, "%s", tty); if (*argv == NULL) { if (sb.st_mode & S_IWGRP) { *************** *** 97,107 **** switch (*argv[0]) { case 'y': if (chmod(tty, sb.st_mode | S_IWGRP) < 0) ! err(1, "%s", tty); exit(0); case 'n': if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) ! err(1, "%s", tty); exit(1); } --- 97,107 ---- switch (*argv[0]) { case 'y': if (chmod(tty, sb.st_mode | S_IWGRP) < 0) ! err(2, "%s", tty); exit(0); case 'n': if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) ! err(2, "%s", tty); exit(1); }