tag | line | file | source code |
tty | 70 | drivers/char/console.c | int paste_selection(struct tty_struct *tty); |
tty | 702 | drivers/char/console.c | static void respond_string(char * p, int currcons, struct tty_struct * tty) |
tty | 705 | drivers/char/console.c | put_tty_queue(*p, &tty->read_q); |
tty | 708 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 711 | drivers/char/console.c | static void respond_num(unsigned int n, int currcons, struct tty_struct * tty) |
tty | 721 | drivers/char/console.c | put_tty_queue(buff[i], &tty->read_q); |
tty | 726 | drivers/char/console.c | static void cursor_report(int currcons, struct tty_struct * tty) |
tty | 728 | drivers/char/console.c | put_tty_queue('\033', &tty->read_q); |
tty | 729 | drivers/char/console.c | put_tty_queue('[', &tty->read_q); |
tty | 730 | drivers/char/console.c | respond_num(y + (decom ? top+1 : 1), currcons, tty); |
tty | 731 | drivers/char/console.c | put_tty_queue(';', &tty->read_q); |
tty | 732 | drivers/char/console.c | respond_num(x+1, currcons, tty); |
tty | 733 | drivers/char/console.c | put_tty_queue('R', &tty->read_q); |
tty | 734 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 737 | drivers/char/console.c | static inline void status_report(int currcons, struct tty_struct * tty) |
tty | 739 | drivers/char/console.c | respond_string("\033[0n", currcons, tty); /* Terminal ok */ |
tty | 742 | drivers/char/console.c | static inline void respond_ID(int currcons, struct tty_struct * tty) |
tty | 744 | drivers/char/console.c | respond_string(VT102ID, currcons, tty); |
tty | 994 | drivers/char/console.c | void con_write(struct tty_struct * tty) |
tty | 999 | drivers/char/console.c | currcons = tty->line - 1; |
tty | 1007 | drivers/char/console.c | if (!EMPTY(&tty->write_q) && currcons == sel_cons) |
tty | 1011 | drivers/char/console.c | while (!tty->stopped && (c = get_tty_queue(&tty->write_q)) >= 0) { |
tty | 1099 | drivers/char/console.c | respond_ID(currcons,tty); |
tty | 1160 | drivers/char/console.c | status_report(currcons,tty); |
tty | 1162 | drivers/char/console.c | cursor_report(currcons,tty); |
tty | 1224 | drivers/char/console.c | respond_ID(currcons,tty); |
tty | 1314 | drivers/char/console.c | if (LEFT(&tty->write_q) > WAKEUP_CHARS) |
tty | 1315 | drivers/char/console.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 1619 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
tty | 1621 | drivers/char/console.c | tty->write = con_write; |
tty | 1622 | drivers/char/console.c | tty->ioctl = vt_ioctl; |
tty | 1623 | drivers/char/console.c | if (tty->line > NR_CONSOLES) |
tty | 1802 | drivers/char/console.c | int paste_selection(struct tty_struct *tty) |
tty | 1810 | drivers/char/console.c | put_tty_queue(*bp, &tty->read_q); |
tty | 1812 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 93 | drivers/char/keyboard.c | static struct tty_struct * tty = NULL; |
tty | 227 | drivers/char/keyboard.c | tty = TTY_TABLE(0); |
tty | 334 | drivers/char/keyboard.c | (vc_kbd_mode(kbd,VC_REPEAT) && tty && |
tty | 335 | drivers/char/keyboard.c | (L_ECHO(tty) || (EMPTY(&tty->secondary) && EMPTY(&tty->read_q))))) |
tty | 363 | drivers/char/keyboard.c | if (!tty) |
tty | 365 | drivers/char/keyboard.c | qp = &tty->read_q; |
tty | 380 | drivers/char/keyboard.c | if (!tty) |
tty | 382 | drivers/char/keyboard.c | qp = &tty->read_q; |
tty | 442 | drivers/char/keyboard.c | if (rep || !tty) |
tty | 450 | drivers/char/keyboard.c | if (tty->stopped) |
tty | 451 | drivers/char/keyboard.c | start_tty(tty); |
tty | 453 | drivers/char/keyboard.c | stop_tty(tty); |
tty | 823 | drivers/char/keyboard.c | if (tty && !I_IGNBRK(tty)) { |
tty | 824 | drivers/char/keyboard.c | if (I_BRKINT(tty)) { |
tty | 825 | drivers/char/keyboard.c | flush_input(tty); |
tty | 826 | drivers/char/keyboard.c | flush_output(tty); |
tty | 827 | drivers/char/keyboard.c | if (tty->pgrp > 0) |
tty | 828 | drivers/char/keyboard.c | kill_pg(tty->pgrp, SIGINT, 1); |
tty | 831 | drivers/char/keyboard.c | if (LEFT(&tty->read_q) >= 2) { |
tty | 832 | drivers/char/keyboard.c | set_bit(tty->read_q.head, |
tty | 833 | drivers/char/keyboard.c | &tty->readq_flags); |
tty | 27 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
tty | 29 | drivers/char/pty.c | if (!tty) |
tty | 31 | drivers/char/pty.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 32 | drivers/char/pty.c | if (tty->count > 1) |
tty | 33 | drivers/char/pty.c | printk("master pty_close: count = %d!!\n", tty->count); |
tty | 35 | drivers/char/pty.c | if (tty->count > 2) |
tty | 38 | drivers/char/pty.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 39 | drivers/char/pty.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 40 | drivers/char/pty.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 41 | drivers/char/pty.c | if (!tty->link) |
tty | 43 | drivers/char/pty.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 44 | drivers/char/pty.c | wake_up_interruptible(&tty->link->read_q.proc_list); |
tty | 45 | drivers/char/pty.c | wake_up_interruptible(&tty->link->write_q.proc_list); |
tty | 46 | drivers/char/pty.c | if (IS_A_PTY_MASTER(tty->line)) |
tty | 47 | drivers/char/pty.c | tty_hangup(tty->link); |
tty | 49 | drivers/char/pty.c | start_tty(tty); |
tty | 50 | drivers/char/pty.c | set_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 86 | drivers/char/pty.c | static void pty_write(struct tty_struct * tty) |
tty | 88 | drivers/char/pty.c | if (tty->link) |
tty | 89 | drivers/char/pty.c | pty_copy(tty,tty->link); |
tty | 92 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
tty | 94 | drivers/char/pty.c | if (!tty || !tty->link) |
tty | 96 | drivers/char/pty.c | if (IS_A_PTY_SLAVE(tty->line)) |
tty | 97 | drivers/char/pty.c | clear_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 98 | drivers/char/pty.c | tty->write = tty->link->write = pty_write; |
tty | 99 | drivers/char/pty.c | tty->close = tty->link->close = pty_close; |
tty | 100 | drivers/char/pty.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 103 | drivers/char/pty.c | while (!tty->link->count && !(current->signal & ~current->blocked)) |
tty | 104 | drivers/char/pty.c | interruptible_sleep_on(&tty->link->read_q.proc_list); |
tty | 105 | drivers/char/pty.c | if (!tty->link->count) |
tty | 209 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty, int status); |
tty | 256 | drivers/char/serial.c | static void rs_stop(struct tty_struct *tty) |
tty | 260 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 263 | drivers/char/serial.c | tty->stopped = 0; |
tty | 264 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 274 | drivers/char/serial.c | static void rs_start(struct tty_struct *tty) |
tty | 278 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 343 | drivers/char/serial.c | queue = &info->tty->read_q; |
tty | 355 | drivers/char/serial.c | set_bit(head, &info->tty->readq_flags); |
tty | 372 | drivers/char/serial.c | &info->tty->flags)) |
tty | 373 | drivers/char/serial.c | rs_throttle(info->tty, TTY_THROTTLE_RQ_FULL); |
tty | 385 | drivers/char/serial.c | queue = &info->tty->write_q; |
tty | 408 | drivers/char/serial.c | if (info->tty->write_data_cnt) { |
tty | 409 | drivers/char/serial.c | set_bit(info->tty->line, &tty_check_write); |
tty | 425 | drivers/char/serial.c | if ((status & UART_MSR_DDCD) && !C_CLOCAL(info->tty)) { |
tty | 440 | drivers/char/serial.c | if (C_CRTSCTS(info->tty) && !(info->flags & ASYNC_CLOSING)) { |
tty | 441 | drivers/char/serial.c | if (info->tty->hw_stopped) { |
tty | 446 | drivers/char/serial.c | info->tty->hw_stopped = 0; |
tty | 447 | drivers/char/serial.c | rs_start(info->tty); |
tty | 455 | drivers/char/serial.c | info->tty->hw_stopped = 1; |
tty | 456 | drivers/char/serial.c | rs_stop(info->tty); |
tty | 498 | drivers/char/serial.c | if (info->tty && |
tty | 499 | drivers/char/serial.c | info->tty->termios && |
tty | 512 | drivers/char/serial.c | if (!info->tty->stopped && |
tty | 513 | drivers/char/serial.c | !info->tty->hw_stopped) |
tty | 567 | drivers/char/serial.c | do_SAK(info->tty); |
tty | 569 | drivers/char/serial.c | if (!I_IGNBRK(info->tty) && I_BRKINT(info->tty)) { |
tty | 570 | drivers/char/serial.c | flush_input(info->tty); |
tty | 571 | drivers/char/serial.c | flush_output(info->tty); |
tty | 572 | drivers/char/serial.c | if (info->tty->pgrp > 0) |
tty | 573 | drivers/char/serial.c | kill_pg(info->tty->pgrp, SIGINT,1); |
tty | 593 | drivers/char/serial.c | if (!info->tty) |
tty | 596 | drivers/char/serial.c | TTY_READ_FLUSH(info->tty); |
tty | 599 | drivers/char/serial.c | wake_up_interruptible(&info->tty->write_q.proc_list); |
tty | 602 | drivers/char/serial.c | tty_hangup(info->tty); |
tty | 732 | drivers/char/serial.c | if (info->tty) |
tty | 733 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 813 | drivers/char/serial.c | if (info->tty) |
tty | 814 | drivers/char/serial.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 818 | drivers/char/serial.c | if (info->tty && info->tty->termios && I_INPCK(info->tty)) |
tty | 892 | drivers/char/serial.c | if (info->tty && !(info->tty->termios->c_cflag & HUPCL)) |
tty | 903 | drivers/char/serial.c | if (info->tty) |
tty | 904 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 925 | drivers/char/serial.c | if (!info->tty || !info->tty->termios) |
tty | 927 | drivers/char/serial.c | cflag = info->tty->termios->c_cflag; |
tty | 1012 | drivers/char/serial.c | queue = &info->tty->write_q; |
tty | 1031 | drivers/char/serial.c | void rs_write(struct tty_struct * tty) |
tty | 1035 | drivers/char/serial.c | if (!tty || tty->stopped || tty->hw_stopped) |
tty | 1037 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 1039 | drivers/char/serial.c | if (!info || !info->tty || !(info->flags & ASYNC_INITIALIZED)) { |
tty | 1061 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty, int status) |
tty | 1069 | drivers/char/serial.c | printk("throttle tty%d: %d (%d, %d)....\n", DEV_TO_SL(tty->line), |
tty | 1070 | drivers/char/serial.c | status, LEFT(&tty->read_q), LEFT(&tty->secondary)); |
tty | 1074 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 1075 | drivers/char/serial.c | if (I_IXOFF(tty)) { |
tty | 1076 | drivers/char/serial.c | info->x_char = STOP_CHAR(tty); |
tty | 1084 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 1085 | drivers/char/serial.c | if (I_IXOFF(tty)) { |
tty | 1089 | drivers/char/serial.c | info->x_char = START_CHAR(tty); |
tty | 1368 | drivers/char/serial.c | static int rs_ioctl(struct tty_struct *tty, struct file * file, |
tty | 1374 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1391 | drivers/char/serial.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 1396 | drivers/char/serial.c | tty->termios->c_cflag = |
tty | 1397 | drivers/char/serial.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 1445 | drivers/char/serial.c | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 1449 | drivers/char/serial.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 1452 | drivers/char/serial.c | info = &rs_table[DEV_TO_SL(tty->line)]; |
tty | 1454 | drivers/char/serial.c | change_speed(DEV_TO_SL(tty->line)); |
tty | 1457 | drivers/char/serial.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 1458 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 1459 | drivers/char/serial.c | rs_write(tty); |
tty | 1463 | drivers/char/serial.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 1466 | drivers/char/serial.c | if (I_INPCK(tty)) |
tty | 1484 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
tty | 1492 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1499 | drivers/char/serial.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 1524 | drivers/char/serial.c | info->normal_termios = *tty->termios; |
tty | 1526 | drivers/char/serial.c | info->callout_termios = *tty->termios; |
tty | 1527 | drivers/char/serial.c | tty->stopped = 0; /* Force flush to succeed */ |
tty | 1528 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 1530 | drivers/char/serial.c | rs_start(tty); |
tty | 1531 | drivers/char/serial.c | wait_until_sent(tty, 6000); /* 60 seconds timeout */ |
tty | 1533 | drivers/char/serial.c | flush_output(tty); |
tty | 1534 | drivers/char/serial.c | flush_input(tty); |
tty | 1541 | drivers/char/serial.c | rs_start(tty); /* Make sure THRI interrupt enabled */ |
tty | 1548 | drivers/char/serial.c | info->tty = 0; |
tty | 1551 | drivers/char/serial.c | tty->count++; /* avoid race condition */ |
tty | 1555 | drivers/char/serial.c | tty->count--; |
tty | 1567 | drivers/char/serial.c | void rs_hangup(struct tty_struct *tty) |
tty | 1572 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1582 | drivers/char/serial.c | info->tty = 0; |
tty | 1591 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 1596 | drivers/char/serial.c | int do_clocal = C_CLOCAL(tty); |
tty | 1715 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
tty | 1720 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1728 | drivers/char/serial.c | info->tty = tty; |
tty | 1730 | drivers/char/serial.c | tty->write = rs_write; |
tty | 1731 | drivers/char/serial.c | tty->close = rs_close; |
tty | 1732 | drivers/char/serial.c | tty->ioctl = rs_ioctl; |
tty | 1733 | drivers/char/serial.c | tty->throttle = rs_throttle; |
tty | 1734 | drivers/char/serial.c | tty->set_termios = rs_set_termios; |
tty | 1735 | drivers/char/serial.c | tty->stop = rs_stop; |
tty | 1736 | drivers/char/serial.c | tty->start = rs_start; |
tty | 1737 | drivers/char/serial.c | tty->hangup = rs_hangup; |
tty | 1740 | drivers/char/serial.c | *tty->termios = info->normal_termios; |
tty | 1742 | drivers/char/serial.c | *tty->termios = info->callout_termios; |
tty | 1751 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
tty | 2030 | drivers/char/serial.c | info->tty = 0; |
tty | 81 | drivers/char/tty_io.c | static void initialize_tty_struct(int line, struct tty_struct *tty); |
tty | 142 | drivers/char/tty_io.c | int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen) |
tty | 152 | drivers/char/tty_io.c | tail = tty->read_q.tail; |
tty | 153 | drivers/char/tty_io.c | head = tty->read_q.head; |
tty | 155 | drivers/char/tty_io.c | ok = !clear_bit (tail, &tty->readq_flags); |
tty | 156 | drivers/char/tty_io.c | *p++ = tty->read_q.buf[tail++]; |
tty | 160 | drivers/char/tty_io.c | tty->read_q.tail = tail; |
tty | 166 | drivers/char/tty_io.c | void tty_write_flush(struct tty_struct * tty) |
tty | 168 | drivers/char/tty_io.c | if (!tty->write || EMPTY(&tty->write_q)) |
tty | 170 | drivers/char/tty_io.c | if (set_bit(TTY_WRITE_BUSY,&tty->flags)) |
tty | 172 | drivers/char/tty_io.c | tty->write(tty); |
tty | 173 | drivers/char/tty_io.c | if (!clear_bit(TTY_WRITE_BUSY,&tty->flags)) |
tty | 177 | drivers/char/tty_io.c | void tty_read_flush(struct tty_struct * tty) |
tty | 179 | drivers/char/tty_io.c | if (!tty || EMPTY(&tty->read_q)) |
tty | 181 | drivers/char/tty_io.c | if (set_bit(TTY_READ_BUSY, &tty->flags)) |
tty | 183 | drivers/char/tty_io.c | ldiscs[tty->disc].handler(tty); |
tty | 184 | drivers/char/tty_io.c | if (!clear_bit(TTY_READ_BUSY, &tty->flags)) |
tty | 238 | drivers/char/tty_io.c | void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) |
tty | 245 | drivers/char/tty_io.c | if (!tty) |
tty | 247 | drivers/char/tty_io.c | dev = MKDEV(TTY_MAJOR,tty->line); |
tty | 259 | drivers/char/tty_io.c | flush_input(tty); |
tty | 260 | drivers/char/tty_io.c | flush_output(tty); |
tty | 261 | drivers/char/tty_io.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 262 | drivers/char/tty_io.c | if (tty->session > 0) { |
tty | 263 | drivers/char/tty_io.c | kill_sl(tty->session,SIGHUP,1); |
tty | 264 | drivers/char/tty_io.c | kill_sl(tty->session,SIGCONT,1); |
tty | 266 | drivers/char/tty_io.c | tty->session = 0; |
tty | 267 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 269 | drivers/char/tty_io.c | if (p->tty == tty->line) |
tty | 270 | drivers/char/tty_io.c | p->tty = -1; |
tty | 272 | drivers/char/tty_io.c | if (tty->hangup) |
tty | 273 | drivers/char/tty_io.c | (tty->hangup)(tty); |
tty | 276 | drivers/char/tty_io.c | void tty_hangup(struct tty_struct * tty) |
tty | 279 | drivers/char/tty_io.c | printk("tty%d hangup...\n", tty->line); |
tty | 281 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 284 | drivers/char/tty_io.c | void tty_vhangup(struct tty_struct * tty) |
tty | 287 | drivers/char/tty_io.c | printk("tty%d vhangup...\n", tty->line); |
tty | 289 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 309 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 312 | drivers/char/tty_io.c | if (current->tty >= 0) { |
tty | 313 | drivers/char/tty_io.c | tty = tty_table[current->tty]; |
tty | 314 | drivers/char/tty_io.c | if (tty) { |
tty | 315 | drivers/char/tty_io.c | if (tty->pgrp > 0) { |
tty | 316 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGHUP, priv); |
tty | 317 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGCONT, priv); |
tty | 319 | drivers/char/tty_io.c | tty->session = 0; |
tty | 320 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 327 | drivers/char/tty_io.c | p->tty = -1; |
tty | 511 | drivers/char/tty_io.c | void stop_tty(struct tty_struct *tty) |
tty | 513 | drivers/char/tty_io.c | if (tty->stopped) |
tty | 515 | drivers/char/tty_io.c | tty->stopped = 1; |
tty | 516 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 517 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_START; |
tty | 518 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_STOP; |
tty | 519 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 521 | drivers/char/tty_io.c | if (tty->stop) |
tty | 522 | drivers/char/tty_io.c | (tty->stop)(tty); |
tty | 523 | drivers/char/tty_io.c | if (IS_A_CONSOLE(tty->line)) { |
tty | 529 | drivers/char/tty_io.c | void start_tty(struct tty_struct *tty) |
tty | 531 | drivers/char/tty_io.c | if (!tty->stopped) |
tty | 533 | drivers/char/tty_io.c | tty->stopped = 0; |
tty | 534 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 535 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_STOP; |
tty | 536 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_START; |
tty | 537 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 539 | drivers/char/tty_io.c | if (tty->start) |
tty | 540 | drivers/char/tty_io.c | (tty->start)(tty); |
tty | 541 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 542 | drivers/char/tty_io.c | if (IS_A_CONSOLE(tty->line)) { |
tty | 551 | drivers/char/tty_io.c | static int opost(unsigned char c, struct tty_struct *tty) |
tty | 553 | drivers/char/tty_io.c | if (FULL(&tty->write_q)) |
tty | 555 | drivers/char/tty_io.c | if (O_OPOST(tty)) { |
tty | 558 | drivers/char/tty_io.c | if (O_ONLRET(tty)) |
tty | 559 | drivers/char/tty_io.c | tty->column = 0; |
tty | 560 | drivers/char/tty_io.c | if (O_ONLCR(tty)) { |
tty | 561 | drivers/char/tty_io.c | if (LEFT(&tty->write_q) < 2) |
tty | 563 | drivers/char/tty_io.c | put_tty_queue('\r', &tty->write_q); |
tty | 564 | drivers/char/tty_io.c | tty->column = 0; |
tty | 566 | drivers/char/tty_io.c | tty->canon_column = tty->column; |
tty | 569 | drivers/char/tty_io.c | if (O_ONOCR(tty) && tty->column == 0) |
tty | 571 | drivers/char/tty_io.c | if (O_OCRNL(tty)) { |
tty | 573 | drivers/char/tty_io.c | if (O_ONLRET(tty)) |
tty | 574 | drivers/char/tty_io.c | tty->canon_column = tty->column = 0; |
tty | 577 | drivers/char/tty_io.c | tty->canon_column = tty->column = 0; |
tty | 580 | drivers/char/tty_io.c | if (O_TABDLY(tty) == XTABS) { |
tty | 581 | drivers/char/tty_io.c | if (LEFT(&tty->write_q) < 8) |
tty | 584 | drivers/char/tty_io.c | put_tty_queue(' ', &tty->write_q); |
tty | 585 | drivers/char/tty_io.c | while (++tty->column % 8); |
tty | 588 | drivers/char/tty_io.c | tty->column = (tty->column | 7) + 1; |
tty | 591 | drivers/char/tty_io.c | if (tty->column > 0) |
tty | 592 | drivers/char/tty_io.c | tty->column--; |
tty | 595 | drivers/char/tty_io.c | if (O_OLCUC(tty)) |
tty | 598 | drivers/char/tty_io.c | tty->column++; |
tty | 602 | drivers/char/tty_io.c | put_tty_queue(c, &tty->write_q); |
tty | 608 | drivers/char/tty_io.c | static void echo_char(unsigned char c, struct tty_struct *tty) |
tty | 610 | drivers/char/tty_io.c | if (L_ECHOCTL(tty) && iscntrl(c) && c != '\t') { |
tty | 611 | drivers/char/tty_io.c | opost('^', tty); |
tty | 612 | drivers/char/tty_io.c | opost(c ^ 0100, tty); |
tty | 614 | drivers/char/tty_io.c | opost(c, tty); |
tty | 617 | drivers/char/tty_io.c | static void eraser(unsigned char c, struct tty_struct *tty) |
tty | 622 | drivers/char/tty_io.c | if (tty->secondary.head == tty->canon_head) { |
tty | 626 | drivers/char/tty_io.c | if (c == ERASE_CHAR(tty)) |
tty | 628 | drivers/char/tty_io.c | else if (c == WERASE_CHAR(tty)) |
tty | 631 | drivers/char/tty_io.c | if (!L_ECHO(tty)) { |
tty | 632 | drivers/char/tty_io.c | tty->secondary.head = tty->canon_head; |
tty | 635 | drivers/char/tty_io.c | if (!L_ECHOK(tty) || !L_ECHOKE(tty)) { |
tty | 636 | drivers/char/tty_io.c | tty->secondary.head = tty->canon_head; |
tty | 637 | drivers/char/tty_io.c | if (tty->erasing) { |
tty | 638 | drivers/char/tty_io.c | opost('/', tty); |
tty | 639 | drivers/char/tty_io.c | tty->erasing = 0; |
tty | 641 | drivers/char/tty_io.c | echo_char(KILL_CHAR(tty), tty); |
tty | 643 | drivers/char/tty_io.c | if (L_ECHOK(tty)) |
tty | 644 | drivers/char/tty_io.c | opost('\n', tty); |
tty | 651 | drivers/char/tty_io.c | while (tty->secondary.head != tty->canon_head) { |
tty | 652 | drivers/char/tty_io.c | c = LAST(&tty->secondary); |
tty | 660 | drivers/char/tty_io.c | DEC(tty->secondary.head); |
tty | 661 | drivers/char/tty_io.c | if (L_ECHO(tty)) { |
tty | 662 | drivers/char/tty_io.c | if (L_ECHOPRT(tty)) { |
tty | 663 | drivers/char/tty_io.c | if (!tty->erasing) { |
tty | 664 | drivers/char/tty_io.c | opost('\\', tty); |
tty | 665 | drivers/char/tty_io.c | tty->erasing = 1; |
tty | 667 | drivers/char/tty_io.c | echo_char(c, tty); |
tty | 668 | drivers/char/tty_io.c | } else if (!L_ECHOE(tty)) { |
tty | 669 | drivers/char/tty_io.c | echo_char(ERASE_CHAR(tty), tty); |
tty | 671 | drivers/char/tty_io.c | unsigned int col = tty->canon_column; |
tty | 672 | drivers/char/tty_io.c | unsigned long tail = tty->canon_head; |
tty | 675 | drivers/char/tty_io.c | while (tail != tty->secondary.head) { |
tty | 676 | drivers/char/tty_io.c | c = tty->secondary.buf[tail]; |
tty | 680 | drivers/char/tty_io.c | if (L_ECHOCTL(tty)) |
tty | 688 | drivers/char/tty_io.c | while (tty->column > col) { |
tty | 690 | drivers/char/tty_io.c | put_tty_queue('\b', &tty->write_q); |
tty | 691 | drivers/char/tty_io.c | tty->column--; |
tty | 694 | drivers/char/tty_io.c | if (iscntrl(c) && L_ECHOCTL(tty)) { |
tty | 695 | drivers/char/tty_io.c | opost('\b', tty); |
tty | 696 | drivers/char/tty_io.c | opost(' ', tty); |
tty | 697 | drivers/char/tty_io.c | opost('\b', tty); |
tty | 699 | drivers/char/tty_io.c | if (!iscntrl(c) || L_ECHOCTL(tty)) { |
tty | 700 | drivers/char/tty_io.c | opost('\b', tty); |
tty | 701 | drivers/char/tty_io.c | opost(' ', tty); |
tty | 702 | drivers/char/tty_io.c | opost('\b', tty); |
tty | 709 | drivers/char/tty_io.c | if (tty->erasing && tty->secondary.head == tty->canon_head) { |
tty | 710 | drivers/char/tty_io.c | opost('/', tty); |
tty | 711 | drivers/char/tty_io.c | tty->erasing = 0; |
tty | 715 | drivers/char/tty_io.c | static void isig(int sig, struct tty_struct *tty) |
tty | 717 | drivers/char/tty_io.c | kill_pg(tty->pgrp, sig, 1); |
tty | 718 | drivers/char/tty_io.c | if (!L_NOFLSH(tty)) { |
tty | 719 | drivers/char/tty_io.c | flush_input(tty); |
tty | 720 | drivers/char/tty_io.c | flush_output(tty); |
tty | 724 | drivers/char/tty_io.c | static void copy_to_cooked(struct tty_struct * tty) |
tty | 729 | drivers/char/tty_io.c | if (!tty) { |
tty | 733 | drivers/char/tty_io.c | if (!tty->write) { |
tty | 735 | drivers/char/tty_io.c | tty->line); |
tty | 743 | drivers/char/tty_io.c | c = LEFT(&tty->secondary); |
tty | 744 | drivers/char/tty_io.c | if (tty->throttle && (c < SQ_THRESHOLD_LW) |
tty | 745 | drivers/char/tty_io.c | && !set_bit(TTY_SQ_THROTTLED, &tty->flags)) |
tty | 746 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_SQ_FULL); |
tty | 750 | drivers/char/tty_io.c | if (!EMPTY(&tty->read_q)) { |
tty | 751 | drivers/char/tty_io.c | c = tty->read_q.buf[tty->read_q.tail]; |
tty | 752 | drivers/char/tty_io.c | special_flag = clear_bit(tty->read_q.tail, |
tty | 753 | drivers/char/tty_io.c | &tty->readq_flags); |
tty | 754 | drivers/char/tty_io.c | INC(tty->read_q.tail); |
tty | 761 | drivers/char/tty_io.c | tty->char_error = c; |
tty | 764 | drivers/char/tty_io.c | if (tty->char_error) { |
tty | 765 | drivers/char/tty_io.c | if (tty->char_error == TTY_BREAK) { |
tty | 766 | drivers/char/tty_io.c | tty->char_error = 0; |
tty | 767 | drivers/char/tty_io.c | if (I_IGNBRK(tty)) |
tty | 770 | drivers/char/tty_io.c | if (I_BRKINT(tty)) |
tty | 772 | drivers/char/tty_io.c | if (I_PARMRK(tty)) { |
tty | 773 | drivers/char/tty_io.c | put_tty_queue('\377', &tty->secondary); |
tty | 774 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 776 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 779 | drivers/char/tty_io.c | if (tty->char_error == TTY_OVERRUN) { |
tty | 780 | drivers/char/tty_io.c | tty->char_error = 0; |
tty | 781 | drivers/char/tty_io.c | printk("tty%d: input overrun\n", tty->line); |
tty | 785 | drivers/char/tty_io.c | tty->char_error = 0; |
tty | 786 | drivers/char/tty_io.c | if (I_IGNPAR(tty)) { |
tty | 789 | drivers/char/tty_io.c | if (I_PARMRK(tty)) { |
tty | 790 | drivers/char/tty_io.c | put_tty_queue('\377', &tty->secondary); |
tty | 791 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 792 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 794 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 797 | drivers/char/tty_io.c | if (I_ISTRIP(tty)) |
tty | 799 | drivers/char/tty_io.c | if (!tty->lnext) { |
tty | 801 | drivers/char/tty_io.c | if (I_IGNCR(tty)) |
tty | 803 | drivers/char/tty_io.c | if (I_ICRNL(tty)) |
tty | 805 | drivers/char/tty_io.c | } else if (c == '\n' && I_INLCR(tty)) |
tty | 808 | drivers/char/tty_io.c | if (I_IUCLC(tty) && L_IEXTEN(tty)) |
tty | 811 | drivers/char/tty_io.c | tty->lnext = 1; |
tty | 812 | drivers/char/tty_io.c | if (L_ICANON(tty) && !tty->lnext) { |
tty | 813 | drivers/char/tty_io.c | if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || |
tty | 814 | drivers/char/tty_io.c | (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { |
tty | 815 | drivers/char/tty_io.c | eraser(c, tty); |
tty | 818 | drivers/char/tty_io.c | if (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) { |
tty | 819 | drivers/char/tty_io.c | tty->lnext = 1; |
tty | 820 | drivers/char/tty_io.c | if (L_ECHO(tty)) { |
tty | 821 | drivers/char/tty_io.c | if (tty->erasing) { |
tty | 822 | drivers/char/tty_io.c | opost('/', tty); |
tty | 823 | drivers/char/tty_io.c | tty->erasing = 0; |
tty | 825 | drivers/char/tty_io.c | if (L_ECHOCTL(tty)) { |
tty | 826 | drivers/char/tty_io.c | opost('^', tty); |
tty | 827 | drivers/char/tty_io.c | opost('\b', tty); |
tty | 832 | drivers/char/tty_io.c | if (c == REPRINT_CHAR(tty) && L_ECHO(tty) && |
tty | 833 | drivers/char/tty_io.c | L_IEXTEN(tty)) { |
tty | 834 | drivers/char/tty_io.c | unsigned long tail = tty->canon_head; |
tty | 836 | drivers/char/tty_io.c | if (tty->erasing) { |
tty | 837 | drivers/char/tty_io.c | opost('/', tty); |
tty | 838 | drivers/char/tty_io.c | tty->erasing = 0; |
tty | 840 | drivers/char/tty_io.c | echo_char(c, tty); |
tty | 841 | drivers/char/tty_io.c | opost('\n', tty); |
tty | 842 | drivers/char/tty_io.c | while (tail != tty->secondary.head) { |
tty | 843 | drivers/char/tty_io.c | echo_char(tty->secondary.buf[tail], |
tty | 844 | drivers/char/tty_io.c | tty); |
tty | 850 | drivers/char/tty_io.c | if (I_IXON(tty) && !tty->lnext) { |
tty | 851 | drivers/char/tty_io.c | if ((tty->stopped && I_IXANY(tty) && L_IEXTEN(tty)) || |
tty | 852 | drivers/char/tty_io.c | c == START_CHAR(tty)) { |
tty | 853 | drivers/char/tty_io.c | start_tty(tty); |
tty | 856 | drivers/char/tty_io.c | if (c == STOP_CHAR(tty)) { |
tty | 857 | drivers/char/tty_io.c | stop_tty(tty); |
tty | 861 | drivers/char/tty_io.c | if (L_ISIG(tty) && !tty->lnext) { |
tty | 862 | drivers/char/tty_io.c | if (c == INTR_CHAR(tty)) { |
tty | 863 | drivers/char/tty_io.c | isig(SIGINT, tty); |
tty | 866 | drivers/char/tty_io.c | if (c == QUIT_CHAR(tty)) { |
tty | 867 | drivers/char/tty_io.c | isig(SIGQUIT, tty); |
tty | 870 | drivers/char/tty_io.c | if (c == SUSP_CHAR(tty)) { |
tty | 871 | drivers/char/tty_io.c | if (!is_orphaned_pgrp(tty->pgrp)) |
tty | 872 | drivers/char/tty_io.c | isig(SIGTSTP, tty); |
tty | 877 | drivers/char/tty_io.c | if (tty->erasing) { |
tty | 878 | drivers/char/tty_io.c | opost('/', tty); |
tty | 879 | drivers/char/tty_io.c | tty->erasing = 0; |
tty | 881 | drivers/char/tty_io.c | if (c == '\n' && !tty->lnext) { |
tty | 882 | drivers/char/tty_io.c | if (L_ECHO(tty) || (L_ICANON(tty) && L_ECHONL(tty))) |
tty | 883 | drivers/char/tty_io.c | opost('\n', tty); |
tty | 884 | drivers/char/tty_io.c | } else if (L_ECHO(tty)) { |
tty | 888 | drivers/char/tty_io.c | if (c != EOF_CHAR(tty) || !L_ICANON(tty) || |
tty | 889 | drivers/char/tty_io.c | tty->lnext) { |
tty | 891 | drivers/char/tty_io.c | if (tty->canon_head == tty->secondary.head) |
tty | 892 | drivers/char/tty_io.c | tty->canon_column = tty->column; |
tty | 893 | drivers/char/tty_io.c | echo_char(c, tty); |
tty | 897 | drivers/char/tty_io.c | if (I_PARMRK(tty) && c == (unsigned char) '\377' && |
tty | 898 | drivers/char/tty_io.c | (c != EOF_CHAR(tty) || !L_ICANON(tty) || tty->lnext)) |
tty | 899 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 901 | drivers/char/tty_io.c | if (L_ICANON(tty) && !tty->lnext && |
tty | 902 | drivers/char/tty_io.c | (c == '\n' || c == EOF_CHAR(tty) || c == EOL_CHAR(tty) || |
tty | 903 | drivers/char/tty_io.c | (c == EOL2_CHAR(tty) && L_IEXTEN(tty)))) { |
tty | 904 | drivers/char/tty_io.c | if (c == EOF_CHAR(tty)) |
tty | 906 | drivers/char/tty_io.c | set_bit(tty->secondary.head, &tty->secondary_flags); |
tty | 907 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 908 | drivers/char/tty_io.c | tty->canon_head = tty->secondary.head; |
tty | 909 | drivers/char/tty_io.c | tty->canon_data++; |
tty | 911 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 912 | drivers/char/tty_io.c | tty->lnext = 0; |
tty | 914 | drivers/char/tty_io.c | if (!EMPTY(&tty->write_q)) |
tty | 915 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 916 | drivers/char/tty_io.c | if (L_ICANON(tty) ? tty->canon_data : !EMPTY(&tty->secondary)) |
tty | 917 | drivers/char/tty_io.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 919 | drivers/char/tty_io.c | if (tty->throttle && (LEFT(&tty->read_q) >= RQ_THRESHOLD_HW) |
tty | 920 | drivers/char/tty_io.c | && clear_bit(TTY_RQ_THROTTLED, &tty->flags)) |
tty | 921 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_RQ_AVAIL); |
tty | 930 | drivers/char/tty_io.c | static inline int input_available_p(struct tty_struct *tty) |
tty | 933 | drivers/char/tty_io.c | if (L_ICANON(tty) ? tty->canon_data : !EMPTY(&tty->secondary)) |
tty | 937 | drivers/char/tty_io.c | TTY_READ_FLUSH(tty); |
tty | 938 | drivers/char/tty_io.c | if (tty->link) |
tty | 939 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty->link); |
tty | 941 | drivers/char/tty_io.c | if (L_ICANON(tty) ? tty->canon_data : !EMPTY(&tty->secondary)) |
tty | 946 | drivers/char/tty_io.c | static int read_chan(struct tty_struct *tty, struct file *file, |
tty | 961 | drivers/char/tty_io.c | current->tty == tty->line) { |
tty | 962 | drivers/char/tty_io.c | if (tty->pgrp <= 0) |
tty | 964 | drivers/char/tty_io.c | else if (current->pgrp != tty->pgrp) { |
tty | 973 | drivers/char/tty_io.c | if (L_ICANON(tty)) { |
tty | 977 | drivers/char/tty_io.c | time = (HZ / 10) * TIME_CHAR(tty); |
tty | 978 | drivers/char/tty_io.c | minimum = MIN_CHAR(tty); |
tty | 991 | drivers/char/tty_io.c | add_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 994 | drivers/char/tty_io.c | if (tty->packet && tty->link->ctrl_status) { |
tty | 997 | drivers/char/tty_io.c | put_fs_byte(tty->link->ctrl_status, b++); |
tty | 998 | drivers/char/tty_io.c | tty->link->ctrl_status = 0; |
tty | 1005 | drivers/char/tty_io.c | if (!input_available_p(tty)) { |
tty | 1006 | drivers/char/tty_io.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) { |
tty | 1028 | drivers/char/tty_io.c | if (tty->packet && b == buf) { |
tty | 1037 | drivers/char/tty_io.c | if (EMPTY(&tty->secondary)) { |
tty | 1041 | drivers/char/tty_io.c | eol = clear_bit(tty->secondary.tail, |
tty | 1042 | drivers/char/tty_io.c | &tty->secondary_flags); |
tty | 1043 | drivers/char/tty_io.c | c = tty->secondary.buf[tty->secondary.tail]; |
tty | 1052 | drivers/char/tty_io.c | tty->canon_data--; |
tty | 1053 | drivers/char/tty_io.c | INC(tty->secondary.tail); |
tty | 1055 | drivers/char/tty_io.c | set_bit(tty->secondary.tail, |
tty | 1056 | drivers/char/tty_io.c | &tty->secondary_flags); |
tty | 1062 | drivers/char/tty_io.c | INC(tty->secondary.tail); |
tty | 1065 | drivers/char/tty_io.c | if (--tty->canon_data < 0) { |
tty | 1067 | drivers/char/tty_io.c | tty->canon_data = 0; |
tty | 1081 | drivers/char/tty_io.c | if (tty->throttle && (LEFT(&tty->secondary) >= SQ_THRESHOLD_HW) |
tty | 1082 | drivers/char/tty_io.c | && clear_bit(TTY_SQ_THROTTLED, &tty->flags)) |
tty | 1083 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_SQ_AVAIL); |
tty | 1090 | drivers/char/tty_io.c | remove_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 1096 | drivers/char/tty_io.c | static int write_chan(struct tty_struct * tty, struct file * file, |
tty | 1105 | drivers/char/tty_io.c | if (L_TOSTOP(tty) && file->f_inode->i_rdev != CONSOLE_DEV) { |
tty | 1106 | drivers/char/tty_io.c | retval = check_change(tty, tty->line); |
tty | 1111 | drivers/char/tty_io.c | add_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 1118 | drivers/char/tty_io.c | if (tty_hung_up_p(file) || (tty->link && !tty->link->count)) { |
tty | 1126 | drivers/char/tty_io.c | if (opost(c, tty) < 0) |
tty | 1130 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 1133 | drivers/char/tty_io.c | if (EMPTY(&tty->write_q) && !need_resched) |
tty | 1142 | drivers/char/tty_io.c | remove_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 1149 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1157 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1158 | drivers/char/tty_io.c | if (!tty || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 1167 | drivers/char/tty_io.c | (tty->pgrp > 0) && |
tty | 1168 | drivers/char/tty_io.c | (current->tty == dev) && |
tty | 1169 | drivers/char/tty_io.c | (tty->pgrp != current->pgrp)) |
tty | 1177 | drivers/char/tty_io.c | if (ldiscs[tty->disc].read) |
tty | 1179 | drivers/char/tty_io.c | i = (ldiscs[tty->disc].read)(tty,file,(unsigned char *)buf,(unsigned int)count); |
tty | 1190 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1200 | drivers/char/tty_io.c | tty = redirect; |
tty | 1202 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1203 | drivers/char/tty_io.c | if (!tty || !tty->write || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 1206 | drivers/char/tty_io.c | if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) && |
tty | 1207 | drivers/char/tty_io.c | (current->tty == dev) && (tty->pgrp != current->pgrp)) { |
tty | 1216 | drivers/char/tty_io.c | if (ldiscs[tty->disc].write) |
tty | 1218 | drivers/char/tty_io.c | i = (ldiscs[tty->disc].write)(tty,file,(unsigned char *)buf,(unsigned int)count); |
tty | 1233 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 1239 | drivers/char/tty_io.c | tty = o_tty = NULL; |
tty | 1247 | drivers/char/tty_io.c | if (!tty_table[dev] && !tty) { |
tty | 1248 | drivers/char/tty_io.c | if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL))) |
tty | 1250 | drivers/char/tty_io.c | initialize_tty_struct(dev, tty); |
tty | 1302 | drivers/char/tty_io.c | tty->termios = tty_termios[dev]; |
tty | 1303 | drivers/char/tty_io.c | tty_table[dev] = tty; |
tty | 1304 | drivers/char/tty_io.c | tty = NULL; |
tty | 1332 | drivers/char/tty_io.c | if (tty) |
tty | 1333 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1354 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 1358 | drivers/char/tty_io.c | tty = tty_table[dev]; |
tty | 1362 | drivers/char/tty_io.c | if (!tty) { |
tty | 1371 | drivers/char/tty_io.c | printk("release_dev of tty%d (tty count=%d)...", dev, tty->count); |
tty | 1384 | drivers/char/tty_io.c | if (tty->link != o_tty || o_tty->link != tty) { |
tty | 1389 | drivers/char/tty_io.c | tty->write_data_cnt = 0; /* Clear out pending trash */ |
tty | 1390 | drivers/char/tty_io.c | if (tty->close) |
tty | 1391 | drivers/char/tty_io.c | tty->close(tty, filp); |
tty | 1393 | drivers/char/tty_io.c | if (--tty->link->count < 0) { |
tty | 1395 | drivers/char/tty_io.c | dev, tty->count); |
tty | 1396 | drivers/char/tty_io.c | tty->link->count = 0; |
tty | 1399 | drivers/char/tty_io.c | if (--tty->count < 0) { |
tty | 1401 | drivers/char/tty_io.c | dev, tty->count); |
tty | 1402 | drivers/char/tty_io.c | tty->count = 0; |
tty | 1404 | drivers/char/tty_io.c | if (tty->count) |
tty | 1416 | drivers/char/tty_io.c | if ((*p) && (*p)->tty == tty->line) |
tty | 1417 | drivers/char/tty_io.c | (*p)->tty = -1; |
tty | 1424 | drivers/char/tty_io.c | if (ldiscs[tty->disc].close != NULL) |
tty | 1425 | drivers/char/tty_io.c | ldiscs[tty->disc].close(tty); |
tty | 1426 | drivers/char/tty_io.c | tty->disc = N_TTY; |
tty | 1427 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 1442 | drivers/char/tty_io.c | if (tty == redirect || o_tty == redirect) |
tty | 1444 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1465 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 1476 | drivers/char/tty_io.c | minor = current->tty; |
tty | 1496 | drivers/char/tty_io.c | tty = tty_table[minor]; |
tty | 1498 | drivers/char/tty_io.c | printk("opening tty%d...", tty->line); |
tty | 1500 | drivers/char/tty_io.c | if (test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser()) |
tty | 1516 | drivers/char/tty_io.c | tty->ctrl_status = 0; |
tty | 1517 | drivers/char/tty_io.c | tty->packet = 0; |
tty | 1520 | drivers/char/tty_io.c | if (tty->open) { |
tty | 1521 | drivers/char/tty_io.c | retval = tty->open(tty, filp); |
tty | 1527 | drivers/char/tty_io.c | printk("error %d in opening tty%d...", retval, tty->line); |
tty | 1540 | drivers/char/tty_io.c | current->tty<0 && |
tty | 1541 | drivers/char/tty_io.c | tty->session==0) { |
tty | 1542 | drivers/char/tty_io.c | current->tty = minor; |
tty | 1543 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1544 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1575 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1583 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1584 | drivers/char/tty_io.c | if (!tty) { |
tty | 1588 | drivers/char/tty_io.c | if (ldiscs[tty->disc].select) |
tty | 1589 | drivers/char/tty_io.c | return (ldiscs[tty->disc].select)(tty, inode, filp, |
tty | 1594 | drivers/char/tty_io.c | static int normal_select(struct tty_struct * tty, struct inode * inode, |
tty | 1599 | drivers/char/tty_io.c | if (input_available_p(tty)) |
tty | 1603 | drivers/char/tty_io.c | if (tty->packet && tty->link->ctrl_status) |
tty | 1605 | drivers/char/tty_io.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 1609 | drivers/char/tty_io.c | select_wait(&tty->secondary.proc_list, wait); |
tty | 1612 | drivers/char/tty_io.c | if (LEFT(&tty->write_q) > WAKEUP_CHARS) |
tty | 1614 | drivers/char/tty_io.c | select_wait(&tty->write_q.proc_list, wait); |
tty | 1632 | drivers/char/tty_io.c | void do_SAK( struct tty_struct *tty) |
tty | 1635 | drivers/char/tty_io.c | tty_hangup(tty); |
tty | 1638 | drivers/char/tty_io.c | int line = tty->line; |
tty | 1639 | drivers/char/tty_io.c | int session = tty->session; |
tty | 1643 | drivers/char/tty_io.c | flush_input(tty); |
tty | 1644 | drivers/char/tty_io.c | flush_output(tty); |
tty | 1648 | drivers/char/tty_io.c | if (((*p)->tty == line) || |
tty | 1680 | drivers/char/tty_io.c | int tty_write_data(struct tty_struct *tty, char *bufp, int buflen, |
tty | 1691 | drivers/char/tty_io.c | if (tty->write_data_cnt) { |
tty | 1696 | drivers/char/tty_io.c | head = tty->write_q.head; |
tty | 1697 | drivers/char/tty_io.c | tail = tty->write_q.tail; |
tty | 1702 | drivers/char/tty_io.c | tty->write_q.buf[head++] = *p++; |
tty | 1706 | drivers/char/tty_io.c | tty->write_q.head = head; |
tty | 1708 | drivers/char/tty_io.c | tty->write_data_cnt = count; |
tty | 1709 | drivers/char/tty_io.c | tty->write_data_ptr = (unsigned char *) p; |
tty | 1710 | drivers/char/tty_io.c | tty->write_data_callback = callback; |
tty | 1711 | drivers/char/tty_io.c | tty->write_data_arg = callarg; |
tty | 1714 | drivers/char/tty_io.c | tty->write(tty); |
tty | 1731 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1740 | drivers/char/tty_io.c | tty = tty_table[line]; |
tty | 1741 | drivers/char/tty_io.c | if (!tty || !tty->write_data_cnt) |
tty | 1744 | drivers/char/tty_io.c | head = tty->write_q.head; |
tty | 1745 | drivers/char/tty_io.c | tail = tty->write_q.tail; |
tty | 1746 | drivers/char/tty_io.c | count = tty->write_data_cnt; |
tty | 1747 | drivers/char/tty_io.c | p = tty->write_data_ptr; |
tty | 1750 | drivers/char/tty_io.c | tty->write_q.buf[head++] = *p++; |
tty | 1754 | drivers/char/tty_io.c | tty->write_q.head = head; |
tty | 1755 | drivers/char/tty_io.c | tty->write_data_ptr = p; |
tty | 1756 | drivers/char/tty_io.c | tty->write_data_cnt = count; |
tty | 1759 | drivers/char/tty_io.c | (tty->write_data_callback) |
tty | 1760 | drivers/char/tty_io.c | (tty->write_data_arg); |
tty | 1771 | drivers/char/tty_io.c | static void initialize_tty_struct(int line, struct tty_struct *tty) |
tty | 1773 | drivers/char/tty_io.c | memset(tty, 0, sizeof(struct tty_struct)); |
tty | 1774 | drivers/char/tty_io.c | tty->line = line; |
tty | 1775 | drivers/char/tty_io.c | tty->disc = N_TTY; |
tty | 1776 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 1778 | drivers/char/tty_io.c | tty->open = con_open; |
tty | 1779 | drivers/char/tty_io.c | tty->winsize.ws_row = video_num_lines; |
tty | 1780 | drivers/char/tty_io.c | tty->winsize.ws_col = video_num_columns; |
tty | 1782 | drivers/char/tty_io.c | tty->open = rs_open; |
tty | 1784 | drivers/char/tty_io.c | tty->open = pty_open; |
tty | 40 | drivers/char/tty_ioctl.c | extern int paste_selection(struct tty_struct *tty); |
tty | 43 | drivers/char/tty_ioctl.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc); |
tty | 45 | drivers/char/tty_ioctl.c | void flush_input(struct tty_struct * tty) |
tty | 48 | drivers/char/tty_ioctl.c | tty->read_q.head = tty->read_q.tail = 0; |
tty | 49 | drivers/char/tty_ioctl.c | tty->secondary.head = tty->secondary.tail = 0; |
tty | 50 | drivers/char/tty_ioctl.c | tty->canon_head = tty->canon_data = tty->erasing = 0; |
tty | 51 | drivers/char/tty_ioctl.c | memset(&tty->readq_flags, 0, sizeof tty->readq_flags); |
tty | 52 | drivers/char/tty_ioctl.c | memset(&tty->secondary_flags, 0, sizeof tty->secondary_flags); |
tty | 54 | drivers/char/tty_ioctl.c | if (!tty->link) |
tty | 57 | drivers/char/tty_ioctl.c | tty->link->write_q.head = tty->link->write_q.tail = 0; |
tty | 58 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->write_q.proc_list); |
tty | 59 | drivers/char/tty_ioctl.c | if (tty->link->packet) { |
tty | 60 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_FLUSHREAD; |
tty | 61 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 65 | drivers/char/tty_ioctl.c | void flush_output(struct tty_struct * tty) |
tty | 68 | drivers/char/tty_ioctl.c | tty->write_q.head = tty->write_q.tail = 0; |
tty | 70 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 71 | drivers/char/tty_ioctl.c | if (!tty->link) |
tty | 74 | drivers/char/tty_ioctl.c | tty->link->read_q.head = tty->link->read_q.tail = 0; |
tty | 75 | drivers/char/tty_ioctl.c | tty->link->secondary.head = tty->link->secondary.tail = 0; |
tty | 76 | drivers/char/tty_ioctl.c | tty->link->canon_head = tty->link->canon_data = tty->link->erasing = 0; |
tty | 77 | drivers/char/tty_ioctl.c | memset(&tty->link->readq_flags, 0, sizeof tty->readq_flags); |
tty | 78 | drivers/char/tty_ioctl.c | memset(&tty->link->secondary_flags, 0, sizeof tty->secondary_flags); |
tty | 79 | drivers/char/tty_ioctl.c | if (tty->link->packet) { |
tty | 80 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_FLUSHWRITE; |
tty | 81 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 85 | drivers/char/tty_ioctl.c | void wait_until_sent(struct tty_struct * tty, int timeout) |
tty | 89 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 90 | drivers/char/tty_ioctl.c | if (EMPTY(&tty->write_q)) |
tty | 92 | drivers/char/tty_ioctl.c | add_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 102 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 103 | drivers/char/tty_ioctl.c | if (EMPTY(&tty->write_q)) |
tty | 108 | drivers/char/tty_ioctl.c | remove_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 163 | drivers/char/tty_ioctl.c | int check_change(struct tty_struct * tty, int channel) |
tty | 168 | drivers/char/tty_ioctl.c | if (current->tty != channel) |
tty | 170 | drivers/char/tty_ioctl.c | if (tty->pgrp <= 0) { |
tty | 174 | drivers/char/tty_ioctl.c | if (current->pgrp == tty->pgrp) |
tty | 184 | drivers/char/tty_ioctl.c | static int set_termios_2(struct tty_struct * tty, struct termios * termios) |
tty | 186 | drivers/char/tty_ioctl.c | struct termios old_termios = *tty->termios; |
tty | 191 | drivers/char/tty_ioctl.c | *tty->termios = *termios; |
tty | 193 | drivers/char/tty_ioctl.c | memset(&tty->secondary_flags, 0, sizeof tty->secondary_flags); |
tty | 194 | drivers/char/tty_ioctl.c | tty->canon_head = tty->secondary.tail; |
tty | 195 | drivers/char/tty_ioctl.c | tty->canon_data = 0; |
tty | 196 | drivers/char/tty_ioctl.c | tty->erasing = 0; |
tty | 199 | drivers/char/tty_ioctl.c | if (canon_change && !L_ICANON(tty) && !EMPTY(&tty->secondary)) |
tty | 201 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 205 | drivers/char/tty_ioctl.c | if (tty->link && tty->link->packet) { |
tty | 209 | drivers/char/tty_ioctl.c | int new_flow = (I_IXON(tty) && |
tty | 210 | drivers/char/tty_ioctl.c | STOP_CHAR(tty) == '\023' && |
tty | 211 | drivers/char/tty_ioctl.c | START_CHAR(tty) == '\021'); |
tty | 213 | drivers/char/tty_ioctl.c | tty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP); |
tty | 215 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_DOSTOP; |
tty | 217 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_NOSTOP; |
tty | 218 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 222 | drivers/char/tty_ioctl.c | unset_locked_termios(tty->termios, &old_termios, |
tty | 223 | drivers/char/tty_ioctl.c | termios_locked[tty->line]); |
tty | 225 | drivers/char/tty_ioctl.c | if (tty->set_termios) |
tty | 226 | drivers/char/tty_ioctl.c | (*tty->set_termios)(tty, &old_termios); |
tty | 231 | drivers/char/tty_ioctl.c | static int set_termios(struct tty_struct * tty, struct termios * termios, |
tty | 237 | drivers/char/tty_ioctl.c | return set_termios_2(tty, &tmp_termios); |
tty | 240 | drivers/char/tty_ioctl.c | static int get_termio(struct tty_struct * tty, struct termio * termio) |
tty | 248 | drivers/char/tty_ioctl.c | tmp_termio.c_iflag = tty->termios->c_iflag; |
tty | 249 | drivers/char/tty_ioctl.c | tmp_termio.c_oflag = tty->termios->c_oflag; |
tty | 250 | drivers/char/tty_ioctl.c | tmp_termio.c_cflag = tty->termios->c_cflag; |
tty | 251 | drivers/char/tty_ioctl.c | tmp_termio.c_lflag = tty->termios->c_lflag; |
tty | 252 | drivers/char/tty_ioctl.c | tmp_termio.c_line = tty->termios->c_line; |
tty | 254 | drivers/char/tty_ioctl.c | tmp_termio.c_cc[i] = tty->termios->c_cc[i]; |
tty | 259 | drivers/char/tty_ioctl.c | static int set_termio(struct tty_struct * tty, struct termio * termio, |
tty | 265 | drivers/char/tty_ioctl.c | tmp_termios = *tty->termios; |
tty | 278 | drivers/char/tty_ioctl.c | return set_termios_2(tty, &tmp_termios); |
tty | 281 | drivers/char/tty_ioctl.c | static int set_window_size(struct tty_struct * tty, struct winsize * ws) |
tty | 286 | drivers/char/tty_ioctl.c | if (memcmp(&tmp_ws, &tty->winsize, sizeof (struct winsize)) && |
tty | 287 | drivers/char/tty_ioctl.c | tty->pgrp > 0) |
tty | 288 | drivers/char/tty_ioctl.c | kill_pg(tty->pgrp, SIGWINCH, 1); |
tty | 289 | drivers/char/tty_ioctl.c | tty->winsize = tmp_ws; |
tty | 294 | drivers/char/tty_ioctl.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc) |
tty | 300 | drivers/char/tty_ioctl.c | if (tty->disc == ldisc) |
tty | 304 | drivers/char/tty_ioctl.c | wait_until_sent(tty, 0); |
tty | 305 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 306 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].close) |
tty | 307 | drivers/char/tty_ioctl.c | ldiscs[tty->disc].close(tty); |
tty | 310 | drivers/char/tty_ioctl.c | tty->disc = ldisc; |
tty | 311 | drivers/char/tty_ioctl.c | tty->termios->c_line = ldisc; |
tty | 312 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].open) |
tty | 313 | drivers/char/tty_ioctl.c | return(ldiscs[tty->disc].open(tty)); |
tty | 318 | drivers/char/tty_ioctl.c | static unsigned long inq_canon(struct tty_struct * tty) |
tty | 322 | drivers/char/tty_ioctl.c | if (!tty->canon_data) |
tty | 324 | drivers/char/tty_ioctl.c | head = tty->canon_head; |
tty | 325 | drivers/char/tty_ioctl.c | tail = tty->secondary.tail; |
tty | 329 | drivers/char/tty_ioctl.c | if (test_bit(tail, &tty->secondary_flags) && |
tty | 330 | drivers/char/tty_ioctl.c | tty->secondary.buf[tail] == __DISABLED_CHAR) |
tty | 340 | drivers/char/tty_ioctl.c | struct tty_struct * tty; |
tty | 353 | drivers/char/tty_ioctl.c | tty = TTY_TABLE(dev); |
tty | 354 | drivers/char/tty_ioctl.c | if (!tty) |
tty | 364 | drivers/char/tty_ioctl.c | termios_tty = tty; |
tty | 406 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
tty | 411 | drivers/char/tty_ioctl.c | stop_tty(tty); |
tty | 414 | drivers/char/tty_ioctl.c | start_tty(tty); |
tty | 417 | drivers/char/tty_ioctl.c | if (STOP_CHAR(tty) != __DISABLED_CHAR) |
tty | 418 | drivers/char/tty_ioctl.c | put_tty_queue(STOP_CHAR(tty), |
tty | 419 | drivers/char/tty_ioctl.c | &tty->write_q); |
tty | 422 | drivers/char/tty_ioctl.c | if (START_CHAR(tty) != __DISABLED_CHAR) |
tty | 423 | drivers/char/tty_ioctl.c | put_tty_queue(START_CHAR(tty), |
tty | 424 | drivers/char/tty_ioctl.c | &tty->write_q); |
tty | 431 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
tty | 436 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 439 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 442 | drivers/char/tty_ioctl.c | flush_output(tty); |
tty | 449 | drivers/char/tty_ioctl.c | set_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 452 | drivers/char/tty_ioctl.c | clear_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 456 | drivers/char/tty_ioctl.c | (current->session == tty->session)) |
tty | 462 | drivers/char/tty_ioctl.c | if (!current->leader || (current->tty >= 0)) |
tty | 464 | drivers/char/tty_ioctl.c | if (tty->session > 0) { |
tty | 476 | drivers/char/tty_ioctl.c | if (p->tty == dev) |
tty | 477 | drivers/char/tty_ioctl.c | p->tty = -1; |
tty | 481 | drivers/char/tty_ioctl.c | current->tty = dev; |
tty | 482 | drivers/char/tty_ioctl.c | tty->session = current->session; |
tty | 483 | drivers/char/tty_ioctl.c | tty->pgrp = current->pgrp; |
tty | 493 | drivers/char/tty_ioctl.c | if (tty == termios_tty && current->tty != dev) |
tty | 501 | drivers/char/tty_ioctl.c | if ((current->tty < 0) || |
tty | 502 | drivers/char/tty_ioctl.c | (current->tty != termios_dev) || |
tty | 517 | drivers/char/tty_ioctl.c | put_fs_long(CHARS(&tty->write_q), |
tty | 525 | drivers/char/tty_ioctl.c | if (L_ICANON(tty)) |
tty | 526 | drivers/char/tty_ioctl.c | put_fs_long(inq_canon(tty), |
tty | 529 | drivers/char/tty_ioctl.c | put_fs_long(CHARS(&tty->secondary), |
tty | 533 | drivers/char/tty_ioctl.c | if ((current->tty != dev) && !suser()) |
tty | 538 | drivers/char/tty_ioctl.c | put_tty_queue(get_fs_byte((char *) arg), &tty->read_q); |
tty | 539 | drivers/char/tty_ioctl.c | TTY_READ_FLUSH(tty); |
tty | 546 | drivers/char/tty_ioctl.c | memcpy_tofs((struct winsize *) arg, &tty->winsize, |
tty | 552 | drivers/char/tty_ioctl.c | return set_window_size(tty,(struct winsize *) arg); |
tty | 564 | drivers/char/tty_ioctl.c | return paste_selection(tty); |
tty | 586 | drivers/char/tty_ioctl.c | redirect = tty; |
tty | 598 | drivers/char/tty_ioctl.c | if (current->tty != dev) |
tty | 602 | drivers/char/tty_ioctl.c | current->tty = -1; |
tty | 609 | drivers/char/tty_ioctl.c | put_fs_long(tty->disc, (unsigned long *) arg); |
tty | 612 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
tty | 616 | drivers/char/tty_ioctl.c | return tty_set_ldisc(tty, arg); |
tty | 643 | drivers/char/tty_ioctl.c | if (!tty->packet) { |
tty | 644 | drivers/char/tty_ioctl.c | tty->packet = 1; |
tty | 645 | drivers/char/tty_ioctl.c | tty->link->ctrl_status = 0; |
tty | 648 | drivers/char/tty_ioctl.c | tty->packet = 0; |
tty | 651 | drivers/char/tty_ioctl.c | retval = check_change(tty, dev); |
tty | 654 | drivers/char/tty_ioctl.c | wait_until_sent(tty, 0); |
tty | 655 | drivers/char/tty_ioctl.c | if (!tty->ioctl) |
tty | 657 | drivers/char/tty_ioctl.c | tty->ioctl(tty, file, cmd, arg); |
tty | 660 | drivers/char/tty_ioctl.c | if (tty->ioctl) { |
tty | 661 | drivers/char/tty_ioctl.c | retval = (tty->ioctl)(tty, file, cmd, arg); |
tty | 665 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].ioctl) { |
tty | 666 | drivers/char/tty_ioctl.c | retval = (ldiscs[tty->disc].ioctl) |
tty | 667 | drivers/char/tty_ioctl.c | (tty, file, cmd, arg); |
tty | 116 | drivers/char/vt.c | int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 123 | drivers/char/vt.c | console = tty->line - 1; |
tty | 237 | drivers/char/vt.c | flush_input(tty); |
tty | 157 | drivers/net/slip.c | sl->tty = NULL; |
tty | 177 | drivers/net/slip.c | sl_find(struct tty_struct *tty) |
tty | 182 | drivers/net/slip.c | if (tty == NULL) return(NULL); |
tty | 185 | drivers/net/slip.c | if (sl->tty == tty) return(sl); |
tty | 205 | drivers/net/slip.c | sl->tty = NULL; |
tty | 225 | drivers/net/slip.c | sl->tty = NULL; |
tty | 478 | drivers/net/slip.c | if (tty_write_data(sl->tty, (char *) bp, count, |
tty | 505 | drivers/net/slip.c | struct tty_struct *tty; |
tty | 511 | drivers/net/slip.c | tty = sl->tty; |
tty | 619 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 702 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 728 | drivers/net/slip.c | slip_recv(struct tty_struct *tty) |
tty | 735 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: slip_recv(%d) called\n", tty->line)); |
tty | 736 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) return; /* not connected */ |
tty | 743 | drivers/net/slip.c | count = tty_read_raw_data(tty, buff, 128); |
tty | 769 | drivers/net/slip.c | slip_open(struct tty_struct *tty) |
tty | 774 | drivers/net/slip.c | if ((sl = sl_find(tty)) != NULL) { |
tty | 776 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 783 | drivers/net/slip.c | tty->line)); |
tty | 786 | drivers/net/slip.c | sl->tty = tty; |
tty | 787 | drivers/net/slip.c | tty_read_flush(tty); |
tty | 788 | drivers/net/slip.c | tty_write_flush(tty); |
tty | 793 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 838 | drivers/net/slip.c | slip_close(struct tty_struct *tty) |
tty | 843 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) { |
tty | 844 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: TTY %d not connected !\n", tty->line)); |
tty | 850 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 1044 | drivers/net/slip.c | slip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) |
tty | 1050 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) { |
tty | 1051 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: ioctl: TTY %d not connected !\n", tty->line)); |
tty | 1055 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: ioctl(%d, 0x%X, 0x%X)\n", tty->line, cmd, arg)); |
tty | 38 | drivers/net/slip.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 484 | fs/open.c | struct tty_struct *tty; |
tty | 489 | fs/open.c | if (current->tty < 0) |
tty | 491 | fs/open.c | tty = TTY_TABLE(MINOR(current->tty)); |
tty | 492 | fs/open.c | tty_vhangup(tty); |
tty | 309 | fs/proc/array.c | tty_pgrp = (*p)->tty; |
tty | 323 | fs/proc/array.c | (*p)->tty, |
tty | 226 | include/linux/sched.h | int tty; /* -1 if no tty, so it must be signed */ |
tty | 28 | include/linux/serial.h | struct tty_struct *tty; |
tty | 148 | include/linux/tty.h | #define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) |
tty | 149 | include/linux/tty.h | #define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) |
tty | 150 | include/linux/tty.h | #define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) |
tty | 151 | include/linux/tty.h | #define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) |
tty | 152 | include/linux/tty.h | #define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) |
tty | 153 | include/linux/tty.h | #define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME]) |
tty | 154 | include/linux/tty.h | #define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN]) |
tty | 155 | include/linux/tty.h | #define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC]) |
tty | 156 | include/linux/tty.h | #define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) |
tty | 157 | include/linux/tty.h | #define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) |
tty | 158 | include/linux/tty.h | #define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) |
tty | 159 | include/linux/tty.h | #define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL]) |
tty | 160 | include/linux/tty.h | #define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT]) |
tty | 161 | include/linux/tty.h | #define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD]) |
tty | 162 | include/linux/tty.h | #define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) |
tty | 163 | include/linux/tty.h | #define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) |
tty | 164 | include/linux/tty.h | #define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2]) |
tty | 166 | include/linux/tty.h | #define _I_FLAG(tty,f) ((tty)->termios->c_iflag & (f)) |
tty | 167 | include/linux/tty.h | #define _O_FLAG(tty,f) ((tty)->termios->c_oflag & (f)) |
tty | 168 | include/linux/tty.h | #define _C_FLAG(tty,f) ((tty)->termios->c_cflag & (f)) |
tty | 169 | include/linux/tty.h | #define _L_FLAG(tty,f) ((tty)->termios->c_lflag & (f)) |
tty | 171 | include/linux/tty.h | #define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK) |
tty | 172 | include/linux/tty.h | #define I_BRKINT(tty) _I_FLAG((tty),BRKINT) |
tty | 173 | include/linux/tty.h | #define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR) |
tty | 174 | include/linux/tty.h | #define I_PARMRK(tty) _I_FLAG((tty),PARMRK) |
tty | 175 | include/linux/tty.h | #define I_INPCK(tty) _I_FLAG((tty),INPCK) |
tty | 176 | include/linux/tty.h | #define I_ISTRIP(tty) _I_FLAG((tty),ISTRIP) |
tty | 177 | include/linux/tty.h | #define I_INLCR(tty) _I_FLAG((tty),INLCR) |
tty | 178 | include/linux/tty.h | #define I_IGNCR(tty) _I_FLAG((tty),IGNCR) |
tty | 179 | include/linux/tty.h | #define I_ICRNL(tty) _I_FLAG((tty),ICRNL) |
tty | 180 | include/linux/tty.h | #define I_IUCLC(tty) _I_FLAG((tty),IUCLC) |
tty | 181 | include/linux/tty.h | #define I_IXON(tty) _I_FLAG((tty),IXON) |
tty | 182 | include/linux/tty.h | #define I_IXANY(tty) _I_FLAG((tty),IXANY) |
tty | 183 | include/linux/tty.h | #define I_IXOFF(tty) _I_FLAG((tty),IXOFF) |
tty | 184 | include/linux/tty.h | #define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL) |
tty | 186 | include/linux/tty.h | #define O_OPOST(tty) _O_FLAG((tty),OPOST) |
tty | 187 | include/linux/tty.h | #define O_OLCUC(tty) _O_FLAG((tty),OLCUC) |
tty | 188 | include/linux/tty.h | #define O_ONLCR(tty) _O_FLAG((tty),ONLCR) |
tty | 189 | include/linux/tty.h | #define O_OCRNL(tty) _O_FLAG((tty),OCRNL) |
tty | 190 | include/linux/tty.h | #define O_ONOCR(tty) _O_FLAG((tty),ONOCR) |
tty | 191 | include/linux/tty.h | #define O_ONLRET(tty) _O_FLAG((tty),ONLRET) |
tty | 192 | include/linux/tty.h | #define O_OFILL(tty) _O_FLAG((tty),OFILL) |
tty | 193 | include/linux/tty.h | #define O_OFDEL(tty) _O_FLAG((tty),OFDEL) |
tty | 194 | include/linux/tty.h | #define O_NLDLY(tty) _O_FLAG((tty),NLDLY) |
tty | 195 | include/linux/tty.h | #define O_CRDLY(tty) _O_FLAG((tty),CRDLY) |
tty | 196 | include/linux/tty.h | #define O_TABDLY(tty) _O_FLAG((tty),TABDLY) |
tty | 197 | include/linux/tty.h | #define O_BSDLY(tty) _O_FLAG((tty),BSDLY) |
tty | 198 | include/linux/tty.h | #define O_VTDLY(tty) _O_FLAG((tty),VTDLY) |
tty | 199 | include/linux/tty.h | #define O_FFDLY(tty) _O_FLAG((tty),FFDLY) |
tty | 201 | include/linux/tty.h | #define C_BAUD(tty) _C_FLAG((tty),CBAUD) |
tty | 202 | include/linux/tty.h | #define C_CSIZE(tty) _C_FLAG((tty),CSIZE) |
tty | 203 | include/linux/tty.h | #define C_CSTOPB(tty) _C_FLAG((tty),CSTOPB) |
tty | 204 | include/linux/tty.h | #define C_CREAD(tty) _C_FLAG((tty),CREAD) |
tty | 205 | include/linux/tty.h | #define C_PARENB(tty) _C_FLAG((tty),PARENB) |
tty | 206 | include/linux/tty.h | #define C_PARODD(tty) _C_FLAG((tty),PARODD) |
tty | 207 | include/linux/tty.h | #define C_HUPCL(tty) _C_FLAG((tty),HUPCL) |
tty | 208 | include/linux/tty.h | #define C_CLOCAL(tty) _C_FLAG((tty),CLOCAL) |
tty | 209 | include/linux/tty.h | #define C_CIBAUD(tty) _C_FLAG((tty),CIBAUD) |
tty | 210 | include/linux/tty.h | #define C_CRTSCTS(tty) _C_FLAG((tty),CRTSCTS) |
tty | 212 | include/linux/tty.h | #define L_ISIG(tty) _L_FLAG((tty),ISIG) |
tty | 213 | include/linux/tty.h | #define L_ICANON(tty) _L_FLAG((tty),ICANON) |
tty | 214 | include/linux/tty.h | #define L_XCASE(tty) _L_FLAG((tty),XCASE) |
tty | 215 | include/linux/tty.h | #define L_ECHO(tty) _L_FLAG((tty),ECHO) |
tty | 216 | include/linux/tty.h | #define L_ECHOE(tty) _L_FLAG((tty),ECHOE) |
tty | 217 | include/linux/tty.h | #define L_ECHOK(tty) _L_FLAG((tty),ECHOK) |
tty | 218 | include/linux/tty.h | #define L_ECHONL(tty) _L_FLAG((tty),ECHONL) |
tty | 219 | include/linux/tty.h | #define L_NOFLSH(tty) _L_FLAG((tty),NOFLSH) |
tty | 220 | include/linux/tty.h | #define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP) |
tty | 221 | include/linux/tty.h | #define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL) |
tty | 222 | include/linux/tty.h | #define L_ECHOPRT(tty) _L_FLAG((tty),ECHOPRT) |
tty | 223 | include/linux/tty.h | #define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE) |
tty | 224 | include/linux/tty.h | #define L_FLUSHO(tty) _L_FLAG((tty),FLUSHO) |
tty | 225 | include/linux/tty.h | #define L_PENDIN(tty) _L_FLAG((tty),PENDIN) |
tty | 226 | include/linux/tty.h | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) |
tty | 256 | include/linux/tty.h | int (*open)(struct tty_struct * tty, struct file * filp); |
tty | 257 | include/linux/tty.h | void (*close)(struct tty_struct * tty, struct file * filp); |
tty | 258 | include/linux/tty.h | void (*write)(struct tty_struct * tty); |
tty | 259 | include/linux/tty.h | int (*ioctl)(struct tty_struct *tty, struct file * file, |
tty | 261 | include/linux/tty.h | void (*throttle)(struct tty_struct * tty, int status); |
tty | 262 | include/linux/tty.h | void (*set_termios)(struct tty_struct *tty, struct termios * old); |
tty | 263 | include/linux/tty.h | void (*stop)(struct tty_struct *tty); |
tty | 264 | include/linux/tty.h | void (*start)(struct tty_struct *tty); |
tty | 265 | include/linux/tty.h | void (*hangup)(struct tty_struct *tty); |
tty | 289 | include/linux/tty.h | int (*read)(struct tty_struct * tty, struct file * file, |
tty | 291 | include/linux/tty.h | int (*write)(struct tty_struct * tty, struct file * file, |
tty | 293 | include/linux/tty.h | int (*ioctl)(struct tty_struct * tty, struct file * file, |
tty | 295 | include/linux/tty.h | int (*select)(struct tty_struct * tty, struct inode * inode, |
tty | 363 | include/linux/tty.h | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
tty | 364 | include/linux/tty.h | #define TTY_READ_FLUSH(tty) tty_read_flush((tty)) |
tty | 400 | include/linux/tty.h | extern void flush_input(struct tty_struct * tty); |
tty | 401 | include/linux/tty.h | extern void flush_output(struct tty_struct * tty); |
tty | 402 | include/linux/tty.h | extern void wait_until_sent(struct tty_struct * tty, int timeout); |
tty | 403 | include/linux/tty.h | extern int check_change(struct tty_struct * tty, int channel); |
tty | 404 | include/linux/tty.h | extern void stop_tty(struct tty_struct * tty); |
tty | 405 | include/linux/tty.h | extern void start_tty(struct tty_struct * tty); |
tty | 407 | include/linux/tty.h | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
tty | 409 | include/linux/tty.h | extern int tty_write_data(struct tty_struct *tty, char *bufp, int buflen, |
tty | 415 | include/linux/tty.h | extern int tty_signal(int sig, struct tty_struct *tty); |
tty | 416 | include/linux/tty.h | extern void tty_hangup(struct tty_struct * tty); |
tty | 417 | include/linux/tty.h | extern void tty_vhangup(struct tty_struct * tty); |
tty | 420 | include/linux/tty.h | extern void do_SAK(struct tty_struct *tty); |
tty | 425 | include/linux/tty.h | extern void rs_write(struct tty_struct * tty); |
tty | 426 | include/linux/tty.h | extern void con_write(struct tty_struct * tty); |
tty | 430 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
tty | 434 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
tty | 438 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
tty | 445 | include/linux/tty.h | extern int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 543 | kernel/sys.c | current->tty = -1; |