Lines Matching refs:typ
886 struct ttyent *typ; in single_user() local
922 typ = getttynam("console"); in single_user()
924 if (typ && (typ->ty_status & TTY_SECURE) == 0 && in single_user()
1314 new_session(session_t *sprev, struct ttyent *typ) in new_session() argument
1318 if ((typ->ty_status & TTY_ON) == 0 || in new_session()
1319 typ->ty_name == 0 || in new_session()
1320 typ->ty_getty == 0) in new_session()
1327 if ((typ->ty_status & TTY_IFEXISTS) != 0) in new_session()
1330 if ((typ->ty_status & TTY_IFCONSOLE) != 0) in new_session()
1333 if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0) in new_session()
1336 if (setupargv(sp, typ) == 0) { in new_session()
1357 setupargv(session_t *sp, struct ttyent *typ) in setupargv() argument
1365 if (asprintf(&sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name) < 0) in setupargv()
1383 if (typ->ty_window) { in setupargv()
1384 sp->se_window = strdup(typ->ty_window); in setupargv()
1398 sp->se_type = typ->ty_type ? strdup(typ->ty_type) : 0; in setupargv()
1409 struct ttyent *typ; in read_ttys() local
1427 while ((typ = getttyent()) != NULL) in read_ttys()
1428 if ((snext = new_session(sp, typ)) != NULL) in read_ttys()
1710 struct ttyent *typ; in clean_ttys() local
1723 while ((typ = getttyent()) != NULL) { in clean_ttys()
1725 if (strcmp(typ->ty_name, sp->se_device + devlen) == 0) in clean_ttys()
1731 if ((typ->ty_status & TTY_ON) == 0 || in clean_ttys()
1732 typ->ty_getty == 0) { in clean_ttys()
1741 if (setupargv(sp, typ) == 0) { in clean_ttys()
1770 new_session(sprev, typ); in clean_ttys()