Lines Matching defs:tty
89 char tty[MAXPATHLEN], *mytty;
156 errx(1, "can't find your tty");
158 errx(1, "can't find your tty's name");
169 search_utmp(devfd, argv[0], tty, mytty, myuid);
170 do_write(devfd, tty, mytty, login);
193 (void)fprintf(stderr, "usage: write user [tty]\n");
199 * the given tty
202 utmp_chk(char *user, char *tty)
206 strncpy(lu.ut_line, tty, sizeof lu.ut_line);
229 search_utmp(int devfd, char *user, char *tty, char *mytty, uid_t myuid)
254 (void)strlcpy(tty, u->ut_line, MAXPATHLEN);
263 (void)strlcpy(tty, mytty, MAXPATHLEN);
268 warnx("%s is logged in more than once; writing to %s", user, tty);
277 term_chk(int devfd, char *tty, int *msgsokP, time_t *atimeP, int showerror)
281 if (fstatat(devfd, tty, &s, 0) < 0) {
283 warn("%s%s", _PATH_DEV, tty);
295 do_write(int devfd, char *tty, char *mytty, const char *login)
303 fd = openat(devfd, tty, O_WRONLY);
305 err(1, "openat(%s%s)", _PATH_DEV, tty);
309 err(1, "%s%s", _PATH_DEV, tty);