| /netbsd-src/sys/sys/ |
| H A D | tty.h | 109 struct tty { struct 110 TAILQ_ENTRY(tty) tty_link; /* Link in global tty list. */ 137 void (*t_oproc)(struct tty *); argument 139 int (*t_param)(struct tty *, struct termios *); argument 141 int (*t_hwiflow)(struct tty *, int); argument 150 TAILQ_ENTRY(tty) t_sigqueue; /* entry on pending signal list */ argument 251 TAILQ_HEAD(ttylist_head, tty); /* the ttylist is a TAILQ */ 257 extern struct tty *volatile constty; 276 int nullmodem(struct tty *, int); 277 int tputchar(int, int, struct tty *); [all …]
|
| H A D | conf.h | 53 struct tty; 96 void (*d_stop)(struct tty *, int); 97 struct tty * (*d_tty)(dev_t); 126 typedef void dev_stop_t(struct tty *, int); 127 typedef struct tty *dev_tty_t(dev_t); 155 int ttyenodev(struct tty *, ...); 156 void ttyvenodev(struct tty *, ...); 157 void ttyvnullop(struct tty *, ...); 233 int (*l_open) (dev_t, struct tty *); 234 int (*l_close) (struct tty *, int); [all …]
|
| /netbsd-src/external/mit/libuv/dist/src/win/ |
| H A D | tty.c | 190 int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int unused) { in uv_tty_init() argument 249 uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); in uv_tty_init() 250 uv__connection_init((uv_stream_t*) tty); in uv_tty_init() 252 tty->handle = handle; in uv_tty_init() 253 tty->u.fd = fd; in uv_tty_init() 254 tty->reqs_pending = 0; in uv_tty_init() 255 tty->flags |= UV_HANDLE_BOUND; in uv_tty_init() 259 tty->flags |= UV_HANDLE_TTY_READABLE | UV_HANDLE_READABLE; in uv_tty_init() 261 tty->tty.rd.unused_ = NULL; in uv_tty_init() 262 tty->tty.rd.read_line_buffer = uv_null_buf_; in uv_tty_init() [all …]
|
| /netbsd-src/external/bsd/tmux/usr.bin/tmux/ |
| H A D | utempter.c | 60 doutmpx(const char *username, const char *hostname, const char *tty, in doutmpx() argument 71 (void)strncpy(ut.ut_line, tty, sizeof(ut.ut_line)); in doutmpx() 74 t = tty + strlen(tty); in doutmpx() 75 if ((size_t)(t - tty) >= sizeof(ut.ut_id)) in doutmpx() 76 tty = t - sizeof(ut.ut_id); in doutmpx() 77 (void)strncpy(ut.ut_id, tty, sizeof(ut.ut_id)); in doutmpx() 82 login_utmpx(const char *username, const char *hostname, const char *tty, in login_utmpx() argument 85 doutmpx(username, hostname, tty, now, USER_PROCESS, getpid()); in login_utmpx() 89 logout_utmpx(const char *username, const char *tty, const struct timeval *now) in logout_utmpx() argument 91 doutmpx(username, "", tty, now, DEAD_PROCESS, 0); in logout_utmpx() [all …]
|
| /netbsd-src/lib/libc/gen/ |
| H A D | getttyent.c | 69 getttynam(const char *tty) in getttynam() argument 73 _DIAGASSERT(tty != NULL); in getttynam() 77 if (!strcmp(tty, t->ty_name)) in getttynam() 86 static struct ttyent tty; in getttyent() local 114 tty.ty_name = p; in getttyent() 116 if (*(tty.ty_getty = p) == '\0') in getttyent() 117 tty.ty_getty = tty.ty_type = NULL; in getttyent() 120 if (*(tty.ty_type = p) == '\0') in getttyent() 121 tty.ty_type = NULL; in getttyent() 125 tty.ty_status = 0; in getttyent() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/lib/libdes/ |
| H A D | oread_pwd.c | 138 #define TTY_get(tty,data) tcgetattr(tty,data) argument 139 #define TTY_set(tty,data) tcsetattr(tty,TCSANOW,data) argument 146 #define TTY_get(tty,data) ioctl(tty,TCGETA,data) argument 147 #define TTY_set(tty,data) ioctl(tty,TCSETA,data) argument 154 #define TTY_get(tty,data) ioctl(tty,TIOCGETP,data) argument 155 #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data) argument 197 static int noecho_fgets(char *buf, int size, FILE *tty); 251 static FILE *tty; in des_read_pw() local 264 tty=NULL; in des_read_pw() 267 if ((tty=fopen("con","r")) == NULL) in des_read_pw() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/lib/libdes/ |
| H A D | oread_pwd.c | 138 #define TTY_get(tty,data) tcgetattr(tty,data) argument 139 #define TTY_set(tty,data) tcsetattr(tty,TCSANOW,data) argument 146 #define TTY_get(tty,data) ioctl(tty,TCGETA,data) argument 147 #define TTY_set(tty,data) ioctl(tty,TCSETA,data) argument 154 #define TTY_get(tty,data) ioctl(tty,TIOCGETP,data) argument 155 #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data) argument 197 static int noecho_fgets(char *buf, int size, FILE *tty); 251 static FILE *tty; in des_read_pw() local 264 tty=NULL; in des_read_pw() 267 if ((tty=fopen("con","r")) == NULL) in des_read_pw() [all …]
|
| /netbsd-src/lib/libpam/modules/pam_lastlog/ |
| H A D | pam_lastlog.c | 119 const char *user, *rhost, *tty, *nuser; in pam_sm_open_session() local 152 tty = (const char *)vtty; in pam_sm_open_session() 154 if (tty == NULL) { in pam_sm_open_session() 164 if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0) in pam_sm_open_session() 165 tty = tty + strlen(_PATH_DEV); in pam_sm_open_session() 167 if (*tty == '\0') { in pam_sm_open_session() 188 doutmpx(user, rhost, tty, ss, &now); in pam_sm_open_session() 189 dolastlogx(pamh, quiet, pwd, rhost, tty, ss, &now); in pam_sm_open_session() 193 doutmp(user, rhost, tty, &now); in pam_sm_open_session() 194 dolastlog(pamh, quiet, pwd, rhost, tty, &now); in pam_sm_open_session() [all …]
|
| /netbsd-src/external/gpl3/gdb/dist/readline/readline/ |
| H A D | rltty.c | 83 set_winsize (tty) in set_winsize() argument 84 int tty; in set_winsize() 89 if (ioctl (tty, TIOCGWINSZ, &w) == 0) 90 (void) ioctl (tty, TIOCSWINSZ, &w); 170 get_tty_settings (int tty, TIOTYPE *tiop) in get_tty_settings() argument 172 set_winsize (tty); in get_tty_settings() 177 if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0) in get_tty_settings() 182 if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0) in get_tty_settings() 187 if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0) in get_tty_settings() 192 if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0) in get_tty_settings() [all …]
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | sshpty.c | 65 pty_release(const char *tty) in pty_release() argument 67 if (chown(tty, (uid_t) 0, (gid_t) 0) == -1) in pty_release() 68 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); in pty_release() 69 if (chmod(tty, (mode_t) 0666) == -1) in pty_release() 70 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); in pty_release() 76 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument 106 fd = open(tty, O_RDWR); in pty_make_controlling_tty() 108 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty() 138 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument 157 if (stat(tty, &st) == -1) in pty_setowner() [all …]
|
| /netbsd-src/external/bsd/tmux/dist/ |
| H A D | tty-acs.c | 205 tty_acs_needed(struct tty *tty) in tty_acs_needed() argument 207 if (tty == NULL) in tty_acs_needed() 220 if (tty_term_has(tty->term, TTYC_U8) && in tty_acs_needed() 221 tty_term_number(tty->term, TTYC_U8) == 0) in tty_acs_needed() 224 if (tty->client->flags & CLIENT_UTF8) in tty_acs_needed() 231 tty_acs_get(struct tty *tty, u_char ch) in tty_acs_get() argument 236 if (tty_acs_needed(tty)) { in tty_acs_get() 237 if (tty->term->acs[ch][0] == '\0') in tty_acs_get() 239 return (&tty->term->acs[ch][0]); in tty_acs_get() 252 tty_acs_reverse_get(__unused struct tty *tty, const char *s, size_t slen) in tty_acs_reverse_get() argument
|
| /netbsd-src/usr.bin/mesg/ |
| H A D | mesg.c | 65 char *tty; in main() local 79 if ((tty = ttyname(STDIN_FILENO)) == NULL && in main() 80 (tty = ttyname(STDOUT_FILENO)) == NULL && in main() 81 (tty = ttyname(STDERR_FILENO)) == NULL) in main() 83 if (stat(tty, &sb) == -1) in main() 84 err(2, "%s", tty); in main() 97 if (chmod(tty, sb.st_mode | S_IWGRP) == -1) in main() 98 err(2, "%s", tty); in main() 101 if (chmod(tty, sb.st_mode & ~S_IWGRP) == -1) in main() 102 err(2, "%s", tty); in main()
|
| /netbsd-src/lib/libpam/modules/pam_securetty/ |
| H A D | pam_securetty.c | 68 const void *tty; in pam_sm_acct_mgmt() local 88 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt() 92 PAM_LOG("Got TTY: %s", (const char *)tty); in pam_sm_acct_mgmt() 95 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { in pam_sm_acct_mgmt() 97 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; in pam_sm_acct_mgmt() 100 if (tty != NULL && (ty = getttynam(tty)) != NULL && in pam_sm_acct_mgmt() 113 (const char *)tty); in pam_sm_acct_mgmt() 117 pwd->pw_name, (const char *)tty); in pam_sm_acct_mgmt()
|
| /netbsd-src/external/gpl2/texinfo/dist/info/ |
| H A D | terminal.c | 697 int tty; in terminal_prep_terminal() local 707 tty = fileno (stdin); in terminal_prep_terminal() 710 tcgetattr (tty, &original_termios); in terminal_prep_terminal() 711 tcgetattr (tty, &ttybuff); in terminal_prep_terminal() 714 ioctl (tty, TCGETA, &original_termio); in terminal_prep_terminal() 715 ioctl (tty, TCGETA, &ttybuff); in terminal_prep_terminal() 751 tcsetattr (tty, TCSANOW, &ttybuff); in terminal_prep_terminal() 753 tcflow (tty, TCOOFF); in terminal_prep_terminal() 754 tcflow (tty, TCOON); in terminal_prep_terminal() 758 ioctl (tty, TCSETA, &ttybuff); in terminal_prep_terminal() [all …]
|
| /netbsd-src/sys/dev/ir/ |
| H A D | irframe_tty.c | 88 struct tty *sc_tp; 123 int irframetopen(dev_t, struct tty *); 124 int irframetclose(struct tty *, int); 125 int irframetioctl(struct tty *, u_long, void *, int, struct lwp *); 126 int irframetinput(int, struct tty *); 127 int irframetstart(struct tty *); 143 static int irt_write_frame(struct tty *, u_int8_t *, size_t); 144 static int irt_putc(struct tty *, int); 147 static void irt_ioctl(struct tty *, u_long, void *); 148 static void irt_setspeed(struct tty *, u_int); [all …]
|
| /netbsd-src/usr.sbin/sti/ |
| H A D | sti.c | 148 const char *tty; in main() local 163 tty = *argv++; in main() 166 if (strncmp(tty, "/dev/", 5) == 0) in main() 167 (void)snprintf(ttydev, sizeof(ttydev), "%s", tty); in main() 168 else if (strncmp(tty, "tty", 3) == 0 || strncmp(tty, "pty", 3) == 0 || in main() 169 strncmp(tty, "pts/", 4) == 0) in main() 170 (void)snprintf(ttydev, sizeof(ttydev), "/dev/%s", tty); in main() 171 else if (isdigit((unsigned char)*tty)) in main() 172 (void)snprintf(ttydev, sizeof(ttydev), "/dev/pts/%s", tty); in main() 174 (void)snprintf(ttydev, sizeof(ttydev), "/dev/tty%s", tty); in main()
|
| /netbsd-src/sys/dev/hpc/ |
| H A D | biconsdev.c | 88 struct tty biconsdev_tty[NBICONSDEV]; 89 static void biconsdev_output(struct tty *); 117 struct tty *tp = &biconsdev_tty[0]; in biconsdevattach() 134 tp->t_param = (int (*)(struct tty *, struct termios *))nullop; in biconsdevattach() 144 biconsdev_output(struct tty *tp) in biconsdev_output() 173 struct tty *tp = &biconsdev_tty[0]; in biconsdevopen() 201 struct tty *tp = &biconsdev_tty[0]; in biconsdevclose() 213 struct tty *tp = &biconsdev_tty[0]; in biconsdevread() 222 struct tty *tp = &biconsdev_tty[0]; in biconsdevwrite() 231 struct tty *tp = &biconsdev_tty[0]; in biconsdevpoll() [all …]
|
| /netbsd-src/external/bsd/less/dist/ |
| H A D | ttyin.c | 29 public HANDLE tty; variable 31 public int tty; variable 91 tty = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, in open_getchr() 94 GetConsoleMode(tty, &console_mode); in open_getchr() 96 SetConsoleMode(tty, ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT); in open_getchr() 106 tty = open("CON", OPEN_READ); in open_getchr() 115 tty = open_tty(); in open_getchr() 126 SetConsoleMode(tty, console_mode); in close_getchr() 127 CloseHandle(tty); in close_getchr() 140 SetConsoleMode(tty, ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT); in pclose() [all …]
|
| /netbsd-src/lib/libutil/ |
| H A D | pidlock.c | 182 checktty(const char *tty) in checktty() argument 188 (void)strlcat(ttyfile, tty, sizeof(ttyfile)); in checktty() 203 makelock(char *buf, size_t bufsiz, const char *tty) in makelock() argument 206 (void)strlcat(buf, tty, bufsiz); in makelock() 212 ttylock(const char *tty, int flags, pid_t *locker) in ttylock() argument 216 _DIAGASSERT(tty != NULL); in ttylock() 218 if (checktty(tty) != 0) in ttylock() 222 return pidlock(makelock(lockfile, sizeof(lockfile), tty), in ttylock() 227 ttyunlock(const char *tty) in ttyunlock() argument 231 _DIAGASSERT(tty != NULL); in ttyunlock() [all …]
|
| /netbsd-src/sys/dev/arcbios/ |
| H A D | arcbios_tty.c | 51 static struct tty *arcbios_tty[1]; 53 void arcbios_tty_start(struct tty *); 55 int arcbios_tty_param(struct tty *, struct termios *); 85 struct tty *tp; in arcbios_ttyopen() 139 struct tty *tp = arcbios_tty[unit]; in arcbios_ttyclose() 150 struct tty *tp = arcbios_tty[minor(dev)]; in arcbios_ttyread() 158 struct tty *tp = arcbios_tty[minor(dev)]; in arcbios_ttywrite() 166 struct tty *tp = arcbios_tty[minor(dev)]; in arcbios_ttypoll() 175 struct tty *tp = arcbios_tty[unit]; in arcbios_ttyioctl() 185 arcbios_tty_param(struct tty *tp, struct termios *t) in arcbios_tty_param() [all …]
|
| /netbsd-src/usr.bin/login/ |
| H A D | common.c | 80 char term[64], *envinit[1], *hostname, *tty, *nested; variable 187 "passed %s != actual %s", username, tty, in update_db() 206 " %s", username, tty, hname, assbuf); in update_db() 209 username, tty); in update_db() 213 "%s", nested, pwd->pw_name, tty, hname, assbuf); in update_db() 216 pwd->pw_name, tty); in update_db() 220 pwd->pw_name, tty, hname, assbuf); in update_db() 223 pwd->pw_name, tty); in update_db() 251 (void)strncpy(utmpx.ut_line, tty, sizeof(utmpx.ut_line)); in doutmpx() 254 t = tty + strlen(tty); in doutmpx() [all …]
|
| /netbsd-src/sbin/slattach/ |
| H A D | slattach.c | 81 struct termios tty; in main() local 129 tty.c_cflag = CREAD | CS8 | cflag; in main() 130 tty.c_iflag = 0; in main() 131 tty.c_lflag = 0; in main() 132 tty.c_oflag = 0; in main() 133 tty.c_cc[VMIN] = 1; in main() 134 tty.c_cc[VTIME] = 0; in main() 135 cfsetspeed(&tty, speed); in main() 136 if (tcsetattr(fd, TCSADRAIN, &tty) < 0) in main()
|
| /netbsd-src/libexec/utmp_update/ |
| H A D | utmp_update.c | 83 char tty[MAXPATHLEN]; in main() local 136 (void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, utx->ut_line); in main() 137 fd = open(tty, O_RDONLY|O_NONBLOCK, 0); in main() 140 logerr(errno, "Cannot stat `%s'", tty); in main() 142 logerr(0, "%s: Is not owned by you", tty); in main() 144 logerr(0, "%s: Not a tty device", tty); in main() 146 if (access(tty, W_OK|R_OK) == -1) in main() 147 logerr(errno, "Can't access `%s'", tty); in main() 157 logerr(errno, "Cannot open `%s'", tty); in main() 165 "utmp pid %ld != parent %ld", tty, in main()
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/ |
| H A D | ui.c | 114 FILE *tty; in read_string() local 134 if((tty = fopen("/dev/tty", "r")) != NULL) in read_string() 135 rk_cloexec_file(tty); in read_string() 137 tty = stdin; in read_string() 143 tcgetattr(fileno(tty), &t_old); in read_string() 146 tcsetattr(fileno(tty), TCSANOW, &t_new); in read_string() 151 c = getc(tty); in read_string() 153 if(!ferror(tty)) in read_string() 169 tcsetattr(fileno(tty), TCSANOW, &t_old); in read_string() 172 if(tty != stdin) in read_string() [all …]
|
| /netbsd-src/external/mit/libuv/dist/src/unix/ |
| H A D | tty.c | 136 int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int unused) { in uv_tty_init() argument 210 uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); in uv_tty_init() 220 r = uv__stream_try_select((uv_stream_t*) tty, &fd); in uv_tty_init() 225 QUEUE_REMOVE(&tty->handle_queue); in uv_tty_init() 238 uv__stream_open((uv_stream_t*) tty, fd, flags); in uv_tty_init() 239 tty->mode = UV_TTY_MODE_NORMAL; in uv_tty_init() 281 int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { in uv_tty_set_mode() argument 286 if (tty->mode == (int) mode) in uv_tty_set_mode() 289 fd = uv__stream_fd(tty); in uv_tty_set_mode() 290 if (tty->mode == UV_TTY_MODE_NORMAL && mode != UV_TTY_MODE_NORMAL) { in uv_tty_set_mode() [all …]
|