Deleted Added
full compact
write.c (19190) write.c (19193)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Jef Poskanzer and Craig Leres of the Lawrence Berkeley Laboratory.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 90 unchanged lines hidden (view full) ---

99 /* check args */
100 switch (argc) {
101 case 2:
102 search_utmp(argv[1], tty, mytty, myuid);
103 do_write(tty, mytty, myuid);
104 break;
105 case 3:
106 if (!strncmp(argv[2], _PATH_DEV, strlen(_PATH_DEV)))
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Jef Poskanzer and Craig Leres of the Lawrence Berkeley Laboratory.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 90 unchanged lines hidden (view full) ---

99 /* check args */
100 switch (argc) {
101 case 2:
102 search_utmp(argv[1], tty, mytty, myuid);
103 do_write(tty, mytty, myuid);
104 break;
105 case 3:
106 if (!strncmp(argv[2], _PATH_DEV, strlen(_PATH_DEV)))
107 argv[2] += 5;
107 argv[2] += strlen(_PATH_DEV);
108 if (utmp_chk(argv[1], argv[2])) {
109 (void)fprintf(stderr,
110 "write: %s is not logged in on %s.\n",
111 argv[1], argv[2]);
112 exit(1);
113 }
114 if (term_chk(argv[2], &msgsok, &atime, 1))
115 exit(1);

--- 216 unchanged lines hidden ---
108 if (utmp_chk(argv[1], argv[2])) {
109 (void)fprintf(stderr,
110 "write: %s is not logged in on %s.\n",
111 argv[1], argv[2]);
112 exit(1);
113 }
114 if (term_chk(argv[2], &msgsok, &atime, 1))
115 exit(1);

--- 216 unchanged lines hidden ---