Home
last modified time | relevance | path

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

12345678910>>...12

/freebsd-14-stable/lib/libc/gen/
HDgetttyent.c55 getttynam(const char *tty) in getttynam() argument
59 if (strncmp(tty, "/dev/", 5) == 0) in getttynam()
60 tty += 5; in getttynam()
63 if (!strcmp(tty, t->ty_name)) in getttynam()
123 static struct ttyent tty; in getttyent() local
155 tty.ty_name = p; in getttyent()
156 tty.ty_status = 0; in getttyent()
157 tty.ty_window = NULL; in getttyent()
158 tty.ty_group = _TTYS_NOGROUP; in getttyent()
161 if (!*(tty.ty_getty = p)) in getttyent()
[all …]
/freebsd-14-stable/sys/sys/
HDttydisc.h41 struct tty;
45 void ttydisc_open(struct tty *tp);
46 void ttydisc_close(struct tty *tp);
47 size_t ttydisc_bytesavail(struct tty *tp);
48 int ttydisc_read(struct tty *tp, struct uio *uio, int ioflag);
49 int ttydisc_write(struct tty *tp, struct uio *uio, int ioflag);
50 void ttydisc_canonicalize(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);
[all …]
HDtty.h61 struct tty { struct
64 TAILQ_ENTRY(tty) t_list; /* (l) TTY list entry. */ argument
165 struct tty *tty_alloc(struct ttydevsw *tsw, void *softc);
166 struct tty *tty_alloc_mutex(struct ttydevsw *tsw, void *softc, struct mtx *mtx);
167 void tty_rel_pgrp(struct tty *tp, struct pgrp *pgrp);
168 void tty_rel_sess(struct tty *tp, struct session *sess);
169 void tty_rel_gone(struct tty *tp);
181 int tty_makedevf(struct tty *tp, struct ucred *cred, int flags,
190 void tty_signal_sessleader(struct tty *tp, int signal);
191 void tty_signal_pgrp(struct tty *tp, int signal);
[all …]
HDttydevsw.h43 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);
47 typedef int tsw_ioctl_t(struct tty *tp, u_long cmd, caddr_t data,
49 typedef int tsw_cioctl_t(struct tty *tp, int unit, u_long cmd, caddr_t data,
51 typedef int tsw_param_t(struct tty *tp, struct termios *t);
52 typedef int tsw_modem_t(struct tty *tp, int sigon, int sigoff);
53 typedef int tsw_mmap_t(struct tty *tp, vm_ooffset_t offset,
55 typedef void tsw_pktnotify_t(struct tty *tp, char event);
[all …]
HDttyhook.h36 struct tty;
43 typedef int th_rint_t(struct tty *tp, char c, int flags);
44 typedef size_t th_rint_bypass_t(struct tty *tp, const void *buf, size_t len);
45 typedef void th_rint_done_t(struct tty *tp);
46 typedef size_t th_rint_poll_t(struct tty *tp);
48 typedef size_t th_getc_inject_t(struct tty *tp, void *buf, size_t len);
49 typedef void th_getc_capture_t(struct tty *tp, const void *buf, size_t len);
50 typedef size_t th_getc_poll_t(struct tty *tp);
52 typedef void th_close_t(struct tty *tp);
69 int ttyhook_register(struct tty **, struct proc *, int,
[all …]
/freebsd-14-stable/crypto/openssh/
HDsshpty.c87 pty_release(const char *tty) in pty_release() argument
90 if (chown(tty, (uid_t) 0, (gid_t) 0) == -1) in pty_release()
91 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); in pty_release()
92 if (chmod(tty, (mode_t) 0666) == -1) in pty_release()
93 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); in pty_release()
100 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
134 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
136 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
166 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
185 if (stat(tty, &st) == -1) in pty_setowner()
[all …]
/freebsd-14-stable/usr.bin/mesg/
HDmesg.c64 char *tty; in main() local
76 if ((tty = ttyname(STDIN_FILENO)) == NULL && in main()
77 (tty = ttyname(STDOUT_FILENO)) == NULL && in main()
78 (tty = ttyname(STDERR_FILENO)) == NULL) in main()
80 if (stat(tty, &sb) < 0) in main()
81 err(2, "%s", tty); in main()
94 if (chmod(tty, sb.st_mode | S_IWGRP) < 0) in main()
95 err(2, "%s", tty); in main()
98 if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) in main()
99 err(2, "%s", tty); in main()
/freebsd-14-stable/libexec/rc/rc.d/
HDserial52 comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait
53 stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 115200 reprint ^R
54 stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0
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
[all …]
/freebsd-14-stable/usr.sbin/bhyve/
HDuart_backend.c66 struct ttyfd tty; member
135 if (sc->tty.opened) { in uart_rxfifo_getchar()
164 if (sc->tty.opened) { in rxfifo_putchar()
183 (void)ttyread(&sc->tty); in uart_rxfifo_drain()
186 ((ch = ttyread(&sc->tty)) != -1)) in uart_rxfifo_drain()
196 } else if (sc->tty.opened) { in uart_rxfifo_putchar()
197 ttywrite(&sc->tty, ch); in uart_rxfifo_putchar()
217 if (sc->tty.opened) { in uart_rxfifo_reset()
222 nread = read(sc->tty.rfd, flushbuf, sizeof(flushbuf)); in uart_rxfifo_reset()
271 sc->tty.rfd = STDIN_FILENO; in uart_stdio_backend()
[all …]
/freebsd-14-stable/lib/libpam/modules/pam_securetty/
HDpam_securetty.c61 const void *tty; in pam_sm_acct_mgmt() local
76 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt()
80 PAM_LOG("Got TTY: %s", (const char *)tty); in pam_sm_acct_mgmt()
83 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { in pam_sm_acct_mgmt()
85 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; in pam_sm_acct_mgmt()
88 if (tty != NULL && (ty = getttynam(tty)) != NULL && in pam_sm_acct_mgmt()
/freebsd-14-stable/contrib/tcsh/
HDsh.file.c164 struct termios tty, tty_normal; in back_to_col_1() local
166 struct termio tty, tty_normal; in back_to_col_1()
169 struct sgttyb tty, tty_normal; in back_to_col_1()
177 (void) tcgetattr(SHOUT, &tty); in back_to_col_1()
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()
185 (void) xtcsetattr(SHOUT, TCSANOW, &tty); in back_to_col_1()
187 (void) ioctl(SHOUT, TCSETAW, (ioctl_t) &tty); in back_to_col_1()
196 (void) ioctl(SHIN, TIOCGETP, (ioctl_t) & tty); in back_to_col_1()
[all …]
/freebsd-14-stable/crypto/heimdal/appl/login/
HDread_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()
HDtty.c43 clean_ttyname (char *tty) in clean_ttyname() argument
45 char *res = tty; in clean_ttyname()
61 make_id (char *tty) in make_id() argument
63 char *res = tty; in make_id()
/freebsd-14-stable/usr.bin/write/
HDwrite.c87 char tty[MAXPATHLEN], *mytty; in main() local
167 search_utmp(devfd, argv[0], tty, mytty, myuid); in main()
168 do_write(devfd, tty, mytty, login); in main()
200 utmp_chk(char *user, char *tty) in utmp_chk() argument
204 strncpy(lu.ut_line, tty, sizeof lu.ut_line); in utmp_chk()
227 search_utmp(int devfd, char *user, char *tty, char *mytty, uid_t myuid) in search_utmp() argument
252 (void)strlcpy(tty, u->ut_line, MAXPATHLEN); in search_utmp()
261 (void)strlcpy(tty, mytty, MAXPATHLEN); in search_utmp()
266 warnx("%s is logged in more than once; writing to %s", user, tty); in search_utmp()
275 term_chk(int devfd, char *tty, int *msgsokP, time_t *atimeP, int showerror) in term_chk() argument
[all …]
/freebsd-14-stable/contrib/less/
HDttyin.c33 public HANDLE tty; variable
39 public int tty; variable
105 tty = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, in open_getchr()
108 GetConsoleMode(tty, &init_console_input_mode); in open_getchr()
115 SetConsoleMode(tty, curr_console_input_mode); in open_getchr()
125 tty = open("CON", OPEN_READ); in open_getchr()
134 tty = open_tty(); in open_getchr()
145 SetConsoleMode(tty, init_console_input_mode); in close_getchr()
146 CloseHandle(tty); in close_getchr()
159 SetConsoleMode(tty, curr_console_input_mode); in pclose()
[all …]
/freebsd-14-stable/contrib/ncurses/ncurses/trace/
HDlib_tracebits.c107 _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()
219 lookup_bits(buf, lflags, "lflags", tty->c_lflag); in _nc_trace_ttymode()
[all …]
/freebsd-14-stable/sys/kern/
HDtty.c75 static void tty_rel_free(struct tty *tp);
77 static TAILQ_HEAD(, tty) tty_list = TAILQ_HEAD_INITIALIZER(tty_list);
124 tty_watermarks(struct tty *tp) in tty_watermarks()
152 tty_drain(struct tty *tp, int leaving) in tty_drain()
214 ttydev_enter(struct tty *tp) in ttydev_enter()
229 ttydev_leave(struct tty *tp) in ttydev_leave()
272 struct tty *tp; in ttydev_open()
372 struct tty *tp = dev->si_drv1; in ttydev_close()
413 tty_is_ctty(struct tty *tp, struct proc *p) in tty_is_ctty()
422 tty_wait_background(struct tty *tp, struct thread *td, int sig) in tty_wait_background()
[all …]
HDtty_ttydisc.c93 ttydisc_open(struct tty *tp) in ttydisc_open()
99 ttydisc_close(struct tty *tp) in ttydisc_close()
121 ttydisc_read_break(struct tty *tp, char *breakc, size_t breaksz) in ttydisc_read_break()
142 ttydisc_bytesavail(struct tty *tp) in ttydisc_bytesavail()
171 ttydisc_canonicalize(struct tty *tp) in ttydisc_canonicalize()
193 ttydisc_read_canonical(struct tty *tp, struct uio *uio, int ioflag) in ttydisc_read_canonical()
268 ttydisc_read_raw_no_timer(struct tty *tp, struct uio *uio, int ioflag) in ttydisc_read_raw_no_timer()
307 ttydisc_read_raw_read_timer(struct tty *tp, struct uio *uio, int ioflag, in ttydisc_read_raw_read_timer()
361 ttydisc_read_raw_interbyte_timer(struct tty *tp, struct uio *uio, int ioflag) in ttydisc_read_raw_interbyte_timer()
410 ttydisc_read(struct tty *tp, struct uio *uio, int ioflag) in ttydisc_read()
[all …]
HDtty_pts.c114 struct tty *tp = fp->f_data; in ptsdev_read()
188 struct tty *tp = fp->f_data; in ptsdev_write()
261 struct tty *tp = fp->f_data; in ptsdev_ioctl()
388 struct tty *tp = fp->f_data; in ptsdev_poll()
443 struct tty *tp = fp->f_data; in pts_kqops_read_detach()
453 struct tty *tp = fp->f_data; in pts_kqops_read_event()
469 struct tty *tp = fp->f_data; in pts_kqops_write_detach()
479 struct tty *tp = fp->f_data; in pts_kqops_write_event()
505 struct tty *tp = fp->f_data; in ptsdev_kqfilter()
532 struct tty *tp = fp->f_data; in ptsdev_stat()
[all …]
/freebsd-14-stable/usr.sbin/pstat/
HDpstat.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()
249 xt.xt_insize = tty.t_inq.ti_nblocks * TTYINQ_DATASIZE; 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()
253 xt.xt_outsize = tty.t_outq.to_nblocks * TTYOUTQ_DATASIZE; 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()
[all …]
/freebsd-14-stable/lib/libpam/modules/pam_login_access/
HDpam_login_access.c72 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-14-stable/usr.bin/who/
HDwho.c165 char buf[80], tty[PATH_MAX]; in row() local
178 snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ut->ut_line); in row()
179 if (stat(tty, &sb) == 0) { in row()
271 const char *name, *tty; in whoami() local
273 if ((tty = ttyname(STDIN_FILENO)) == NULL) in whoami()
274 tty = "tty??"; in whoami()
275 else if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) in whoami()
276 tty += sizeof _PATH_DEV - 1; in whoami()
277 strlcpy(ut.ut_line, tty, sizeof ut.ut_line); in whoami()
/freebsd-14-stable/lib/libutil/
HDlogin_ok.c126 login_ttyok(login_cap_t *lc, const char *tty, const char *allowcap, in login_ttyok() argument
131 if (lc != NULL && tty != NULL && *tty != '\0') { in login_ttyok()
136 te = getttynam(tty); /* Need group name */ in login_ttyok()
140 if (ttl != NULL && !login_str2inlist(ttl, tty, grp, 0)) in login_ttyok()
145 if (ttl != NULL && login_str2inlist(ttl, tty, grp, 0)) in login_ttyok()
161 auth_ttyok(login_cap_t *lc, const char * tty) in auth_ttyok() argument
163 return login_ttyok(lc, tty, "ttys.allow", "ttys.deny"); in auth_ttyok()
/freebsd-14-stable/usr.bin/killall/
HDkillall.c104 char *tty = NULL; in main() local
182 tty = *av; in main()
250 if (user == NULL && tty == NULL && cmd == NULL && !jflag && ac == 0) in main()
253 if (tty) { in main()
254 if (strncmp(tty, "/dev/", 5) == 0) in main()
255 snprintf(buf, sizeof(buf), "%s", tty); in main()
256 else if (strncmp(tty, "tty", 3) == 0 || in main()
257 strncmp(tty, "pts/", 4) == 0) in main()
258 snprintf(buf, sizeof(buf), "/dev/%s", tty); in main()
260 snprintf(buf, sizeof(buf), "/dev/tty%s", tty); in main()
[all …]
/freebsd-14-stable/lib/libpam/modules/pam_lastlog/
HDpam_lastlog.c73 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()

12345678910>>...12