Lines Matching refs:typ
867 struct ttyent *typ; in single_user() local
906 typ = getttynam("console"); in single_user()
908 if (typ && (typ->ty_status & TTY_SECURE) == 0 && in single_user()
1308 new_session(session_t *sprev, struct ttyent *typ) in new_session() argument
1312 if ((typ->ty_status & TTY_ON) == 0 || in new_session()
1313 typ->ty_name == 0 || in new_session()
1314 typ->ty_getty == 0) in new_session()
1321 if ((typ->ty_status & TTY_IFEXISTS) != 0) in new_session()
1324 if ((typ->ty_status & TTY_IFCONSOLE) != 0) in new_session()
1327 if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0) in new_session()
1330 if (setupargv(sp, typ) == 0) { in new_session()
1351 setupargv(session_t *sp, struct ttyent *typ) in setupargv() argument
1359 if (asprintf(&sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name) < 0) in setupargv()
1377 if (typ->ty_window) { in setupargv()
1378 sp->se_window = strdup(typ->ty_window); in setupargv()
1392 sp->se_type = typ->ty_type ? strdup(typ->ty_type) : 0; in setupargv()
1403 struct ttyent *typ; in read_ttys() local
1421 while ((typ = getttyent()) != NULL) in read_ttys()
1422 if ((snext = new_session(sp, typ)) != NULL) in read_ttys()
1766 struct ttyent *typ; in clean_ttys() local
1779 while ((typ = getttyent()) != NULL) { in clean_ttys()
1781 if (strcmp(typ->ty_name, sp->se_device + devlen) == 0) in clean_ttys()
1787 if ((typ->ty_status & TTY_ON) == 0 || in clean_ttys()
1788 typ->ty_getty == 0) { in clean_ttys()
1797 if (setupargv(sp, typ) == 0) { in clean_ttys()
1826 new_session(sprev, typ); in clean_ttys()