/freebsd/lib/libc/gen/ |
H A D | getttyent.c | 58 tty += 5; in getttynam() 153 tty.ty_name = p; in getttyent() 154 tty.ty_status = 0; in getttyent() 155 tty.ty_window = NULL; in getttyent() 160 tty.ty_getty = tty.ty_type = NULL; in getttyent() 164 tty.ty_type = NULL; in getttyent() 181 tty.ty_status |= auto_tty_status(tty.ty_name); in getttyent() 183 tty.ty_status |= auto_exists_status(tty.ty_name); in getttyent() 203 tty.ty_comment = p; in getttyent() 205 tty.ty_comment = 0; in getttyent() [all …]
|
/freebsd/sys/sys/ |
H A D | ttydisc.h | 41 struct tty; 45 void ttydisc_open(struct tty *tp); 46 void ttydisc_close(struct tty *tp); 47 size_t ttydisc_bytesavail(struct tty *tp); 50 void ttydisc_canonicalize(struct tty *tp); 51 void ttydisc_optimize(struct tty *tp); 59 void ttydisc_rint_done(struct tty *tp); 60 size_t ttydisc_rint_poll(struct tty *tp); 63 size_t ttydisc_getc_poll(struct tty *tp); 72 ttydisc_read_poll(struct tty *tp) in ttydisc_read_poll() [all …]
|
H A D | tty.h | 61 struct tty { struct 169 void tty_rel_gone(struct tty *tp); 193 int tty_wait(struct tty *tp, struct cv *cv); 196 void tty_wakeup(struct tty *tp, int flags); 199 int tty_checkoutq(struct tty *tp); 200 int tty_putchar(struct tty *tp, char c); 209 void tty_flush(struct tty *tp, int flags); 210 void tty_hiwat_in_block(struct tty *tp); 211 void tty_hiwat_in_unblock(struct tty *tp); 212 dev_t tty_udev(struct tty *tp); [all …]
|
H A D | ttydevsw.h | 43 typedef int tsw_open_t(struct tty *tp); 44 typedef void tsw_close_t(struct tty *tp); 45 typedef void tsw_outwakeup_t(struct tty *tp); 46 typedef void tsw_inwakeup_t(struct tty *tp); 57 typedef bool tsw_busy_t(struct tty *tp); 84 ttydevsw_open(struct tty *tp) in ttydevsw_open() 94 ttydevsw_close(struct tty *tp) in ttydevsw_close() 104 ttydevsw_outwakeup(struct tty *tp) in ttydevsw_outwakeup() 118 ttydevsw_inwakeup(struct tty *tp) in ttydevsw_inwakeup() 191 ttydevsw_free(struct tty *tp) in ttydevsw_free() [all …]
|
H A D | ttyhook.h | 36 struct tty; 45 typedef void th_rint_done_t(struct tty *tp); 46 typedef size_t th_rint_poll_t(struct tty *tp); 50 typedef size_t th_getc_poll_t(struct tty *tp); 52 typedef void th_close_t(struct tty *tp); 71 void ttyhook_unregister(struct tty *); 77 ttyhook_rint(struct tty *tp, char c, int flags) in ttyhook_rint() 95 ttyhook_rint_done(struct tty *tp) in ttyhook_rint_done() 104 ttyhook_rint_poll(struct tty *tp) in ttyhook_rint_poll() 131 ttyhook_getc_poll(struct tty *tp) in ttyhook_getc_poll() [all …]
|
/freebsd/crypto/openssh/ |
H A D | sshpty.c | 87 pty_release(const char *tty) in pty_release() argument 90 if (chown(tty, (uid_t) 0, (gid_t) 0) == -1) in pty_release() 92 if (chmod(tty, (mode_t) 0666) == -1) in pty_release() 134 fd = open(tty, O_RDWR); in pty_make_controlling_tty() 185 if (stat(tty, &st) == -1) in pty_setowner() 186 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner() 190 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner() 194 if (chown(tty, pw->pw_uid, gid) == -1) { in pty_setowner() 198 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner() 202 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner() [all …]
|
/freebsd/usr.bin/mesg/ |
H A D | mesg.c | 52 char *tty; in main() local 64 if ((tty = ttyname(STDIN_FILENO)) == NULL && in main() 65 (tty = ttyname(STDOUT_FILENO)) == NULL && in main() 66 (tty = ttyname(STDERR_FILENO)) == NULL) in main() 68 if (stat(tty, &sb) < 0) in main() 69 err(2, "%s", tty); in main() 82 if (chmod(tty, sb.st_mode | S_IWGRP) < 0) in main() 83 err(2, "%s", tty); in main() 86 if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) in main() 87 err(2, "%s", tty); in main()
|
/freebsd/libexec/rc/rc.d/ |
H A D | serial | 68 stty < /dev/tty${dc}${i}.init reprint undef 71 stty < /dev/tty${dc}${i}.lock clocal 74 stty < /dev/tty${dc}${i}.lock 300 87 comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180 90 stty < /dev/tty${dc}${i}.init crtscts 115200 91 stty < /dev/tty${dc}${i}.lock crtscts 106 stty < /dev/tty${dc}${i}.init clocal -hupcl 1200 107 stty < /dev/tty${dc}${i}.lock clocal hupcl 126 comcontrol /dev/tty${dc}${i} dtrwait 0 127 stty < /dev/tty${dc}${i}.init 115200 [all …]
|
/freebsd/bin/pkill/tests/ |
H A D | pkill-t_test.sh | 8 tty=`ps -x -o tty -p $$ | tail -1` 9 if [ "$tty" = "??" -o "$tty" = "-" ]; then 10 tty="-" 13 case $tty in 14 pts/*) ttyshort=`echo $tty | cut -c 5-` ;; 15 *) ttyshort=`echo $tty | cut -c 4-` ;; 22 pkill -f -t $tty $sleep
|
H A D | pgrep-t_test.sh | 8 tty=`ps -x -o tty -p $$ | tail -1` 9 if [ "$tty" = "??" -o "$tty" = "-" ]; then 10 tty="-" 13 case $tty in 14 pts/*) ttyshort=`echo $tty | cut -c 5-` ;; 15 *) ttyshort=`echo $tty | cut -c 4-` ;; 23 pid=`pgrep -f -t $tty $sleep`
|
/freebsd/usr.sbin/bhyve/ |
H A D | uart_backend.c | 67 struct ttyfd tty; member 137 if (sc->tty.opened) { in uart_rxfifo_getchar() 166 if (sc->tty.opened) { in rxfifo_putchar() 185 (void)ttyread(&sc->tty); in uart_rxfifo_drain() 199 ttywrite(&sc->tty, ch); in uart_rxfifo_putchar() 219 if (sc->tty.opened) { in uart_rxfifo_reset() 273 sc->tty.rfd = STDIN_FILENO; in uart_stdio_backend() 275 sc->tty.opened = true; in uart_stdio_backend() 313 sc->tty.rfd = sc->tty.wfd = fd; in uart_tty_backend() 314 sc->tty.opened = true; in uart_tty_backend() [all …]
|
/freebsd/lib/libpam/modules/pam_securetty/ |
H A D | pam_securetty.c | 60 const void *tty; in pam_sm_acct_mgmt() local 75 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt() 79 PAM_LOG("Got TTY: %s", (const char *)tty); in pam_sm_acct_mgmt() 82 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { in pam_sm_acct_mgmt() 84 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; in pam_sm_acct_mgmt() 87 if (tty != NULL && (ty = getttynam(tty)) != NULL && in pam_sm_acct_mgmt()
|
/freebsd/contrib/tcsh/ |
H A D | sh.file.c | 181 tty_normal = tty; in back_to_col_1() 182 tty.c_iflag &= ~INLCR; in back_to_col_1() 183 tty.c_oflag &= ~ONLCR; in back_to_col_1() 197 tty_normal = tty; in back_to_col_1() 198 tty.sg_flags &= ~CRMOD; in back_to_col_1() 233 tty_normal = tty; in pushback() 260 tty_normal = tty; in pushback() 261 tty.sg_flags &= ~ECHO; in pushback() 385 struct termios tty; in retype() local 389 struct termio tty; in retype() [all …]
|
/freebsd/crypto/heimdal/appl/login/ |
H A D | read_string.c | 56 FILE *tty; in read_string() local 76 if((tty = fopen("/dev/tty", "r")) == NULL) in read_string() 77 tty = stdin; in read_string() 83 tcgetattr(fileno(tty), &t_old); in read_string() 86 tcsetattr(fileno(tty), TCSANOW, &t_new); in read_string() 91 c = getc(tty); in read_string() 93 if(!ferror(tty)) in read_string() 109 tcsetattr(fileno(tty), TCSANOW, &t_old); in read_string() 112 if(tty != stdin) in read_string() 113 fclose(tty); in read_string()
|
/freebsd/contrib/less/ |
H A D | ttyin.c | 27 public HANDLE tty; variable 29 public int tty; variable 89 tty = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, in open_getchr() 92 GetConsoleMode(tty, &console_mode); in open_getchr() 94 SetConsoleMode(tty, ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT); in open_getchr() 104 tty = open("CON", OPEN_READ); in open_getchr() 113 tty = open_tty(); in open_getchr() 124 SetConsoleMode(tty, console_mode); in close_getchr() 125 CloseHandle(tty); in close_getchr() 138 SetConsoleMode(tty, ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT); in pclose() [all …]
|
/freebsd/usr.bin/write/ |
H A D | write.c | 74 char tty[MAXPATHLEN], *mytty; in main() local 155 do_write(devfd, tty, mytty, login); in main() 187 utmp_chk(char *user, char *tty) in utmp_chk() argument 191 strncpy(lu.ut_line, tty, sizeof lu.ut_line); in utmp_chk() 239 (void)strlcpy(tty, u->ut_line, MAXPATHLEN); in search_utmp() 248 (void)strlcpy(tty, mytty, MAXPATHLEN); in search_utmp() 266 if (fstatat(devfd, tty, &s, 0) < 0) { in term_chk() 268 warn("%s%s", _PATH_DEV, tty); in term_chk() 288 fd = openat(devfd, tty, O_WRONLY); in do_write() 290 err(1, "openat(%s%s)", _PATH_DEV, tty); in do_write() [all …]
|
/freebsd/contrib/ncurses/ncurses/trace/ |
H A D | lib_tracebits.c | 107 _nc_trace_ttymode(const TTY * tty) in _nc_trace_ttymode() argument 177 if (tty->c_iflag & ALLIN) in _nc_trace_ttymode() 178 lookup_bits(buf, iflags, "iflags", tty->c_iflag); in _nc_trace_ttymode() 180 if (tty->c_oflag & ALLOUT) in _nc_trace_ttymode() 181 lookup_bits(buf, oflags, "oflags", tty->c_oflag); in _nc_trace_ttymode() 183 if (tty->c_cflag & ALLCTRL) in _nc_trace_ttymode() 184 lookup_bits(buf, cflags, "cflags", tty->c_cflag); in _nc_trace_ttymode() 203 int value = (int) (tty->c_cflag & CSIZE); in _nc_trace_ttymode() 218 if (tty->c_lflag & ALLLOCAL) in _nc_trace_ttymode() 248 lookup_bits(buf, dwFlagsIn, "dwIn", tty->dwFlagIn); in _nc_trace_ttymode() [all …]
|
/freebsd/lib/libpam/modules/pam_login_access/ |
H A D | pam_login_access.c | 72 const void *rhost, *tty, *user; in pam_sm_acct_mgmt() local 89 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt() 110 } else if (tty != NULL && *(const char *)tty != '\0') { in pam_sm_acct_mgmt() 112 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt() 113 if (login_access(user, tty, &login_access_opts) != 0) in pam_sm_acct_mgmt() 116 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt()
|
/freebsd/usr.sbin/pstat/ |
H A D | pstat.c | 224 TAILQ_HEAD(, tty) tl; in ttymode_kvm() 225 struct tty *tp, tty; in ttymode_kvm() local 235 if (kvm_read(kd, (u_long)tp, &tty, sizeof tty) != sizeof tty) in ttymode_kvm() 238 xt.xt_incc = tty.t_inq.ti_linestart - tty.t_inq.ti_begin; in ttymode_kvm() 239 xt.xt_inlc = tty.t_inq.ti_end - tty.t_inq.ti_linestart; in ttymode_kvm() 240 xt.xt_inlow = tty.t_inlow; in ttymode_kvm() 242 xt.xt_outcc = tty.t_outq.to_end - tty.t_outq.to_begin; in ttymode_kvm() 243 xt.xt_outlow = tty.t_outlow; in ttymode_kvm() 244 xt.xt_column = tty.t_column; in ttymode_kvm() 247 xt.xt_flags = tty.t_flags; in ttymode_kvm() [all …]
|
/freebsd/sys/kern/ |
H A D | tty.c | 272 struct tty *tp; in ttydev_open() 818 struct tty *tp; in ttyil_open() 1047 struct tty * 1054 struct tty * 1057 struct tty *tp; in tty_alloc_mutex() 1111 struct tty *tp = arg; in tty_dealloc() 1316 struct tty *tp; in sysctl_kern_ttys() 2104 struct tty *tp; in ttyhook_register() 2210 struct tty *tp; in ttyconsdev_open() 2390 struct tty *tp; in DB_SHOW_COMMAND() [all …]
|
H A D | tty_ttydisc.c | 92 ttydisc_open(struct tty *tp) in ttydisc_open() 98 ttydisc_close(struct tty *tp) in ttydisc_close() 141 ttydisc_bytesavail(struct tty *tp) in ttydisc_bytesavail() 670 ttydisc_optimize(struct tty *tp) in ttydisc_optimize() 781 struct tty *tp = d; in ttydisc_reprint_char() 787 ttydisc_reprint(struct tty *tp) in ttydisc_reprint() 802 struct tty *tp; 810 struct tty *tp = data->tp; in ttydisc_recalc_charlength() 833 ttydisc_rubchar(struct tty *tp) in ttydisc_rubchar() 980 ttydisc_rubword(struct tty *tp) in ttydisc_rubword() [all …]
|
/freebsd/usr.bin/who/ |
H A D | who.c | 164 char buf[80], tty[PATH_MAX]; in row() local 177 snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ut->ut_line); in row() 178 if (stat(tty, &sb) == 0) { in row() 270 const char *name, *tty; in whoami() local 272 if ((tty = ttyname(STDIN_FILENO)) == NULL) in whoami() 273 tty = "tty??"; in whoami() 274 else if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) in whoami() 275 tty += sizeof _PATH_DEV - 1; in whoami() 276 strlcpy(ut.ut_line, tty, sizeof ut.ut_line); in whoami()
|
/freebsd/lib/libutil/ |
H A D | login_ok.c | 125 login_ttyok(login_cap_t *lc, const char *tty, const char *allowcap, in login_ttyok() argument 130 if (lc != NULL && tty != NULL && *tty != '\0') { in login_ttyok() 135 te = getttynam(tty); /* Need group name */ in login_ttyok() 139 if (ttl != NULL && !login_str2inlist(ttl, tty, grp, 0)) in login_ttyok() 144 if (ttl != NULL && login_str2inlist(ttl, tty, grp, 0)) in login_ttyok() 160 auth_ttyok(login_cap_t *lc, const char * tty) in auth_ttyok() argument 162 return login_ttyok(lc, tty, "ttys.allow", "ttys.deny"); in auth_ttyok()
|
/freebsd/usr.bin/killall/ |
H A D | killall.c | 103 char *tty = NULL; in main() local 181 tty = *av; in main() 252 if (tty) { in main() 253 if (strncmp(tty, "/dev/", 5) == 0) in main() 254 snprintf(buf, sizeof(buf), "%s", tty); in main() 255 else if (strncmp(tty, "tty", 3) == 0 || in main() 256 strncmp(tty, "pts/", 4) == 0) in main() 257 snprintf(buf, sizeof(buf), "/dev/%s", tty); in main() 259 snprintf(buf, sizeof(buf), "/dev/tty%s", tty); in main() 296 } else if (tty) { in main() [all …]
|
/freebsd/lib/libpam/modules/pam_lastlog/ |
H A D | pam_lastlog.c | 73 const void *rhost, *tty; in pam_sm_open_session() local 89 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_open_session() 94 if (tty == NULL) { in pam_sm_open_session() 100 if (strncmp(tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) in pam_sm_open_session() 101 tty = (const char *)tty + sizeof(_PATH_DEV) - 1; in pam_sm_open_session() 138 strncpy(utl.ut_line, tty, sizeof utl.ut_line); in pam_sm_open_session()
|