Home
last modified time | relevance | path

Searched refs:tty (Results 1 – 25 of 320) sorted by relevance

12345678910>>...13

/freebsd-12.1/lib/libc/gen/
H A Dgetttyent.c62 tty += 5; in getttynam()
157 tty.ty_name = p; in getttyent()
158 tty.ty_status = 0; in getttyent()
159 tty.ty_window = NULL; in getttyent()
164 tty.ty_getty = tty.ty_type = NULL; in getttyent()
168 tty.ty_type = NULL; in getttyent()
185 tty.ty_status |= auto_tty_status(tty.ty_name); in getttyent()
187 tty.ty_status |= auto_exists_status(tty.ty_name); in getttyent()
207 tty.ty_comment = p; in getttyent()
209 tty.ty_comment = 0; in getttyent()
[all …]
/freebsd-12.1/sys/sys/
H A Dttydisc.h43 struct tty;
47 void ttydisc_open(struct tty *tp);
48 void ttydisc_close(struct tty *tp);
51 void ttydisc_optimize(struct tty *tp);
54 void ttydisc_modem(struct tty *tp, int open);
56 int ttydisc_rint(struct tty *tp, char c, int flags);
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 Dtty.h63 struct tty { struct
168 void tty_rel_gone(struct tty *tp);
189 int tty_wait(struct tty *tp, struct cv *cv);
192 void tty_wakeup(struct tty *tp, int flags);
195 int tty_checkoutq(struct tty *tp);
196 int tty_putchar(struct tty *tp, char c);
204 void tty_flush(struct tty *tp, int flags);
205 void tty_hiwat_in_block(struct tty *tp);
206 void tty_hiwat_in_unblock(struct tty *tp);
207 dev_t tty_udev(struct tty *tp);
[all …]
H A Dttydevsw.h45 typedef int tsw_open_t(struct tty *tp);
46 typedef void tsw_close_t(struct tty *tp);
47 typedef void tsw_outwakeup_t(struct tty *tp);
48 typedef void tsw_inwakeup_t(struct tty *tp);
59 typedef bool tsw_busy_t(struct tty *tp);
86 ttydevsw_open(struct tty *tp) in ttydevsw_open()
96 ttydevsw_close(struct tty *tp) in ttydevsw_close()
106 ttydevsw_outwakeup(struct tty *tp) in ttydevsw_outwakeup()
120 ttydevsw_inwakeup(struct tty *tp) in ttydevsw_inwakeup()
193 ttydevsw_free(struct tty *tp) in ttydevsw_free()
[all …]
H A Dttyhook.h38 struct tty;
47 typedef void th_rint_done_t(struct tty *tp);
48 typedef size_t th_rint_poll_t(struct tty *tp);
52 typedef size_t th_getc_poll_t(struct tty *tp);
54 typedef void th_close_t(struct tty *tp);
73 void ttyhook_unregister(struct tty *);
79 ttyhook_rint(struct tty *tp, char c, int flags) in ttyhook_rint()
97 ttyhook_rint_done(struct tty *tp) in ttyhook_rint_done()
106 ttyhook_rint_poll(struct tty *tp) in ttyhook_rint_poll()
133 ttyhook_getc_poll(struct tty *tp) in ttyhook_getc_poll()
[all …]
/freebsd-12.1/crypto/openssh/
H A Dsshpty.c86 pty_release(const char *tty) in pty_release() argument
89 if (chown(tty, (uid_t) 0, (gid_t) 0) < 0) in pty_release()
91 if (chmod(tty, (mode_t) 0666) < 0) in pty_release()
133 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
182 if (stat(tty, &st)) in pty_setowner()
183 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner()
187 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner()
191 if (chown(tty, pw->pw_uid, gid) < 0) { in pty_setowner()
195 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
199 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
[all …]
/freebsd-12.1/contrib/less/
H A Dttyin.c26 public int tty; variable
45 GetConsoleMode((HANDLE)tty, &console_mode); in open_getchr()
57 tty = open("CON", OPEN_READ); in open_getchr()
74 tty = __open("/dev/tty", OPEN_READ); in open_getchr()
76 tty = open("/dev/tty", OPEN_READ); in open_getchr()
78 if (tty < 0) in open_getchr()
79 tty = 2; in open_getchr()
91 SetConsoleMode((HANDLE)tty, console_mode); in close_getchr()
92 CloseHandle((HANDLE)tty); in close_getchr()
115 c = WIN32getch(tty); in getchr()
[all …]
/freebsd-12.1/libexec/rc/rc.d/
H A Dserial69 stty < /dev/tty${dc}${i}.init reprint undef
72 stty < /dev/tty${dc}${i}.lock clocal
75 stty < /dev/tty${dc}${i}.lock 300
88 comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180
91 stty < /dev/tty${dc}${i}.init crtscts 115200
92 stty < /dev/tty${dc}${i}.lock crtscts
107 stty < /dev/tty${dc}${i}.init clocal -hupcl 1200
108 stty < /dev/tty${dc}${i}.lock clocal hupcl
127 comcontrol /dev/tty${dc}${i} dtrwait 0
128 stty < /dev/tty${dc}${i}.init 115200
[all …]
/freebsd-12.1/usr.bin/mesg/
H A Dmesg.c66 char *tty; in main() local
78 if ((tty = ttyname(STDIN_FILENO)) == NULL && in main()
79 (tty = ttyname(STDOUT_FILENO)) == NULL && in main()
80 (tty = ttyname(STDERR_FILENO)) == NULL) in main()
82 if (stat(tty, &sb) < 0) in main()
83 err(2, "%s", tty); in main()
96 if (chmod(tty, sb.st_mode | S_IWGRP) < 0) in main()
97 err(2, "%s", tty); in main()
100 if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) in main()
101 err(2, "%s", tty); in main()
/freebsd-12.1/bin/pkill/tests/
H A Dpkill-t_test.sh9 tty=`ps -x -o tty -p $$ | tail -1`
10 if [ "$tty" = "??" -o "$tty" = "-" ]; then
11 tty="-"
14 case $tty in
15 pts/*) ttyshort=`echo $tty | cut -c 5-` ;;
16 *) ttyshort=`echo $tty | cut -c 4-` ;;
23 pkill -f -t $tty $sleep
H A Dpgrep-t_test.sh9 tty=`ps -x -o tty -p $$ | tail -1`
10 if [ "$tty" = "??" -o "$tty" = "-" ]; then
11 tty="-"
14 case $tty in
15 pts/*) ttyshort=`echo $tty | cut -c 5-` ;;
16 *) ttyshort=`echo $tty | cut -c 4-` ;;
24 pid=`pgrep -f -t $tty $sleep`
/freebsd-12.1/contrib/tcsh/
H A Dsh.file.c184 tty_normal = tty; in back_to_col_1()
185 tty.c_iflag &= ~INLCR; in back_to_col_1()
186 tty.c_oflag &= ~ONLCR; in back_to_col_1()
200 tty_normal = tty; in back_to_col_1()
201 tty.sg_flags &= ~CRMOD; in back_to_col_1()
236 tty_normal = tty; in pushback()
263 tty_normal = tty; in pushback()
264 tty.sg_flags &= ~ECHO; in pushback()
388 struct termios tty; in retype() local
392 struct termio tty; in retype()
[all …]
/freebsd-12.1/lib/libpam/modules/pam_securetty/
H A Dpam_securetty.c63 const void *tty; in pam_sm_acct_mgmt() local
78 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt()
82 PAM_LOG("Got TTY: %s", (const char *)tty); in pam_sm_acct_mgmt()
85 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { in pam_sm_acct_mgmt()
87 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; in pam_sm_acct_mgmt()
90 if (tty != NULL && (ty = getttynam(tty)) != NULL && in pam_sm_acct_mgmt()
/freebsd-12.1/crypto/heimdal/appl/login/
H A Dread_string.c56 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-12.1/usr.bin/write/
H A Dwrite.c89 char tty[MAXPATHLEN], *mytty; in main() local
170 do_write(devfd, tty, mytty, login); in main()
202 utmp_chk(char *user, char *tty) in utmp_chk() argument
206 strncpy(lu.ut_line, tty, sizeof lu.ut_line); in utmp_chk()
254 (void)strlcpy(tty, u->ut_line, MAXPATHLEN); in search_utmp()
263 (void)strlcpy(tty, mytty, MAXPATHLEN); in search_utmp()
281 if (fstatat(devfd, tty, &s, 0) < 0) { in term_chk()
283 warn("%s%s", _PATH_DEV, tty); in term_chk()
303 fd = openat(devfd, tty, O_WRONLY); in do_write()
305 err(1, "openat(%s%s)", _PATH_DEV, tty); in do_write()
[all …]
/freebsd-12.1/contrib/ncurses/ncurses/trace/
H A Dlib_tracebits.c100 _nc_trace_ttymode(TTY * tty) in _nc_trace_ttymode() argument
167 if (tty->c_iflag & ALLIN) in _nc_trace_ttymode()
168 lookup_bits(buf, iflags, "iflags", tty->c_iflag); in _nc_trace_ttymode()
170 if (tty->c_oflag & ALLOUT) in _nc_trace_ttymode()
171 lookup_bits(buf, oflags, "oflags", tty->c_oflag); in _nc_trace_ttymode()
173 if (tty->c_cflag & ALLCTRL) in _nc_trace_ttymode()
174 lookup_bits(buf, cflags, "cflags", tty->c_cflag); in _nc_trace_ttymode()
193 int value = (int) (tty->c_cflag & CSIZE); in _nc_trace_ttymode()
208 if (tty->c_lflag & ALLLOCAL) in _nc_trace_ttymode()
209 lookup_bits(buf, lflags, "lflags", tty->c_lflag); in _nc_trace_ttymode()
[all …]
/freebsd-12.1/usr.sbin/bhyve/
H A Duart_emul.c124 struct ttyfd tty; member
187 if (sc->tty.opened) { in rxfifo_reset()
228 if (sc->tty.opened) { in rxfifo_putchar()
256 if (sc->tty.opened) { in rxfifo_getchar()
278 ttyopen(&sc->tty); in uart_opentty()
376 assert(fd == sc->tty.rfd); in uart_drain()
387 (void) ttyread(&sc->tty); in uart_drain()
646 sc->tty.rfd = STDIN_FILENO; in uart_stdio_backend()
648 sc->tty.opened = true; in uart_stdio_backend()
681 sc->tty.rfd = sc->tty.wfd = fd; in uart_tty_backend()
[all …]
/freebsd-12.1/contrib/gdb/gdb/
H A Dinflow.c518 int tty; in new_tty() local
528 if (tty > 0) in new_tty()
546 if (tty == -1) in new_tty()
553 if (tty != 0) in new_tty()
556 dup (tty); in new_tty()
558 if (tty != 1) in new_tty()
561 dup (tty); in new_tty()
563 if (tty != 2) in new_tty()
566 dup (tty); in new_tty()
568 if (tty > 2) in new_tty()
[all …]
/freebsd-12.1/lib/libpam/modules/pam_login_access/
H A Dpam_login_access.c61 const void *rhost, *tty, *user; in pam_sm_acct_mgmt() local
78 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt()
91 } else if (tty != NULL && *(const char *)tty != '\0') { in pam_sm_acct_mgmt()
93 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt()
94 if (login_access(user, tty) != 0) in pam_sm_acct_mgmt()
97 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt()
/freebsd-12.1/sys/kern/
H A Dtty.c268 struct tty *tp; in ttydev_open()
791 struct tty *tp; in ttyil_open()
1020 struct tty *
1027 struct tty *
1030 struct tty *tp; in tty_alloc_mutex()
1082 struct tty *tp = arg; in tty_dealloc()
1217 struct tty *tp; in sysctl_kern_ttys()
1973 struct tty *tp; in ttyhook_register()
2070 struct tty *tp; in ttyconsdev_open()
2250 struct tty *tp; in DB_SHOW_COMMAND()
[all …]
H A Dtty_ttydisc.c87 ttydisc_open(struct tty *tp) in ttydisc_open()
93 ttydisc_close(struct tty *tp) in ttydisc_close()
574 ttydisc_optimize(struct tty *tp) in ttydisc_optimize()
682 struct tty *tp = d; in ttydisc_reprint_char()
688 ttydisc_reprint(struct tty *tp) in ttydisc_reprint()
703 struct tty *tp;
711 struct tty *tp = data->tp; in ttydisc_recalc_charlength()
734 ttydisc_rubchar(struct tty *tp) in ttydisc_rubchar()
807 ttydisc_rubword(struct tty *tp) in ttydisc_rubword()
1106 ttydisc_rint_done(struct tty *tp) in ttydisc_rint_done()
[all …]
/freebsd-12.1/contrib/opie/
H A Dopielogin.c358 char *tty; variable
362 if (tty == NULL)
363 tty = ttyn;
365 tty++;
651 char *tty, host[256]; variable
1003 tty = ttyname(0);
1005 if (tty == (char *) 0 || *tty == '\0')
1111 name, tty, host);
1114 name, tty);
1298 chmod(tty, 0622);
[all …]
/freebsd-12.1/usr.sbin/pstat/
H A Dpstat.c236 TAILQ_HEAD(, tty) tl; in ttymode_kvm()
237 struct tty *tp, tty; in ttymode_kvm() local
247 if (kvm_read(kd, (u_long)tp, &tty, sizeof tty) != sizeof tty) in ttymode_kvm()
250 xt.xt_incc = tty.t_inq.ti_linestart - tty.t_inq.ti_begin; in ttymode_kvm()
251 xt.xt_inlc = tty.t_inq.ti_end - tty.t_inq.ti_linestart; in ttymode_kvm()
252 xt.xt_inlow = tty.t_inlow; in ttymode_kvm()
254 xt.xt_outcc = tty.t_outq.to_end - tty.t_outq.to_begin; in ttymode_kvm()
255 xt.xt_outlow = tty.t_outlow; in ttymode_kvm()
256 xt.xt_column = tty.t_column; in ttymode_kvm()
259 xt.xt_flags = tty.t_flags; in ttymode_kvm()
[all …]
/freebsd-12.1/sys/dev/cx/
H A Dif_cx.c134 struct tty *tty; member
300 if (d->atimeout == 1 && d->tty && d->tty->t_state & TS_BUSY) { in cx_timeout()
858 d->tty->t_sc = d; in cx_attach()
941 if (d->tty) { in cx_detach()
943 d->tty = NULL; in cx_detach()
1350 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
1366 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
1384 && (!CONDITION((&d->tty->t_termios), (d->tty)))) { in cx_error()
1420 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
2220 if (d->tty) in cx_carrier()
[all …]
/freebsd-12.1/usr.bin/who/
H A Dwho.c167 char buf[80], tty[PATH_MAX]; in row() local
180 snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ut->ut_line); in row()
181 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()

12345678910>>...13