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