Lines Matching refs:tty
165 char buf[80], tty[PATH_MAX];
178 snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ut->ut_line);
179 if (stat(tty, &sb) == 0) {
268 const char *name, *tty;
270 if ((tty = ttyname(STDIN_FILENO)) == NULL)
271 tty = "tty??";
272 else if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0)
273 tty += sizeof _PATH_DEV - 1;
274 strlcpy(ut.ut_line, tty, sizeof ut.ut_line);
276 /* Search utmp for our tty, dump first matching record. */