tag | line | file | source code |
tty | 922 | drivers/char/console.c | static void respond_string(const char * p, struct tty_struct * tty) |
tty | 925 | drivers/char/console.c | tty_insert_flip_char(tty, *p, 0); |
tty | 928 | drivers/char/console.c | tty_schedule_flip(tty); |
tty | 931 | drivers/char/console.c | static void cursor_report(int currcons, struct tty_struct * tty) |
tty | 936 | drivers/char/console.c | respond_string(buf, tty); |
tty | 939 | drivers/char/console.c | static inline void status_report(struct tty_struct * tty) |
tty | 941 | drivers/char/console.c | respond_string("\033[0n", tty); /* Terminal ok */ |
tty | 944 | drivers/char/console.c | static inline void respond_ID(struct tty_struct * tty) |
tty | 946 | drivers/char/console.c | respond_string(VT102ID, tty); |
tty | 949 | drivers/char/console.c | void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry) |
tty | 955 | drivers/char/console.c | respond_string(buf, tty); |
tty | 1333 | drivers/char/console.c | static void con_stop(struct tty_struct *tty) |
tty | 1336 | drivers/char/console.c | if (!tty) |
tty | 1338 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1348 | drivers/char/console.c | static void con_start(struct tty_struct *tty) |
tty | 1351 | drivers/char/console.c | if (!tty) |
tty | 1353 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1360 | drivers/char/console.c | static int con_write(struct tty_struct * tty, int from_user, |
tty | 1365 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 1382 | drivers/char/console.c | while (!tty->stopped && count) { |
tty | 1550 | drivers/char/console.c | respond_ID(tty); |
tty | 1641 | drivers/char/console.c | status_report(tty); |
tty | 1643 | drivers/char/console.c | cursor_report(currcons,tty); |
tty | 1705 | drivers/char/console.c | respond_ID(tty); |
tty | 1819 | drivers/char/console.c | static int con_write_room(struct tty_struct *tty) |
tty | 1821 | drivers/char/console.c | if (tty->stopped) |
tty | 1826 | drivers/char/console.c | static int con_chars_in_buffer(struct tty_struct *tty) |
tty | 1899 | drivers/char/console.c | static void con_throttle(struct tty_struct *tty) |
tty | 1903 | drivers/char/console.c | static void con_unthrottle(struct tty_struct *tty) |
tty | 1905 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *) tty->driver_data; |
tty | 2211 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
tty | 2216 | drivers/char/console.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2223 | drivers/char/console.c | tty->driver_data = vt_cons[idx]; |
tty | 2225 | drivers/char/console.c | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { |
tty | 2226 | drivers/char/console.c | tty->winsize.ws_row = video_num_lines; |
tty | 2227 | drivers/char/console.c | tty->winsize.ws_col = video_num_columns; |
tty | 521 | drivers/char/cyclades.c | cy_stop(struct tty_struct *tty) |
tty | 524 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 533 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_stop")) |
tty | 553 | drivers/char/cyclades.c | cy_start(struct tty_struct *tty) |
tty | 556 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 565 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_start")) |
tty | 642 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 697 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 708 | drivers/char/cyclades.c | tty = info->tty; |
tty | 715 | drivers/char/cyclades.c | if (tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 716 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 719 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 721 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 724 | drivers/char/cyclades.c | do_SAK(tty); |
tty | 727 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 729 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 732 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 734 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 737 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 739 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 744 | drivers/char/cyclades.c | if(tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 745 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 746 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 748 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 756 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 757 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 760 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 761 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 779 | drivers/char/cyclades.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE){ |
tty | 782 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 784 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = TTY_NORMAL; |
tty | 785 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = data; |
tty | 791 | drivers/char/cyclades.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 817 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 862 | drivers/char/cyclades.c | if (info->tty->stopped || info->tty->hw_stopped){ |
tty | 920 | drivers/char/cyclades.c | if(info->tty == 0){ /* nowhere to put the data, ignore it */ |
tty | 936 | drivers/char/cyclades.c | if(info->tty->stopped){ |
tty | 939 | drivers/char/cyclades.c | info->tty->stopped = 0; |
tty | 946 | drivers/char/cyclades.c | info->tty->stopped = 1; |
tty | 1001 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 1003 | drivers/char/cyclades.c | tty = info->tty; |
tty | 1004 | drivers/char/cyclades.c | if (!tty) |
tty | 1008 | drivers/char/cyclades.c | tty_hangup(info->tty); |
tty | 1017 | drivers/char/cyclades.c | if((tty->flags & (1<< TTY_DO_WRITE_WAKEUP)) |
tty | 1018 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup){ |
tty | 1019 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1021 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1193 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1194 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1242 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1243 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1320 | drivers/char/cyclades.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1332 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1333 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1356 | drivers/char/cyclades.c | if (!info->tty || !info->tty->termios){ |
tty | 1362 | drivers/char/cyclades.c | cflag = info->tty->termios->c_cflag; |
tty | 1385 | drivers/char/cyclades.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1488 | drivers/char/cyclades.c | base_addr[CySCHR1<<index] = START_CHAR(info->tty); |
tty | 1489 | drivers/char/cyclades.c | base_addr[CySCHR2<<index] = STOP_CHAR(info->tty); |
tty | 1504 | drivers/char/cyclades.c | if (C_CLOCAL(info->tty)) { |
tty | 1532 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1533 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1542 | drivers/char/cyclades.c | cy_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1544 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1551 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_put_char")) |
tty | 1554 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf) |
tty | 1571 | drivers/char/cyclades.c | cy_flush_chars(struct tty_struct *tty) |
tty | 1573 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1582 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_chars")) |
tty | 1585 | drivers/char/cyclades.c | if (info->xmit_cnt <= 0 || tty->stopped |
tty | 1586 | drivers/char/cyclades.c | || tty->hw_stopped || !info->xmit_buf) |
tty | 1611 | drivers/char/cyclades.c | cy_write(struct tty_struct * tty, int from_user, |
tty | 1614 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1622 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write")){ |
tty | 1626 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf || !tmp_buf){ |
tty | 1658 | drivers/char/cyclades.c | && !tty->stopped |
tty | 1659 | drivers/char/cyclades.c | && !tty->hw_stopped ) { |
tty | 1667 | drivers/char/cyclades.c | cy_write_room(struct tty_struct *tty) |
tty | 1669 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1676 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write_room")) |
tty | 1686 | drivers/char/cyclades.c | cy_chars_in_buffer(struct tty_struct *tty) |
tty | 1688 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1694 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer")) |
tty | 1702 | drivers/char/cyclades.c | cy_flush_buffer(struct tty_struct *tty) |
tty | 1704 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1711 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_buffer")) |
tty | 1716 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1717 | drivers/char/cyclades.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) |
tty | 1718 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup) |
tty | 1719 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1728 | drivers/char/cyclades.c | cy_throttle(struct tty_struct * tty) |
tty | 1730 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1738 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1739 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1743 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1747 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1748 | drivers/char/cyclades.c | info->x_char = STOP_CHAR(tty); |
tty | 1770 | drivers/char/cyclades.c | cy_unthrottle(struct tty_struct * tty) |
tty | 1772 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1780 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1781 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1785 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1789 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1790 | drivers/char/cyclades.c | info->x_char = START_CHAR(tty); |
tty | 2137 | drivers/char/cyclades.c | cy_ioctl(struct tty_struct *tty, struct file * file, |
tty | 2141 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2207 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2210 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2215 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2218 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2235 | drivers/char/cyclades.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 2240 | drivers/char/cyclades.c | tty->termios->c_cflag = |
tty | 2241 | drivers/char/cyclades.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 2282 | drivers/char/cyclades.c | cy_set_termios(struct tty_struct *tty, struct termios * old_termios) |
tty | 2284 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 2290 | drivers/char/cyclades.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2295 | drivers/char/cyclades.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 2296 | drivers/char/cyclades.c | tty->stopped = 0; |
tty | 2297 | drivers/char/cyclades.c | cy_start(tty); |
tty | 2301 | drivers/char/cyclades.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 2310 | drivers/char/cyclades.c | cy_close(struct tty_struct * tty, struct file * filp) |
tty | 2312 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2321 | drivers/char/cyclades.c | || serial_paranoia_check(info, tty->device, "cy_close")){ |
tty | 2336 | drivers/char/cyclades.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2369 | drivers/char/cyclades.c | info->normal_termios = *tty->termios; |
tty | 2371 | drivers/char/cyclades.c | info->callout_termios = *tty->termios; |
tty | 2373 | drivers/char/cyclades.c | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ |
tty | 2375 | drivers/char/cyclades.c | if (tty->driver.flush_buffer) |
tty | 2376 | drivers/char/cyclades.c | tty->driver.flush_buffer(tty); |
tty | 2377 | drivers/char/cyclades.c | if (tty->ldisc.flush_buffer) |
tty | 2378 | drivers/char/cyclades.c | tty->ldisc.flush_buffer(tty); |
tty | 2380 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2406 | drivers/char/cyclades.c | cy_hangup(struct tty_struct *tty) |
tty | 2408 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2414 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_hangup")) |
tty | 2423 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2437 | drivers/char/cyclades.c | block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2464 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2548 | drivers/char/cyclades.c | && (C_CLOCAL(tty) |
tty | 2588 | drivers/char/cyclades.c | cy_open(struct tty_struct *tty, struct file * filp) |
tty | 2594 | drivers/char/cyclades.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2605 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_open")){ |
tty | 2615 | drivers/char/cyclades.c | tty->driver_data = info; |
tty | 2616 | drivers/char/cyclades.c | info->tty = tty; |
tty | 2626 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2627 | drivers/char/cyclades.c | *tty->termios = info->normal_termios; |
tty | 2629 | drivers/char/cyclades.c | *tty->termios = info->callout_termios; |
tty | 2639 | drivers/char/cyclades.c | retval = block_til_ready(tty, filp, info); |
tty | 2871 | drivers/char/cyclades.c | info->tty = 0; |
tty | 3143 | drivers/char/cyclades.c | (long)info->tty, info->read_status_mask, |
tty | 259 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 582 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp); |
tty | 583 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp); |
tty | 584 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 585 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 586 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty); |
tty | 587 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty); |
tty | 588 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty); |
tty | 589 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 590 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old); |
tty | 591 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty); |
tty | 592 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty); |
tty | 593 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty); |
tty | 594 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty); |
tty | 595 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty); |
tty | 596 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty); |
tty | 774 | drivers/char/istallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 775 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 814 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp) |
tty | 822 | drivers/char/istallion.c | printk("stli_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 825 | drivers/char/istallion.c | minordev = MINOR(tty->device); |
tty | 863 | drivers/char/istallion.c | portp->tty = tty; |
tty | 864 | drivers/char/istallion.c | tty->driver_data = portp; |
tty | 877 | drivers/char/istallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 903 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 927 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 928 | drivers/char/istallion.c | *tty->termios = portp->normaltermios; |
tty | 930 | drivers/char/istallion.c | *tty->termios = portp->callouttermios; |
tty | 941 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp) |
tty | 948 | drivers/char/istallion.c | printk("stli_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 951 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 969 | drivers/char/istallion.c | portp->normaltermios = *tty->termios; |
tty | 971 | drivers/char/istallion.c | portp->callouttermios = *tty->termios; |
tty | 979 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 980 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 981 | drivers/char/istallion.c | tty->closing = 1; |
tty | 984 | drivers/char/istallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 990 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 996 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 997 | drivers/char/istallion.c | if (tty->ldisc.flush_buffer) |
tty | 998 | drivers/char/istallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 1000 | drivers/char/istallion.c | stli_flushbuffer(tty); |
tty | 1002 | drivers/char/istallion.c | tty->closing = 0; |
tty | 1003 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 1004 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1029 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 1047 | drivers/char/istallion.c | tty = portp->tty; |
tty | 1048 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1050 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, tty->termios); |
tty | 1283 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 1289 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, portp->tty->termios); |
tty | 1352 | drivers/char/istallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 1379 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 1391 | drivers/char/istallion.c | printk("stli_write(tty=%x,from_user=%d,buf=%x,count=%d)\n", (int) tty, from_user, (int) buf, count); |
tty | 1394 | drivers/char/istallion.c | if ((tty == (struct tty_struct *) NULL) || (stli_tmpwritebuf == (char *) NULL)) |
tty | 1396 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1397 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1398 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1502 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 1505 | drivers/char/istallion.c | printk("stli_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 1508 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1510 | drivers/char/istallion.c | if (tty != stli_txcooktty) { |
tty | 1513 | drivers/char/istallion.c | stli_txcooktty = tty; |
tty | 1529 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty) |
tty | 1542 | drivers/char/istallion.c | printk("stli_flushchars(tty=%x)\n", (int) tty); |
tty | 1551 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1555 | drivers/char/istallion.c | if (tty != cooktty) |
tty | 1556 | drivers/char/istallion.c | tty = cooktty; |
tty | 1560 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1622 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty) |
tty | 1631 | drivers/char/istallion.c | printk("stli_writeroom(tty=%x)\n", (int) tty); |
tty | 1634 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1636 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1643 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1663 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1680 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty) |
tty | 1689 | drivers/char/istallion.c | printk("stli_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1692 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1694 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1695 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1696 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1787 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1795 | drivers/char/istallion.c | printk("stli_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1798 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1800 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1811 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1812 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1820 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1821 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1828 | drivers/char/istallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1833 | drivers/char/istallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1895 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1903 | drivers/char/istallion.c | printk("stli_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1906 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1908 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1915 | drivers/char/istallion.c | tiosp = tty->termios; |
tty | 1924 | drivers/char/istallion.c | tty->hw_stopped = 0; |
tty | 1941 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty) |
tty | 1946 | drivers/char/istallion.c | printk("stli_throttle(tty=%x)\n", (int) tty); |
tty | 1949 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1951 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1966 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty) |
tty | 1971 | drivers/char/istallion.c | printk("stli_unthrottle(tty=%x)\n", (int) tty); |
tty | 1974 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1976 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1990 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty) |
tty | 1997 | drivers/char/istallion.c | printk("stli_stop(tty=%x)\n", (int) tty); |
tty | 2000 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2002 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2022 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty) |
tty | 2029 | drivers/char/istallion.c | printk("stli_start(tty=%x)\n", (int) tty); |
tty | 2032 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2034 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2070 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 2072 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 2084 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty) |
tty | 2091 | drivers/char/istallion.c | printk("stli_hangup(tty=%x)\n", (int) tty); |
tty | 2094 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2096 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2109 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 2123 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 2124 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 2125 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 2140 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty) |
tty | 2147 | drivers/char/istallion.c | printk("stli_flushbuffer(tty=%x)\n", (int) tty); |
tty | 2150 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2152 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2161 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 2178 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2179 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2180 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2247 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2257 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2258 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2275 | drivers/char/istallion.c | len = MIN(len, (TTY_FLIPBUF_SIZE - tty->flip.count)); |
tty | 2280 | drivers/char/istallion.c | memcpy(tty->flip.char_buf_ptr, (char *) (shbuf + tail), stlen); |
tty | 2281 | drivers/char/istallion.c | memset(tty->flip.flag_buf_ptr, 0, stlen); |
tty | 2282 | drivers/char/istallion.c | tty->flip.char_buf_ptr += stlen; |
tty | 2283 | drivers/char/istallion.c | tty->flip.flag_buf_ptr += stlen; |
tty | 2284 | drivers/char/istallion.c | tty->flip.count += stlen; |
tty | 2299 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 2356 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2431 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2442 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) |
tty | 2451 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2452 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2453 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2454 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2459 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2460 | drivers/char/istallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 2461 | drivers/char/istallion.c | tty->flip.count++; |
tty | 2462 | drivers/char/istallion.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 2463 | drivers/char/istallion.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 2466 | drivers/char/istallion.c | do_SAK(tty); |
tty | 2468 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 125 | drivers/char/keyboard.c | static struct tty_struct * tty = NULL; |
tty | 389 | drivers/char/keyboard.c | tty = ttytab[fg_console]; |
tty | 538 | drivers/char/keyboard.c | (vc_kbd_mode(kbd,VC_REPEAT) && tty && |
tty | 539 | drivers/char/keyboard.c | (L_ECHO(tty) || (tty->driver.chars_in_buffer(tty) == 0)))) { |
tty | 590 | drivers/char/keyboard.c | if (tty) { |
tty | 591 | drivers/char/keyboard.c | tty_insert_flip_char(tty, ch, 0); |
tty | 592 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 599 | drivers/char/keyboard.c | if (!tty) |
tty | 603 | drivers/char/keyboard.c | tty_insert_flip_char(tty, *cp, 0); |
tty | 606 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 647 | drivers/char/keyboard.c | if (rep || !tty) |
tty | 655 | drivers/char/keyboard.c | if (tty->stopped) |
tty | 656 | drivers/char/keyboard.c | start_tty(tty); |
tty | 658 | drivers/char/keyboard.c | stop_tty(tty); |
tty | 715 | drivers/char/keyboard.c | if (!tty) |
tty | 717 | drivers/char/keyboard.c | tty_insert_flip_char(tty, 0, TTY_BREAK); |
tty | 718 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 752 | drivers/char/keyboard.c | do_SAK(tty); |
tty | 58 | drivers/char/n_tty.c | static inline void put_tty_queue(unsigned char c, struct tty_struct *tty) |
tty | 60 | drivers/char/n_tty.c | if (tty->read_cnt < N_TTY_BUF_SIZE) { |
tty | 61 | drivers/char/n_tty.c | tty->read_buf[tty->read_head] = c; |
tty | 62 | drivers/char/n_tty.c | tty->read_head = (tty->read_head + 1) & (N_TTY_BUF_SIZE-1); |
tty | 63 | drivers/char/n_tty.c | tty->read_cnt++; |
tty | 70 | drivers/char/n_tty.c | void n_tty_flush_buffer(struct tty_struct * tty) |
tty | 72 | drivers/char/n_tty.c | tty->read_head = tty->read_tail = tty->read_cnt = 0; |
tty | 73 | drivers/char/n_tty.c | tty->canon_head = tty->canon_data = tty->erasing = 0; |
tty | 74 | drivers/char/n_tty.c | memset(&tty->read_flags, 0, sizeof tty->read_flags); |
tty | 76 | drivers/char/n_tty.c | if (!tty->link) |
tty | 79 | drivers/char/n_tty.c | if (tty->driver.unthrottle) |
tty | 80 | drivers/char/n_tty.c | (tty->driver.unthrottle)(tty); |
tty | 81 | drivers/char/n_tty.c | if (tty->link->packet) { |
tty | 82 | drivers/char/n_tty.c | tty->ctrl_status |= TIOCPKT_FLUSHREAD; |
tty | 83 | drivers/char/n_tty.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 90 | drivers/char/n_tty.c | int n_tty_chars_in_buffer(struct tty_struct *tty) |
tty | 92 | drivers/char/n_tty.c | return tty->read_cnt; |
tty | 99 | drivers/char/n_tty.c | static int opost(unsigned char c, struct tty_struct *tty) |
tty | 103 | drivers/char/n_tty.c | space = tty->driver.write_room(tty); |
tty | 107 | drivers/char/n_tty.c | if (O_OPOST(tty)) { |
tty | 110 | drivers/char/n_tty.c | if (O_ONLRET(tty)) |
tty | 111 | drivers/char/n_tty.c | tty->column = 0; |
tty | 112 | drivers/char/n_tty.c | if (O_ONLCR(tty)) { |
tty | 115 | drivers/char/n_tty.c | tty->driver.put_char(tty, '\r'); |
tty | 116 | drivers/char/n_tty.c | tty->column = 0; |
tty | 118 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 121 | drivers/char/n_tty.c | if (O_ONOCR(tty) && tty->column == 0) |
tty | 123 | drivers/char/n_tty.c | if (O_OCRNL(tty)) { |
tty | 125 | drivers/char/n_tty.c | if (O_ONLRET(tty)) |
tty | 126 | drivers/char/n_tty.c | tty->canon_column = tty->column = 0; |
tty | 129 | drivers/char/n_tty.c | tty->canon_column = tty->column = 0; |
tty | 132 | drivers/char/n_tty.c | spaces = 8 - (tty->column & 7); |
tty | 133 | drivers/char/n_tty.c | if (O_TABDLY(tty) == XTABS) { |
tty | 136 | drivers/char/n_tty.c | tty->column += spaces; |
tty | 137 | drivers/char/n_tty.c | tty->driver.write(tty, 0, " ", spaces); |
tty | 140 | drivers/char/n_tty.c | tty->column += spaces; |
tty | 143 | drivers/char/n_tty.c | if (tty->column > 0) |
tty | 144 | drivers/char/n_tty.c | tty->column--; |
tty | 147 | drivers/char/n_tty.c | if (O_OLCUC(tty)) |
tty | 150 | drivers/char/n_tty.c | tty->column++; |
tty | 154 | drivers/char/n_tty.c | tty->driver.put_char(tty, c); |
tty | 158 | drivers/char/n_tty.c | static inline void put_char(unsigned char c, struct tty_struct *tty) |
tty | 160 | drivers/char/n_tty.c | tty->driver.put_char(tty, c); |
tty | 165 | drivers/char/n_tty.c | static void echo_char(unsigned char c, struct tty_struct *tty) |
tty | 167 | drivers/char/n_tty.c | if (L_ECHOCTL(tty) && iscntrl(c) && c != '\t') { |
tty | 168 | drivers/char/n_tty.c | put_char('^', tty); |
tty | 169 | drivers/char/n_tty.c | put_char(c ^ 0100, tty); |
tty | 170 | drivers/char/n_tty.c | tty->column += 2; |
tty | 172 | drivers/char/n_tty.c | opost(c, tty); |
tty | 175 | drivers/char/n_tty.c | static inline void finish_erasing(struct tty_struct *tty) |
tty | 177 | drivers/char/n_tty.c | if (tty->erasing) { |
tty | 178 | drivers/char/n_tty.c | put_char('/', tty); |
tty | 179 | drivers/char/n_tty.c | tty->column += 2; |
tty | 180 | drivers/char/n_tty.c | tty->erasing = 0; |
tty | 184 | drivers/char/n_tty.c | static void eraser(unsigned char c, struct tty_struct *tty) |
tty | 189 | drivers/char/n_tty.c | if (tty->read_head == tty->canon_head) { |
tty | 193 | drivers/char/n_tty.c | if (c == ERASE_CHAR(tty)) |
tty | 195 | drivers/char/n_tty.c | else if (c == WERASE_CHAR(tty)) |
tty | 198 | drivers/char/n_tty.c | if (!L_ECHO(tty)) { |
tty | 199 | drivers/char/n_tty.c | tty->read_cnt -= ((tty->read_head - tty->canon_head) & |
tty | 201 | drivers/char/n_tty.c | tty->read_head = tty->canon_head; |
tty | 204 | drivers/char/n_tty.c | if (!L_ECHOK(tty) || !L_ECHOKE(tty)) { |
tty | 205 | drivers/char/n_tty.c | tty->read_cnt -= ((tty->read_head - tty->canon_head) & |
tty | 207 | drivers/char/n_tty.c | tty->read_head = tty->canon_head; |
tty | 208 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 209 | drivers/char/n_tty.c | echo_char(KILL_CHAR(tty), tty); |
tty | 211 | drivers/char/n_tty.c | if (L_ECHOK(tty)) |
tty | 212 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 219 | drivers/char/n_tty.c | while (tty->read_head != tty->canon_head) { |
tty | 220 | drivers/char/n_tty.c | head = (tty->read_head - 1) & (N_TTY_BUF_SIZE-1); |
tty | 221 | drivers/char/n_tty.c | c = tty->read_buf[head]; |
tty | 229 | drivers/char/n_tty.c | tty->read_head = head; |
tty | 230 | drivers/char/n_tty.c | tty->read_cnt--; |
tty | 231 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 232 | drivers/char/n_tty.c | if (L_ECHOPRT(tty)) { |
tty | 233 | drivers/char/n_tty.c | if (!tty->erasing) { |
tty | 234 | drivers/char/n_tty.c | put_char('\\', tty); |
tty | 235 | drivers/char/n_tty.c | tty->column++; |
tty | 236 | drivers/char/n_tty.c | tty->erasing = 1; |
tty | 238 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 239 | drivers/char/n_tty.c | } else if (!L_ECHOE(tty)) { |
tty | 240 | drivers/char/n_tty.c | echo_char(ERASE_CHAR(tty), tty); |
tty | 242 | drivers/char/n_tty.c | unsigned int col = tty->canon_column; |
tty | 243 | drivers/char/n_tty.c | unsigned long tail = tty->canon_head; |
tty | 246 | drivers/char/n_tty.c | while (tail != tty->read_head) { |
tty | 247 | drivers/char/n_tty.c | c = tty->read_buf[tail]; |
tty | 251 | drivers/char/n_tty.c | if (L_ECHOCTL(tty)) |
tty | 259 | drivers/char/n_tty.c | if (tty->column > 0x80000000) |
tty | 260 | drivers/char/n_tty.c | tty->column = 0; |
tty | 263 | drivers/char/n_tty.c | while (tty->column > col) { |
tty | 265 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 266 | drivers/char/n_tty.c | if (tty->column > 0) |
tty | 267 | drivers/char/n_tty.c | tty->column--; |
tty | 270 | drivers/char/n_tty.c | if (iscntrl(c) && L_ECHOCTL(tty)) { |
tty | 271 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 272 | drivers/char/n_tty.c | put_char(' ', tty); |
tty | 273 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 274 | drivers/char/n_tty.c | if (tty->column > 0) |
tty | 275 | drivers/char/n_tty.c | tty->column--; |
tty | 277 | drivers/char/n_tty.c | if (!iscntrl(c) || L_ECHOCTL(tty)) { |
tty | 278 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 279 | drivers/char/n_tty.c | put_char(' ', tty); |
tty | 280 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 281 | drivers/char/n_tty.c | if (tty->column > 0) |
tty | 282 | drivers/char/n_tty.c | tty->column--; |
tty | 289 | drivers/char/n_tty.c | if (tty->read_head == tty->canon_head) |
tty | 290 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 293 | drivers/char/n_tty.c | static void isig(int sig, struct tty_struct *tty) |
tty | 295 | drivers/char/n_tty.c | if (tty->pgrp > 0) |
tty | 296 | drivers/char/n_tty.c | kill_pg(tty->pgrp, sig, 1); |
tty | 297 | drivers/char/n_tty.c | if (!L_NOFLSH(tty)) { |
tty | 298 | drivers/char/n_tty.c | n_tty_flush_buffer(tty); |
tty | 299 | drivers/char/n_tty.c | if (tty->driver.flush_buffer) |
tty | 300 | drivers/char/n_tty.c | tty->driver.flush_buffer(tty); |
tty | 304 | drivers/char/n_tty.c | static inline void n_tty_receive_break(struct tty_struct *tty) |
tty | 306 | drivers/char/n_tty.c | if (I_IGNBRK(tty)) |
tty | 308 | drivers/char/n_tty.c | if (I_BRKINT(tty)) { |
tty | 309 | drivers/char/n_tty.c | isig(SIGINT, tty); |
tty | 312 | drivers/char/n_tty.c | if (I_PARMRK(tty)) { |
tty | 313 | drivers/char/n_tty.c | put_tty_queue('\377', tty); |
tty | 314 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 316 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 317 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 320 | drivers/char/n_tty.c | static inline void n_tty_receive_overrun(struct tty_struct *tty) |
tty | 324 | drivers/char/n_tty.c | tty->num_overrun++; |
tty | 325 | drivers/char/n_tty.c | if (tty->overrun_time < (jiffies - HZ)) { |
tty | 326 | drivers/char/n_tty.c | printk("%s: %d input overrun(s)\n", _tty_name(tty, buf), |
tty | 327 | drivers/char/n_tty.c | tty->num_overrun); |
tty | 328 | drivers/char/n_tty.c | tty->overrun_time = jiffies; |
tty | 329 | drivers/char/n_tty.c | tty->num_overrun = 0; |
tty | 333 | drivers/char/n_tty.c | static inline void n_tty_receive_parity_error(struct tty_struct *tty, |
tty | 336 | drivers/char/n_tty.c | if (I_IGNPAR(tty)) { |
tty | 339 | drivers/char/n_tty.c | if (I_PARMRK(tty)) { |
tty | 340 | drivers/char/n_tty.c | put_tty_queue('\377', tty); |
tty | 341 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 342 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 344 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 345 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 348 | drivers/char/n_tty.c | static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) |
tty | 350 | drivers/char/n_tty.c | if (tty->raw) { |
tty | 351 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 355 | drivers/char/n_tty.c | if (tty->stopped && I_IXON(tty) && I_IXANY(tty)) { |
tty | 356 | drivers/char/n_tty.c | start_tty(tty); |
tty | 360 | drivers/char/n_tty.c | if (I_ISTRIP(tty)) |
tty | 362 | drivers/char/n_tty.c | if (I_IUCLC(tty) && L_IEXTEN(tty)) |
tty | 365 | drivers/char/n_tty.c | if (tty->closing) { |
tty | 366 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 367 | drivers/char/n_tty.c | if (c == START_CHAR(tty)) |
tty | 368 | drivers/char/n_tty.c | start_tty(tty); |
tty | 369 | drivers/char/n_tty.c | else if (c == STOP_CHAR(tty)) |
tty | 370 | drivers/char/n_tty.c | stop_tty(tty); |
tty | 381 | drivers/char/n_tty.c | if (!test_bit(c, &tty->process_char_map) || tty->lnext) { |
tty | 382 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 383 | drivers/char/n_tty.c | tty->lnext = 0; |
tty | 384 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 385 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 386 | drivers/char/n_tty.c | put_char('\a', tty); /* beep if no space */ |
tty | 390 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 391 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 392 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 394 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 395 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 396 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 401 | drivers/char/n_tty.c | if (I_IGNCR(tty)) |
tty | 403 | drivers/char/n_tty.c | if (I_ICRNL(tty)) |
tty | 405 | drivers/char/n_tty.c | } else if (c == '\n' && I_INLCR(tty)) |
tty | 407 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 408 | drivers/char/n_tty.c | if (c == START_CHAR(tty)) { |
tty | 409 | drivers/char/n_tty.c | start_tty(tty); |
tty | 412 | drivers/char/n_tty.c | if (c == STOP_CHAR(tty)) { |
tty | 413 | drivers/char/n_tty.c | stop_tty(tty); |
tty | 417 | drivers/char/n_tty.c | if (L_ISIG(tty)) { |
tty | 418 | drivers/char/n_tty.c | if (c == INTR_CHAR(tty)) { |
tty | 419 | drivers/char/n_tty.c | isig(SIGINT, tty); |
tty | 422 | drivers/char/n_tty.c | if (c == QUIT_CHAR(tty)) { |
tty | 423 | drivers/char/n_tty.c | isig(SIGQUIT, tty); |
tty | 426 | drivers/char/n_tty.c | if (c == SUSP_CHAR(tty)) { |
tty | 427 | drivers/char/n_tty.c | if (!is_orphaned_pgrp(tty->pgrp)) |
tty | 428 | drivers/char/n_tty.c | isig(SIGTSTP, tty); |
tty | 432 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 433 | drivers/char/n_tty.c | if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || |
tty | 434 | drivers/char/n_tty.c | (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { |
tty | 435 | drivers/char/n_tty.c | eraser(c, tty); |
tty | 438 | drivers/char/n_tty.c | if (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) { |
tty | 439 | drivers/char/n_tty.c | tty->lnext = 1; |
tty | 440 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 441 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 442 | drivers/char/n_tty.c | if (L_ECHOCTL(tty)) { |
tty | 443 | drivers/char/n_tty.c | put_char('^', tty); |
tty | 444 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 449 | drivers/char/n_tty.c | if (c == REPRINT_CHAR(tty) && L_ECHO(tty) && |
tty | 450 | drivers/char/n_tty.c | L_IEXTEN(tty)) { |
tty | 451 | drivers/char/n_tty.c | unsigned long tail = tty->canon_head; |
tty | 453 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 454 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 455 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 456 | drivers/char/n_tty.c | while (tail != tty->read_head) { |
tty | 457 | drivers/char/n_tty.c | echo_char(tty->read_buf[tail], tty); |
tty | 463 | drivers/char/n_tty.c | if (L_ECHO(tty) || L_ECHONL(tty)) { |
tty | 464 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 465 | drivers/char/n_tty.c | put_char('\a', tty); |
tty | 468 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 472 | drivers/char/n_tty.c | if (c == EOF_CHAR(tty)) { |
tty | 473 | drivers/char/n_tty.c | if (tty->canon_head != tty->read_head) |
tty | 474 | drivers/char/n_tty.c | set_bit(TTY_PUSH, &tty->flags); |
tty | 478 | drivers/char/n_tty.c | if ((c == EOL_CHAR(tty)) || |
tty | 479 | drivers/char/n_tty.c | (c == EOL2_CHAR(tty) && L_IEXTEN(tty))) { |
tty | 483 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 484 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 485 | drivers/char/n_tty.c | put_char('\a', tty); |
tty | 489 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 490 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 491 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 497 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 498 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 501 | drivers/char/n_tty.c | set_bit(tty->read_head, &tty->read_flags); |
tty | 502 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 503 | drivers/char/n_tty.c | tty->canon_head = tty->read_head; |
tty | 504 | drivers/char/n_tty.c | tty->canon_data++; |
tty | 505 | drivers/char/n_tty.c | if (tty->fasync) |
tty | 506 | drivers/char/n_tty.c | kill_fasync(tty->fasync, SIGIO); |
tty | 507 | drivers/char/n_tty.c | if (tty->read_wait) |
tty | 508 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 513 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 514 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 515 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 516 | drivers/char/n_tty.c | put_char('\a', tty); /* beep if no space */ |
tty | 520 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 523 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 524 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 525 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 529 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 530 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 532 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 535 | drivers/char/n_tty.c | static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
tty | 542 | drivers/char/n_tty.c | if (!tty->read_buf) |
tty | 545 | drivers/char/n_tty.c | if (tty->real_raw) { |
tty | 546 | drivers/char/n_tty.c | i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, |
tty | 547 | drivers/char/n_tty.c | N_TTY_BUF_SIZE - tty->read_head)); |
tty | 548 | drivers/char/n_tty.c | memcpy(tty->read_buf + tty->read_head, cp, i); |
tty | 549 | drivers/char/n_tty.c | tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); |
tty | 550 | drivers/char/n_tty.c | tty->read_cnt += i; |
tty | 554 | drivers/char/n_tty.c | i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, |
tty | 555 | drivers/char/n_tty.c | N_TTY_BUF_SIZE - tty->read_head)); |
tty | 556 | drivers/char/n_tty.c | memcpy(tty->read_buf + tty->read_head, cp, i); |
tty | 557 | drivers/char/n_tty.c | tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); |
tty | 558 | drivers/char/n_tty.c | tty->read_cnt += i; |
tty | 565 | drivers/char/n_tty.c | n_tty_receive_char(tty, *p); |
tty | 568 | drivers/char/n_tty.c | n_tty_receive_break(tty); |
tty | 572 | drivers/char/n_tty.c | n_tty_receive_parity_error(tty, *p); |
tty | 575 | drivers/char/n_tty.c | n_tty_receive_overrun(tty); |
tty | 578 | drivers/char/n_tty.c | printk("%s: unknown flag %d\n", tty_name(tty), |
tty | 583 | drivers/char/n_tty.c | if (tty->driver.flush_chars) |
tty | 584 | drivers/char/n_tty.c | tty->driver.flush_chars(tty); |
tty | 587 | drivers/char/n_tty.c | if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) { |
tty | 588 | drivers/char/n_tty.c | if (tty->fasync) |
tty | 589 | drivers/char/n_tty.c | kill_fasync(tty->fasync, SIGIO); |
tty | 590 | drivers/char/n_tty.c | if (tty->read_wait) |
tty | 591 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 594 | drivers/char/n_tty.c | if ((tty->read_cnt >= TTY_THRESHOLD_THROTTLE) && |
tty | 595 | drivers/char/n_tty.c | tty->driver.throttle && |
tty | 596 | drivers/char/n_tty.c | !set_bit(TTY_THROTTLED, &tty->flags)) |
tty | 597 | drivers/char/n_tty.c | tty->driver.throttle(tty); |
tty | 600 | drivers/char/n_tty.c | static int n_tty_receive_room(struct tty_struct *tty) |
tty | 602 | drivers/char/n_tty.c | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; |
tty | 610 | drivers/char/n_tty.c | if (tty->icanon && !tty->canon_data) |
tty | 624 | drivers/char/n_tty.c | static void n_tty_set_termios(struct tty_struct *tty, struct termios * old) |
tty | 626 | drivers/char/n_tty.c | if (!tty) |
tty | 629 | drivers/char/n_tty.c | tty->icanon = (L_ICANON(tty) != 0); |
tty | 630 | drivers/char/n_tty.c | if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) || |
tty | 631 | drivers/char/n_tty.c | I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) || |
tty | 632 | drivers/char/n_tty.c | I_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) || |
tty | 633 | drivers/char/n_tty.c | I_PARMRK(tty)) { |
tty | 635 | drivers/char/n_tty.c | memset(tty->process_char_map, 0, 256/8); |
tty | 637 | drivers/char/n_tty.c | if (I_IGNCR(tty) || I_ICRNL(tty)) |
tty | 638 | drivers/char/n_tty.c | set_bit('\r', &tty->process_char_map); |
tty | 639 | drivers/char/n_tty.c | if (I_INLCR(tty)) |
tty | 640 | drivers/char/n_tty.c | set_bit('\n', &tty->process_char_map); |
tty | 642 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 643 | drivers/char/n_tty.c | set_bit(ERASE_CHAR(tty), &tty->process_char_map); |
tty | 644 | drivers/char/n_tty.c | set_bit(KILL_CHAR(tty), &tty->process_char_map); |
tty | 645 | drivers/char/n_tty.c | set_bit(EOF_CHAR(tty), &tty->process_char_map); |
tty | 646 | drivers/char/n_tty.c | set_bit('\n', &tty->process_char_map); |
tty | 647 | drivers/char/n_tty.c | set_bit(EOL_CHAR(tty), &tty->process_char_map); |
tty | 648 | drivers/char/n_tty.c | if (L_IEXTEN(tty)) { |
tty | 649 | drivers/char/n_tty.c | set_bit(WERASE_CHAR(tty), |
tty | 650 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 651 | drivers/char/n_tty.c | set_bit(LNEXT_CHAR(tty), |
tty | 652 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 653 | drivers/char/n_tty.c | set_bit(EOL2_CHAR(tty), |
tty | 654 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 655 | drivers/char/n_tty.c | if (L_ECHO(tty)) |
tty | 656 | drivers/char/n_tty.c | set_bit(REPRINT_CHAR(tty), |
tty | 657 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 660 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 661 | drivers/char/n_tty.c | set_bit(START_CHAR(tty), &tty->process_char_map); |
tty | 662 | drivers/char/n_tty.c | set_bit(STOP_CHAR(tty), &tty->process_char_map); |
tty | 664 | drivers/char/n_tty.c | if (L_ISIG(tty)) { |
tty | 665 | drivers/char/n_tty.c | set_bit(INTR_CHAR(tty), &tty->process_char_map); |
tty | 666 | drivers/char/n_tty.c | set_bit(QUIT_CHAR(tty), &tty->process_char_map); |
tty | 667 | drivers/char/n_tty.c | set_bit(SUSP_CHAR(tty), &tty->process_char_map); |
tty | 669 | drivers/char/n_tty.c | clear_bit(__DISABLED_CHAR, &tty->process_char_map); |
tty | 671 | drivers/char/n_tty.c | tty->raw = 0; |
tty | 672 | drivers/char/n_tty.c | tty->real_raw = 0; |
tty | 674 | drivers/char/n_tty.c | tty->raw = 1; |
tty | 675 | drivers/char/n_tty.c | if ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) && |
tty | 676 | drivers/char/n_tty.c | (I_IGNPAR(tty) || !I_INPCK(tty)) && |
tty | 677 | drivers/char/n_tty.c | (tty->driver.flags & TTY_DRIVER_REAL_RAW)) |
tty | 678 | drivers/char/n_tty.c | tty->real_raw = 1; |
tty | 680 | drivers/char/n_tty.c | tty->real_raw = 0; |
tty | 684 | drivers/char/n_tty.c | static void n_tty_close(struct tty_struct *tty) |
tty | 686 | drivers/char/n_tty.c | n_tty_flush_buffer(tty); |
tty | 687 | drivers/char/n_tty.c | if (tty->read_buf) { |
tty | 688 | drivers/char/n_tty.c | free_page((unsigned long) tty->read_buf); |
tty | 689 | drivers/char/n_tty.c | tty->read_buf = 0; |
tty | 693 | drivers/char/n_tty.c | static int n_tty_open(struct tty_struct *tty) |
tty | 695 | drivers/char/n_tty.c | if (!tty) |
tty | 698 | drivers/char/n_tty.c | if (!tty->read_buf) { |
tty | 699 | drivers/char/n_tty.c | tty->read_buf = (unsigned char *) |
tty | 701 | drivers/char/n_tty.c | if (!tty->read_buf) |
tty | 704 | drivers/char/n_tty.c | memset(tty->read_buf, 0, N_TTY_BUF_SIZE); |
tty | 705 | drivers/char/n_tty.c | tty->read_head = tty->read_tail = tty->read_cnt = 0; |
tty | 706 | drivers/char/n_tty.c | tty->canon_head = tty->canon_data = tty->erasing = 0; |
tty | 707 | drivers/char/n_tty.c | tty->column = 0; |
tty | 708 | drivers/char/n_tty.c | memset(tty->read_flags, 0, sizeof(tty->read_flags)); |
tty | 709 | drivers/char/n_tty.c | n_tty_set_termios(tty, 0); |
tty | 710 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 711 | drivers/char/n_tty.c | tty->closing = 0; |
tty | 715 | drivers/char/n_tty.c | static inline int input_available_p(struct tty_struct *tty, int amt) |
tty | 717 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 718 | drivers/char/n_tty.c | if (tty->canon_data) |
tty | 720 | drivers/char/n_tty.c | } else if (tty->read_cnt >= (amt ? amt : 1)) |
tty | 734 | drivers/char/n_tty.c | static inline void copy_from_read_buf(struct tty_struct *tty, |
tty | 741 | drivers/char/n_tty.c | n = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail)); |
tty | 744 | drivers/char/n_tty.c | memcpy_tofs(*b, &tty->read_buf[tty->read_tail], n); |
tty | 745 | drivers/char/n_tty.c | tty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1); |
tty | 746 | drivers/char/n_tty.c | tty->read_cnt -= n; |
tty | 751 | drivers/char/n_tty.c | static int read_chan(struct tty_struct *tty, struct file *file, |
tty | 763 | drivers/char/n_tty.c | if (!tty->read_buf) { |
tty | 774 | drivers/char/n_tty.c | current->tty == tty) { |
tty | 775 | drivers/char/n_tty.c | if (tty->pgrp <= 0) |
tty | 777 | drivers/char/n_tty.c | else if (current->pgrp != tty->pgrp) { |
tty | 786 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 790 | drivers/char/n_tty.c | time = (HZ / 10) * TIME_CHAR(tty); |
tty | 791 | drivers/char/n_tty.c | minimum = MIN_CHAR(tty); |
tty | 795 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 796 | drivers/char/n_tty.c | else if (!tty->read_wait || |
tty | 797 | drivers/char/n_tty.c | (tty->minimum_to_wake > minimum)) |
tty | 798 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum; |
tty | 805 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum = 1; |
tty | 809 | drivers/char/n_tty.c | add_wait_queue(&tty->read_wait, &wait); |
tty | 812 | drivers/char/n_tty.c | if (tty->packet && tty->link->ctrl_status) { |
tty | 815 | drivers/char/n_tty.c | put_user(tty->link->ctrl_status, b++); |
tty | 816 | drivers/char/n_tty.c | tty->link->ctrl_status = 0; |
tty | 824 | drivers/char/n_tty.c | if (((minimum - (b - buf)) < tty->minimum_to_wake) && |
tty | 826 | drivers/char/n_tty.c | tty->minimum_to_wake = (minimum - (b - buf)); |
tty | 828 | drivers/char/n_tty.c | if (!input_available_p(tty, 0)) { |
tty | 829 | drivers/char/n_tty.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) { |
tty | 851 | drivers/char/n_tty.c | if (tty->packet && b == buf) { |
tty | 856 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 861 | drivers/char/n_tty.c | if (!tty->read_cnt) { |
tty | 865 | drivers/char/n_tty.c | eol = clear_bit(tty->read_tail, |
tty | 866 | drivers/char/n_tty.c | &tty->read_flags); |
tty | 867 | drivers/char/n_tty.c | c = tty->read_buf[tty->read_tail]; |
tty | 868 | drivers/char/n_tty.c | tty->read_tail = ((tty->read_tail+1) & |
tty | 870 | drivers/char/n_tty.c | tty->read_cnt--; |
tty | 878 | drivers/char/n_tty.c | if (--tty->canon_data < 0) { |
tty | 879 | drivers/char/n_tty.c | tty->canon_data = 0; |
tty | 889 | drivers/char/n_tty.c | copy_from_read_buf(tty, &b, &nr); |
tty | 890 | drivers/char/n_tty.c | copy_from_read_buf(tty, &b, &nr); |
tty | 896 | drivers/char/n_tty.c | if (tty->driver.unthrottle && |
tty | 897 | drivers/char/n_tty.c | (tty->read_cnt <= TTY_THRESHOLD_UNTHROTTLE) |
tty | 898 | drivers/char/n_tty.c | && clear_bit(TTY_THROTTLED, &tty->flags)) |
tty | 899 | drivers/char/n_tty.c | tty->driver.unthrottle(tty); |
tty | 906 | drivers/char/n_tty.c | remove_wait_queue(&tty->read_wait, &wait); |
tty | 908 | drivers/char/n_tty.c | if (!tty->read_wait) |
tty | 909 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum; |
tty | 915 | drivers/char/n_tty.c | clear_bit(TTY_PUSH, &tty->flags); |
tty | 916 | drivers/char/n_tty.c | if (!size && clear_bit(TTY_PUSH, &tty->flags)) |
tty | 919 | drivers/char/n_tty.c | clear_bit(TTY_PUSH, &tty->flags); |
tty | 923 | drivers/char/n_tty.c | static int write_chan(struct tty_struct * tty, struct file * file, |
tty | 932 | drivers/char/n_tty.c | if (L_TOSTOP(tty) && file->f_inode->i_rdev != CONSOLE_DEV) { |
tty | 933 | drivers/char/n_tty.c | retval = tty_check_change(tty); |
tty | 938 | drivers/char/n_tty.c | add_wait_queue(&tty->write_wait, &wait); |
tty | 945 | drivers/char/n_tty.c | if (tty_hung_up_p(file) || (tty->link && !tty->link->count)) { |
tty | 949 | drivers/char/n_tty.c | if (O_OPOST(tty)) { |
tty | 952 | drivers/char/n_tty.c | if (opost(c, tty) < 0) |
tty | 956 | drivers/char/n_tty.c | if (tty->driver.flush_chars) |
tty | 957 | drivers/char/n_tty.c | tty->driver.flush_chars(tty); |
tty | 959 | drivers/char/n_tty.c | c = tty->driver.write(tty, 1, b, nr); |
tty | 972 | drivers/char/n_tty.c | remove_wait_queue(&tty->write_wait, &wait); |
tty | 976 | drivers/char/n_tty.c | static int normal_select(struct tty_struct * tty, struct inode * inode, |
tty | 981 | drivers/char/n_tty.c | if (input_available_p(tty, TIME_CHAR(tty) ? 0 : |
tty | 982 | drivers/char/n_tty.c | MIN_CHAR(tty))) |
tty | 986 | drivers/char/n_tty.c | if (tty->packet && tty->link->ctrl_status) |
tty | 988 | drivers/char/n_tty.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 992 | drivers/char/n_tty.c | if (!tty->read_wait) { |
tty | 993 | drivers/char/n_tty.c | if (MIN_CHAR(tty) && !TIME_CHAR(tty)) |
tty | 994 | drivers/char/n_tty.c | tty->minimum_to_wake = MIN_CHAR(tty); |
tty | 996 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 998 | drivers/char/n_tty.c | select_wait(&tty->read_wait, wait); |
tty | 1001 | drivers/char/n_tty.c | if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS) |
tty | 1003 | drivers/char/n_tty.c | select_wait(&tty->write_wait, wait); |
tty | 64 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
tty | 66 | drivers/char/pty.c | if (!tty) |
tty | 68 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 69 | drivers/char/pty.c | if (tty->count > 1) |
tty | 70 | drivers/char/pty.c | printk("master pty_close: count = %d!!\n", tty->count); |
tty | 72 | drivers/char/pty.c | if (tty->count > 2) |
tty | 75 | drivers/char/pty.c | wake_up_interruptible(&tty->read_wait); |
tty | 76 | drivers/char/pty.c | wake_up_interruptible(&tty->write_wait); |
tty | 77 | drivers/char/pty.c | if (!tty->link) |
tty | 79 | drivers/char/pty.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 80 | drivers/char/pty.c | wake_up_interruptible(&tty->link->write_wait); |
tty | 81 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 82 | drivers/char/pty.c | tty_hangup(tty->link); |
tty | 83 | drivers/char/pty.c | set_bit(TTY_SLAVE_CLOSED, &tty->flags); |
tty | 85 | drivers/char/pty.c | start_tty(tty); |
tty | 86 | drivers/char/pty.c | set_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 100 | drivers/char/pty.c | static void pty_unthrottle(struct tty_struct * tty) |
tty | 102 | drivers/char/pty.c | struct tty_struct *o_tty = tty->link; |
tty | 111 | drivers/char/pty.c | set_bit(TTY_THROTTLED, &tty->flags); |
tty | 114 | drivers/char/pty.c | static int pty_write(struct tty_struct * tty, int from_user, |
tty | 117 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 121 | drivers/char/pty.c | if (!to || tty->stopped) |
tty | 127 | drivers/char/pty.c | ((tty->driver.subtype-1) * PTY_BUF_SIZE); |
tty | 148 | drivers/char/pty.c | static int pty_write_room(struct tty_struct *tty) |
tty | 150 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 152 | drivers/char/pty.c | if (!to || tty->stopped) |
tty | 158 | drivers/char/pty.c | static int pty_chars_in_buffer(struct tty_struct *tty) |
tty | 160 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 168 | drivers/char/pty.c | static void pty_flush_buffer(struct tty_struct *tty) |
tty | 170 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 179 | drivers/char/pty.c | tty->ctrl_status |= TIOCPKT_FLUSHWRITE; |
tty | 184 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
tty | 189 | drivers/char/pty.c | if (!tty || !tty->link) |
tty | 191 | drivers/char/pty.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 195 | drivers/char/pty.c | tty->driver_data = pty; |
tty | 203 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_SLAVE) |
tty | 204 | drivers/char/pty.c | clear_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 206 | drivers/char/pty.c | set_bit(TTY_THROTTLED, &tty->flags); |
tty | 209 | drivers/char/pty.c | while (test_bit(TTY_SLAVE_CLOSED, &tty->link->flags) && |
tty | 212 | drivers/char/pty.c | if (!tty->link->count) |
tty | 214 | drivers/char/scc.c | int scc_open(struct tty_struct *tty, struct file *filp); |
tty | 215 | drivers/char/scc.c | static void scc_close(struct tty_struct *tty, struct file *filp); |
tty | 216 | drivers/char/scc.c | int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 217 | drivers/char/scc.c | static void scc_put_char(struct tty_struct *tty, unsigned char ch); |
tty | 218 | drivers/char/scc.c | static void scc_flush_chars(struct tty_struct *tty); |
tty | 219 | drivers/char/scc.c | static int scc_write_room(struct tty_struct *tty); |
tty | 220 | drivers/char/scc.c | static int scc_chars_in_buffer(struct tty_struct *tty); |
tty | 221 | drivers/char/scc.c | static void scc_flush_buffer(struct tty_struct *tty); |
tty | 222 | drivers/char/scc.c | static int scc_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 223 | drivers/char/scc.c | static void scc_set_termios(struct tty_struct *tty, struct termios *old_termios); |
tty | 224 | drivers/char/scc.c | static void scc_set_ldisc(struct tty_struct *tty); |
tty | 225 | drivers/char/scc.c | static void scc_throttle(struct tty_struct *tty); |
tty | 226 | drivers/char/scc.c | static void scc_unthrottle(struct tty_struct *tty); |
tty | 227 | drivers/char/scc.c | static void scc_start(struct tty_struct *tty); |
tty | 228 | drivers/char/scc.c | static void scc_stop(struct tty_struct *tty); |
tty | 505 | drivers/char/scc.c | printk("z8530drv: %s: can't allocate memory for rx buffer pool", kdevname(scc->tty->device)); |
tty | 530 | drivers/char/scc.c | printk("z8530drv: %s: can't allocate memory for tx buffer pool", kdevname(scc->tty->device)); |
tty | 669 | drivers/char/scc.c | printk("z8530drv: scc_get_buffer(%s): tx buffer pool empty\n", kdevname(scc->tty->device)); |
tty | 685 | drivers/char/scc.c | printk("z8530drv: scc_get_buffer(%s): rx buffer pool empty\n", kdevname(scc->tty->device)); |
tty | 764 | drivers/char/scc.c | if (!scc->tty) break; |
tty | 805 | drivers/char/scc.c | if (!scc->tty) break; |
tty | 1365 | drivers/char/scc.c | if (scc2 == scc || !(scc2->tty && grp2)) |
tty | 1499 | drivers/char/scc.c | if (scc->tty && scc->init) |
tty | 1544 | drivers/char/scc.c | kdevname(scc->tty->device)); |
tty | 1785 | drivers/char/scc.c | struct tty_struct * tty = scc->tty; |
tty | 1792 | drivers/char/scc.c | while(tty->flip.count < TTY_FLIPBUF_SIZE-4) |
tty | 1814 | drivers/char/scc.c | tty_insert_flip_char(tty, FEND, 0); /* send FEND for old frame */ |
tty | 1827 | drivers/char/scc.c | tty_insert_flip_char(tty, FEND, 0); |
tty | 1830 | drivers/char/scc.c | tty_insert_flip_char(tty, 0, 0); |
tty | 1838 | drivers/char/scc.c | tty_insert_flip_char(tty, FESC, 0); |
tty | 1839 | drivers/char/scc.c | tty_insert_flip_char(tty, TFEND, 0); |
tty | 1842 | drivers/char/scc.c | tty_insert_flip_char(tty, FESC, 0); |
tty | 1843 | drivers/char/scc.c | tty_insert_flip_char(tty, TFESC, 0); |
tty | 1846 | drivers/char/scc.c | tty_insert_flip_char(tty, ch, 0); |
tty | 1853 | drivers/char/scc.c | queue_task(&tty->flip.tqueue, &tq_timer); /* kick it... */ |
tty | 1955 | drivers/char/scc.c | int scc_open(struct tty_struct *tty, struct file * filp) |
tty | 1960 | drivers/char/scc.c | chan = MINOR(tty->device) - tty->driver.minor_start; |
tty | 1967 | drivers/char/scc.c | tty->driver_data = &SCC_Info[0]; |
tty | 1974 | drivers/char/scc.c | tty->driver_data = scc; |
tty | 1975 | drivers/char/scc.c | tty->termios->c_cflag &= ~CBAUD; |
tty | 1980 | drivers/char/scc.c | kdevname(tty->device)); |
tty | 1986 | drivers/char/scc.c | if(scc->tty != NULL) |
tty | 1992 | drivers/char/scc.c | scc->tty = tty; |
tty | 2010 | drivers/char/scc.c | scc_close(struct tty_struct *tty, struct file * filp) |
tty | 2012 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2026 | drivers/char/scc.c | tty->driver_data = NULLBUF; |
tty | 2037 | drivers/char/scc.c | scc->tty = NULL; |
tty | 2047 | drivers/char/scc.c | tty->stopped = 0; |
tty | 2060 | drivers/char/scc.c | if (scc->tty == NULL) |
tty | 2064 | drivers/char/scc.c | speed = baud_table[scc->tty->termios->c_cflag & CBAUD]; |
tty | 2092 | drivers/char/scc.c | scc_ioctl(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) |
tty | 2094 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
tty | 2106 | drivers/char/scc.c | kdevname(tty->device)); |
tty | 2213 | drivers/char/scc.c | scc->tty=tty; |
tty | 2333 | drivers/char/scc.c | memcpy_tofs((void *) arg, scc->tty->termios, sizeof(struct termios)); |
tty | 2342 | drivers/char/scc.c | memcpy_fromfs(scc->tty->termios, (void *) arg, sizeof(struct termios)); |
tty | 2464 | drivers/char/scc.c | int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 2466 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
tty | 2471 | drivers/char/scc.c | if (!tty) return count; |
tty | 2473 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write")) |
tty | 2501 | drivers/char/scc.c | wake_up_interruptible(&tty->write_wait); |
tty | 2503 | drivers/char/scc.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 2504 | drivers/char/scc.c | tty->ldisc.write_wakeup) |
tty | 2505 | drivers/char/scc.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2528 | drivers/char/scc.c | static void scc_put_char(struct tty_struct * tty, unsigned char ch) |
tty | 2530 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2533 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_put_char")) |
tty | 2537 | drivers/char/scc.c | scc_write(tty, 0, &ch2, 1); /* that's all */ |
tty | 2540 | drivers/char/scc.c | static void scc_flush_chars(struct tty_struct * tty) |
tty | 2542 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2544 | drivers/char/scc.c | scc_paranoia_check(scc, tty->device, "scc_flush_chars"); /* just to annoy the user... */ |
tty | 2550 | drivers/char/scc.c | static int scc_write_room(struct tty_struct *tty) |
tty | 2552 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2554 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write_room")) |
tty | 2560 | drivers/char/scc.c | static int scc_chars_in_buffer(struct tty_struct *tty) |
tty | 2562 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2570 | drivers/char/scc.c | static void scc_flush_buffer(struct tty_struct *tty) |
tty | 2572 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2574 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_flush_buffer")) |
tty | 2576 | drivers/char/scc.c | wake_up_interruptible(&tty->write_wait); |
tty | 2577 | drivers/char/scc.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 2578 | drivers/char/scc.c | tty->ldisc.write_wakeup) |
tty | 2579 | drivers/char/scc.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2582 | drivers/char/scc.c | static void scc_throttle(struct tty_struct *tty) |
tty | 2584 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2586 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_throttle")) |
tty | 2590 | drivers/char/scc.c | printk("scc: scc_throttle() called for device %d\n", MINOR(tty->device)); |
tty | 2599 | drivers/char/scc.c | static void scc_unthrottle(struct tty_struct *tty) |
tty | 2601 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2603 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_unthrottle")) |
tty | 2607 | drivers/char/scc.c | printk("scc: scc_unthrottle() called for device %d\n", MINOR(tty->device)); |
tty | 2616 | drivers/char/scc.c | static void scc_start(struct tty_struct *tty) |
tty | 2618 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2620 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_start")) |
tty | 2623 | drivers/char/scc.c | scc_unthrottle(tty); |
tty | 2626 | drivers/char/scc.c | static void scc_stop(struct tty_struct *tty) |
tty | 2628 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2630 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_stop")) |
tty | 2633 | drivers/char/scc.c | scc_throttle(tty); |
tty | 2637 | drivers/char/scc.c | scc_set_termios(struct tty_struct * tty, struct termios * old_termios) |
tty | 2639 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2641 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_set_termios")) |
tty | 2644 | drivers/char/scc.c | if (old_termios && (tty->termios->c_cflag == old_termios->c_cflag)) |
tty | 2651 | drivers/char/scc.c | scc_set_ldisc(struct tty_struct * tty) |
tty | 2653 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2655 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_set_ldisc")) |
tty | 114 | drivers/char/selection.c | int set_selection(const unsigned long arg, struct tty_struct *tty) |
tty | 145 | drivers/char/selection.c | mouse_report(tty, sel_mode & 15, xs, ys); |
tty | 270 | drivers/char/selection.c | int paste_selection(struct tty_struct *tty) |
tty | 276 | drivers/char/selection.c | struct vt_struct *vt = (struct vt_struct *) tty->driver_data; |
tty | 284 | drivers/char/selection.c | if (test_bit(TTY_THROTTLED, &tty->flags)) { |
tty | 288 | drivers/char/selection.c | l = MIN(c, tty->ldisc.receive_room(tty)); |
tty | 289 | drivers/char/selection.c | tty->ldisc.receive_buf(tty, bp, 0, l); |
tty | 9 | drivers/char/selection.h | extern int set_selection(const unsigned long arg, struct tty_struct *tty); |
tty | 10 | drivers/char/selection.h | extern int paste_selection(struct tty_struct *tty); |
tty | 13 | drivers/char/selection.h | extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry); |
tty | 297 | drivers/char/serial.c | static void rs_stop(struct tty_struct *tty) |
tty | 299 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 302 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_stop")) |
tty | 313 | drivers/char/serial.c | static void rs_start(struct tty_struct *tty) |
tty | 315 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 318 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_start")) |
tty | 376 | drivers/char/serial.c | struct tty_struct *tty = info->tty; |
tty | 387 | drivers/char/serial.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE) |
tty | 389 | drivers/char/serial.c | tty->flip.count++; |
tty | 392 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 394 | drivers/char/serial.c | do_SAK(tty); |
tty | 396 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_PARITY; |
tty | 398 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_FRAME; |
tty | 400 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; |
tty | 402 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 403 | drivers/char/serial.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 407 | drivers/char/serial.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 424 | drivers/char/serial.c | if ((info->xmit_cnt <= 0) || info->tty->stopped || |
tty | 425 | drivers/char/serial.c | info->tty->hw_stopped) { |
tty | 490 | drivers/char/serial.c | if (info->tty->hw_stopped) { |
tty | 495 | drivers/char/serial.c | info->tty->hw_stopped = 0; |
tty | 506 | drivers/char/serial.c | info->tty->hw_stopped = 1; |
tty | 539 | drivers/char/serial.c | if (!info->tty || |
tty | 596 | drivers/char/serial.c | if (!info || !info->tty) |
tty | 657 | drivers/char/serial.c | if (!info->tty || |
tty | 734 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 736 | drivers/char/serial.c | tty = info->tty; |
tty | 737 | drivers/char/serial.c | if (!tty) |
tty | 741 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 742 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 743 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 744 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 760 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 762 | drivers/char/serial.c | tty = info->tty; |
tty | 763 | drivers/char/serial.c | if (!tty) |
tty | 766 | drivers/char/serial.c | tty_hangup(tty); |
tty | 895 | drivers/char/serial.c | if (info->tty) |
tty | 896 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 935 | drivers/char/serial.c | if (info->tty) |
tty | 936 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 960 | drivers/char/serial.c | if (info->tty) |
tty | 962 | drivers/char/serial.c | &info->tty->flags); |
tty | 1017 | drivers/char/serial.c | if (info->tty) |
tty | 1018 | drivers/char/serial.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1105 | drivers/char/serial.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1116 | drivers/char/serial.c | if (info->tty) |
tty | 1117 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1134 | drivers/char/serial.c | if (!info->tty || !info->tty->termios) |
tty | 1136 | drivers/char/serial.c | cflag = info->tty->termios->c_cflag; |
tty | 1143 | drivers/char/serial.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1236 | drivers/char/serial.c | if (I_INPCK(info->tty)) |
tty | 1238 | drivers/char/serial.c | if (I_BRKINT(info->tty) || I_PARMRK(info->tty)) |
tty | 1242 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1246 | drivers/char/serial.c | if (I_IGNBRK(info->tty)) { |
tty | 1253 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1268 | drivers/char/serial.c | static void rs_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1270 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1273 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_put_char")) |
tty | 1276 | drivers/char/serial.c | if (!tty || !info->xmit_buf) |
tty | 1291 | drivers/char/serial.c | static void rs_flush_chars(struct tty_struct *tty) |
tty | 1293 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1296 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_chars")) |
tty | 1299 | drivers/char/serial.c | if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || |
tty | 1309 | drivers/char/serial.c | static int rs_write(struct tty_struct * tty, int from_user, |
tty | 1313 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1316 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write")) |
tty | 1319 | drivers/char/serial.c | if (!tty || !info->xmit_buf || !tmp_buf) |
tty | 1348 | drivers/char/serial.c | if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped && |
tty | 1357 | drivers/char/serial.c | static int rs_write_room(struct tty_struct *tty) |
tty | 1359 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1362 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write_room")) |
tty | 1370 | drivers/char/serial.c | static int rs_chars_in_buffer(struct tty_struct *tty) |
tty | 1372 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1374 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer")) |
tty | 1379 | drivers/char/serial.c | static void rs_flush_buffer(struct tty_struct *tty) |
tty | 1381 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1383 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_buffer")) |
tty | 1388 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 1389 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 1390 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 1391 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1402 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty) |
tty | 1404 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1408 | drivers/char/serial.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1409 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1412 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_throttle")) |
tty | 1415 | drivers/char/serial.c | if (I_IXOFF(tty)) |
tty | 1416 | drivers/char/serial.c | info->x_char = STOP_CHAR(tty); |
tty | 1425 | drivers/char/serial.c | static void rs_unthrottle(struct tty_struct * tty) |
tty | 1427 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1431 | drivers/char/serial.c | printk("unthrottle %s: %d....\n", _tty_name(tty, buf), |
tty | 1432 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1435 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_unthrottle")) |
tty | 1438 | drivers/char/serial.c | if (I_IXOFF(tty)) { |
tty | 1442 | drivers/char/serial.c | info->x_char = START_CHAR(tty); |
tty | 1857 | drivers/char/serial.c | static int rs_ioctl(struct tty_struct *tty, struct file * file, |
tty | 1861 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 1866 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_ioctl")) |
tty | 1873 | drivers/char/serial.c | if (tty->flags & (1 << TTY_IO_ERROR)) |
tty | 1879 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1882 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1887 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1890 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1897 | drivers/char/serial.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 1902 | drivers/char/serial.c | tty->termios->c_cflag = |
tty | 1903 | drivers/char/serial.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 2027 | drivers/char/serial.c | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 2029 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 2031 | drivers/char/serial.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2037 | drivers/char/serial.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 2038 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 2039 | drivers/char/serial.c | rs_start(tty); |
tty | 2050 | drivers/char/serial.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 2065 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
tty | 2067 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2071 | drivers/char/serial.c | if (!info || serial_paranoia_check(info, tty->device, "rs_close")) |
tty | 2084 | drivers/char/serial.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2111 | drivers/char/serial.c | info->normal_termios = *tty->termios; |
tty | 2113 | drivers/char/serial.c | info->callout_termios = *tty->termios; |
tty | 2118 | drivers/char/serial.c | tty->closing = 1; |
tty | 2120 | drivers/char/serial.c | tty_wait_until_sent(tty, info->closing_wait); |
tty | 2146 | drivers/char/serial.c | if (tty->driver.flush_buffer) |
tty | 2147 | drivers/char/serial.c | tty->driver.flush_buffer(tty); |
tty | 2148 | drivers/char/serial.c | if (tty->ldisc.flush_buffer) |
tty | 2149 | drivers/char/serial.c | tty->ldisc.flush_buffer(tty); |
tty | 2150 | drivers/char/serial.c | tty->closing = 0; |
tty | 2152 | drivers/char/serial.c | info->tty = 0; |
tty | 2153 | drivers/char/serial.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 2154 | drivers/char/serial.c | if (tty->ldisc.close) |
tty | 2155 | drivers/char/serial.c | (tty->ldisc.close)(tty); |
tty | 2156 | drivers/char/serial.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 2157 | drivers/char/serial.c | tty->termios->c_line = N_TTY; |
tty | 2158 | drivers/char/serial.c | if (tty->ldisc.open) |
tty | 2159 | drivers/char/serial.c | (tty->ldisc.open)(tty); |
tty | 2178 | drivers/char/serial.c | void rs_hangup(struct tty_struct *tty) |
tty | 2180 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2182 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_hangup")) |
tty | 2185 | drivers/char/serial.c | rs_flush_buffer(tty); |
tty | 2190 | drivers/char/serial.c | info->tty = 0; |
tty | 2199 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2226 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2246 | drivers/char/serial.c | (tty->flags & (1 << TTY_IO_ERROR))) { |
tty | 2257 | drivers/char/serial.c | if (tty->termios->c_cflag & CLOCAL) |
tty | 2332 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
tty | 2337 | drivers/char/serial.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2341 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_open")) |
tty | 2345 | drivers/char/serial.c | printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, |
tty | 2349 | drivers/char/serial.c | tty->driver_data = info; |
tty | 2350 | drivers/char/serial.c | info->tty = tty; |
tty | 2365 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
tty | 2375 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2376 | drivers/char/serial.c | *tty->termios = info->normal_termios; |
tty | 2378 | drivers/char/serial.c | *tty->termios = info->callout_termios; |
tty | 2717 | drivers/char/serial.c | info->tty = 0; |
tty | 2839 | drivers/char/serial.c | if (info->tty) |
tty | 2840 | drivers/char/serial.c | tty_hangup(info->tty); |
tty | 242 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 458 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp); |
tty | 459 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp); |
tty | 460 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 461 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 462 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty); |
tty | 463 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty); |
tty | 464 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty); |
tty | 465 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 466 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old); |
tty | 467 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty); |
tty | 468 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty); |
tty | 469 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty); |
tty | 470 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty); |
tty | 471 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty); |
tty | 472 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty); |
tty | 569 | drivers/char/stallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 570 | drivers/char/stallion.c | stl_hangup(portp->tty); |
tty | 621 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp) |
tty | 629 | drivers/char/stallion.c | printk("stl_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 632 | drivers/char/stallion.c | minordev = MINOR(tty->device); |
tty | 660 | drivers/char/stallion.c | portp->tty = tty; |
tty | 661 | drivers/char/stallion.c | tty->driver_data = portp; |
tty | 672 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 677 | drivers/char/stallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 699 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 723 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 724 | drivers/char/stallion.c | *tty->termios = portp->normaltermios; |
tty | 726 | drivers/char/stallion.c | *tty->termios = portp->callouttermios; |
tty | 727 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 771 | drivers/char/stallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 792 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp) |
tty | 798 | drivers/char/stallion.c | printk("stl_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 801 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 820 | drivers/char/stallion.c | portp->normaltermios = *tty->termios; |
tty | 822 | drivers/char/stallion.c | portp->callouttermios = *tty->termios; |
tty | 829 | drivers/char/stallion.c | tty->closing = 1; |
tty | 832 | drivers/char/stallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 837 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 840 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 848 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 849 | drivers/char/stallion.c | if (tty->ldisc.flush_buffer) |
tty | 850 | drivers/char/stallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 852 | drivers/char/stallion.c | tty->closing = 0; |
tty | 853 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 854 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 894 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 903 | drivers/char/stallion.c | printk("stl_write(tty=%x,from_user=%d,buf=%x,count=%d)\n", (int) tty, from_user, (int) buf, count); |
tty | 906 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (stl_tmpwritebuf == (char *) NULL)) |
tty | 908 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 971 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 978 | drivers/char/stallion.c | printk("stl_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 981 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 983 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1011 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty) |
tty | 1016 | drivers/char/stallion.c | printk("stl_flushchars(tty=%x)\n", (int) tty); |
tty | 1019 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1021 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1028 | drivers/char/stallion.c | if (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail)) |
tty | 1036 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty) |
tty | 1042 | drivers/char/stallion.c | printk("stl_writeroom(tty=%x)\n", (int) tty); |
tty | 1045 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1047 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1069 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty) |
tty | 1076 | drivers/char/stallion.c | printk("stl_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1079 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1081 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1158 | drivers/char/stallion.c | stl_setport(portp, portp->tty->termios); |
tty | 1164 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1170 | drivers/char/stallion.c | printk("stl_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1173 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1175 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1183 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1184 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1190 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1191 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1197 | drivers/char/stallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1202 | drivers/char/stallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1254 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1260 | drivers/char/stallion.c | printk("stl_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1263 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1265 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1269 | drivers/char/stallion.c | tiosp = tty->termios; |
tty | 1276 | drivers/char/stallion.c | tty->hw_stopped = 0; |
tty | 1277 | drivers/char/stallion.c | stl_start(tty); |
tty | 1290 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty) |
tty | 1296 | drivers/char/stallion.c | printk("stl_throttle(tty=%x)\n", (int) tty); |
tty | 1299 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1301 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1309 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1314 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1328 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty) |
tty | 1334 | drivers/char/stallion.c | printk("stl_unthrottle(tty=%x)\n", (int) tty); |
tty | 1337 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1339 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1347 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1358 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1373 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty) |
tty | 1378 | drivers/char/stallion.c | printk("stl_stop(tty=%x)\n", (int) tty); |
tty | 1381 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1383 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1396 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty) |
tty | 1401 | drivers/char/stallion.c | printk("stl_start(tty=%x)\n", (int) tty); |
tty | 1404 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1406 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1421 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty) |
tty | 1426 | drivers/char/stallion.c | printk("stl_hangup(tty=%x)\n", (int) tty); |
tty | 1429 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1431 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1437 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 1440 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 1442 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1449 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 1450 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1458 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty) |
tty | 1464 | drivers/char/stallion.c | printk("stl_flushbuffer(tty=%x)\n", (int) tty); |
tty | 1467 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1469 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1484 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1485 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1486 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1629 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1645 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1650 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (tty->flip.char_buf_ptr == (char *) NULL) || |
tty | 1651 | drivers/char/stallion.c | ((buflen = TTY_FLIPBUF_SIZE - tty->flip.count) == 0)) { |
tty | 1658 | drivers/char/stallion.c | insb((ioaddr + EREG_DATA), tty->flip.char_buf_ptr, len); |
tty | 1659 | drivers/char/stallion.c | memset(tty->flip.flag_buf_ptr, 0, len); |
tty | 1660 | drivers/char/stallion.c | tty->flip.flag_buf_ptr += len; |
tty | 1661 | drivers/char/stallion.c | tty->flip.char_buf_ptr += len; |
tty | 1662 | drivers/char/stallion.c | tty->flip.count += len; |
tty | 1663 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1670 | drivers/char/stallion.c | if ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) { |
tty | 1676 | drivers/char/stallion.c | do_SAK(tty); |
tty | 1690 | drivers/char/stallion.c | if (tty->flip.char_buf_ptr != (char *) NULL) { |
tty | 1691 | drivers/char/stallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 1692 | drivers/char/stallion.c | *tty->flip.flag_buf_ptr++ = status; |
tty | 1693 | drivers/char/stallion.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 1694 | drivers/char/stallion.c | tty->flip.count++; |
tty | 1696 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1895 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1905 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1906 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1910 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1911 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1912 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1923 | drivers/char/stallion.c | tty_hangup(tty); |
tty | 105 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty); |
tty | 128 | drivers/char/tty_io.c | char *_tty_name(struct tty_struct *tty, char *buf) |
tty | 130 | drivers/char/tty_io.c | if (tty) |
tty | 131 | drivers/char/tty_io.c | sprintf(buf, "%s%d", tty->driver.name, |
tty | 132 | drivers/char/tty_io.c | MINOR(tty->device) - tty->driver.minor_start + |
tty | 133 | drivers/char/tty_io.c | tty->driver.name_base); |
tty | 139 | drivers/char/tty_io.c | char *tty_name(struct tty_struct *tty) |
tty | 143 | drivers/char/tty_io.c | return(_tty_name(tty, buf)); |
tty | 146 | drivers/char/tty_io.c | inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device, |
tty | 155 | drivers/char/tty_io.c | if (!tty) { |
tty | 159 | drivers/char/tty_io.c | if (tty->magic != TTY_MAGIC) { |
tty | 167 | drivers/char/tty_io.c | static int check_tty_count(struct tty_struct *tty, const char *routine) |
tty | 176 | drivers/char/tty_io.c | if (f->private_data == tty) { |
tty | 180 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 181 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_SLAVE && |
tty | 182 | drivers/char/tty_io.c | tty->link && tty->link->count) |
tty | 184 | drivers/char/tty_io.c | if (tty->count != count) { |
tty | 186 | drivers/char/tty_io.c | kdevname(tty->device), tty->count, count, routine); |
tty | 209 | drivers/char/tty_io.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc) |
tty | 218 | drivers/char/tty_io.c | if (tty->ldisc.num == ldisc) |
tty | 220 | drivers/char/tty_io.c | o_ldisc = tty->ldisc; |
tty | 222 | drivers/char/tty_io.c | tty_wait_until_sent(tty, 0); |
tty | 225 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 226 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 229 | drivers/char/tty_io.c | tty->ldisc = ldiscs[ldisc]; |
tty | 230 | drivers/char/tty_io.c | tty->termios->c_line = ldisc; |
tty | 231 | drivers/char/tty_io.c | if (tty->ldisc.open) |
tty | 232 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 234 | drivers/char/tty_io.c | tty->ldisc = o_ldisc; |
tty | 235 | drivers/char/tty_io.c | tty->termios->c_line = tty->ldisc.num; |
tty | 236 | drivers/char/tty_io.c | if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) { |
tty | 237 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 238 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 239 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 240 | drivers/char/tty_io.c | int r = tty->ldisc.open(tty); |
tty | 245 | drivers/char/tty_io.c | tty_name(tty), r); |
tty | 249 | drivers/char/tty_io.c | if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc) |
tty | 250 | drivers/char/tty_io.c | tty->driver.set_ldisc(tty); |
tty | 282 | drivers/char/tty_io.c | int tty_check_change(struct tty_struct * tty) |
tty | 284 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 286 | drivers/char/tty_io.c | if (tty->pgrp <= 0) { |
tty | 290 | drivers/char/tty_io.c | if (current->pgrp == tty->pgrp) |
tty | 354 | drivers/char/tty_io.c | void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) |
tty | 360 | drivers/char/tty_io.c | if (!tty) |
tty | 362 | drivers/char/tty_io.c | check_tty_count(tty, "do_tty_hangup"); |
tty | 366 | drivers/char/tty_io.c | if (filp->private_data != tty) |
tty | 377 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 378 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 379 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 380 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 381 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 382 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 383 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 384 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 385 | drivers/char/tty_io.c | wake_up_interruptible(&tty->read_wait); |
tty | 391 | drivers/char/tty_io.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 392 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 393 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 394 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 395 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 396 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 397 | drivers/char/tty_io.c | i = (tty->ldisc.open)(tty); |
tty | 405 | drivers/char/tty_io.c | if ((tty->session > 0) && (p->session == tty->session) && |
tty | 409 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 410 | drivers/char/tty_io.c | p->tty_old_pgrp = tty->pgrp; |
tty | 412 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 413 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 415 | drivers/char/tty_io.c | tty->flags = 0; |
tty | 416 | drivers/char/tty_io.c | tty->session = 0; |
tty | 417 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 418 | drivers/char/tty_io.c | tty->ctrl_status = 0; |
tty | 419 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) |
tty | 420 | drivers/char/tty_io.c | *tty->termios = tty->driver.init_termios; |
tty | 421 | drivers/char/tty_io.c | if (tty->driver.hangup) |
tty | 422 | drivers/char/tty_io.c | (tty->driver.hangup)(tty); |
tty | 425 | drivers/char/tty_io.c | void tty_hangup(struct tty_struct * tty) |
tty | 428 | drivers/char/tty_io.c | printk("%s hangup...\n", tty_name(tty)); |
tty | 430 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 433 | drivers/char/tty_io.c | void tty_vhangup(struct tty_struct * tty) |
tty | 436 | drivers/char/tty_io.c | printk("%s vhangup...\n", tty_name(tty)); |
tty | 438 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 461 | drivers/char/tty_io.c | struct tty_struct *tty = current->tty; |
tty | 464 | drivers/char/tty_io.c | if (tty) { |
tty | 466 | drivers/char/tty_io.c | tty_vhangup(tty); |
tty | 474 | drivers/char/tty_io.c | if (tty->pgrp > 0) { |
tty | 475 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGHUP, on_exit); |
tty | 476 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGCONT, on_exit); |
tty | 480 | drivers/char/tty_io.c | tty->session = 0; |
tty | 481 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 485 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 671 | drivers/char/tty_io.c | void stop_tty(struct tty_struct *tty) |
tty | 673 | drivers/char/tty_io.c | if (tty->stopped) |
tty | 675 | drivers/char/tty_io.c | tty->stopped = 1; |
tty | 676 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 677 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_START; |
tty | 678 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_STOP; |
tty | 679 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 681 | drivers/char/tty_io.c | if (tty->driver.stop) |
tty | 682 | drivers/char/tty_io.c | (tty->driver.stop)(tty); |
tty | 685 | drivers/char/tty_io.c | void start_tty(struct tty_struct *tty) |
tty | 687 | drivers/char/tty_io.c | if (!tty->stopped) |
tty | 689 | drivers/char/tty_io.c | tty->stopped = 0; |
tty | 690 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 691 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_STOP; |
tty | 692 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_START; |
tty | 693 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 695 | drivers/char/tty_io.c | if (tty->driver.start) |
tty | 696 | drivers/char/tty_io.c | (tty->driver.start)(tty); |
tty | 697 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 698 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 699 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 700 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 706 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 708 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 709 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) |
tty | 711 | drivers/char/tty_io.c | if (!tty || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 720 | drivers/char/tty_io.c | (tty->pgrp > 0) && |
tty | 721 | drivers/char/tty_io.c | (current->tty == tty) && |
tty | 722 | drivers/char/tty_io.c | (tty->pgrp != current->pgrp)) |
tty | 730 | drivers/char/tty_io.c | if (tty->ldisc.read) |
tty | 732 | drivers/char/tty_io.c | i = (tty->ldisc.read)(tty,file,(unsigned char *)buf,(unsigned int)count); |
tty | 743 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 748 | drivers/char/tty_io.c | tty = redirect; |
tty | 750 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 751 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) |
tty | 753 | drivers/char/tty_io.c | if (!tty || !tty->driver.write || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 756 | drivers/char/tty_io.c | if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) && |
tty | 757 | drivers/char/tty_io.c | (current->tty == tty) && (tty->pgrp != current->pgrp)) { |
tty | 766 | drivers/char/tty_io.c | if (tty->ldisc.write) |
tty | 768 | drivers/char/tty_io.c | i = (tty->ldisc.write)(tty,file,(const unsigned char *)buf,(unsigned int)count); |
tty | 783 | drivers/char/tty_io.c | struct tty_struct *tty, **tty_loc, *o_tty, **o_tty_loc; |
tty | 795 | drivers/char/tty_io.c | tty = o_tty = NULL; |
tty | 812 | drivers/char/tty_io.c | if (!*tty_loc && !tty) { |
tty | 813 | drivers/char/tty_io.c | if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL))) |
tty | 815 | drivers/char/tty_io.c | initialize_tty_struct(tty); |
tty | 816 | drivers/char/tty_io.c | tty->device = device; |
tty | 817 | drivers/char/tty_io.c | tty->driver = *driver; |
tty | 883 | drivers/char/tty_io.c | tty->termios = *tp_loc; |
tty | 884 | drivers/char/tty_io.c | tty->termios_locked = *ltp_loc; |
tty | 885 | drivers/char/tty_io.c | *tty_loc = tty; |
tty | 888 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 889 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 892 | drivers/char/tty_io.c | tty = NULL; |
tty | 896 | drivers/char/tty_io.c | tty = NULL; |
tty | 939 | drivers/char/tty_io.c | if (tty) |
tty | 940 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 961 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 966 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 967 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev")) |
tty | 970 | drivers/char/tty_io.c | check_tty_count(tty, "release_dev"); |
tty | 974 | drivers/char/tty_io.c | tp = tty->termios; |
tty | 975 | drivers/char/tty_io.c | ltp = tty->termios_locked; |
tty | 977 | drivers/char/tty_io.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 979 | drivers/char/tty_io.c | if (idx < 0 || idx >= tty->driver.num) { |
tty | 981 | drivers/char/tty_io.c | kdevname(tty->device)); |
tty | 984 | drivers/char/tty_io.c | if (tty != tty->driver.table[idx]) { |
tty | 986 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 989 | drivers/char/tty_io.c | if (tp != tty->driver.termios[idx]) { |
tty | 992 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 995 | drivers/char/tty_io.c | if (ltp != tty->driver.termios_locked[idx]) { |
tty | 998 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1004 | drivers/char/tty_io.c | printk("release_dev of %s (tty count=%d)...", tty_name(tty), |
tty | 1005 | drivers/char/tty_io.c | tty->count); |
tty | 1008 | drivers/char/tty_io.c | o_tty = tty->link; |
tty | 1013 | drivers/char/tty_io.c | if (tty->driver.other) { |
tty | 1014 | drivers/char/tty_io.c | if (o_tty != tty->driver.other->table[idx]) { |
tty | 1017 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1020 | drivers/char/tty_io.c | if (o_tp != tty->driver.other->termios[idx]) { |
tty | 1023 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1026 | drivers/char/tty_io.c | if (o_ltp != tty->driver.other->termios_locked[idx]) { |
tty | 1029 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1033 | drivers/char/tty_io.c | if (o_tty->link != tty) { |
tty | 1040 | drivers/char/tty_io.c | if (tty->driver.close) |
tty | 1041 | drivers/char/tty_io.c | tty->driver.close(tty, filp); |
tty | 1042 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1043 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 1044 | drivers/char/tty_io.c | if (--tty->link->count < 0) { |
tty | 1046 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1047 | drivers/char/tty_io.c | tty->link->count = 0; |
tty | 1050 | drivers/char/tty_io.c | if (--tty->count < 0) { |
tty | 1052 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1053 | drivers/char/tty_io.c | tty->count = 0; |
tty | 1055 | drivers/char/tty_io.c | if (tty->count) |
tty | 1064 | drivers/char/tty_io.c | tty->driver.other->table[idx] = NULL; |
tty | 1065 | drivers/char/tty_io.c | tty->driver.other->termios[idx] = NULL; |
tty | 1072 | drivers/char/tty_io.c | tty->flags |= (1 << TTY_CLOSING); |
tty | 1081 | drivers/char/tty_io.c | if ((*p)->tty == tty) |
tty | 1082 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1083 | drivers/char/tty_io.c | if (o_tty && (*p)->tty == o_tty) |
tty | 1084 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1091 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 1092 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 1093 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1094 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 1101 | drivers/char/tty_io.c | tty->driver.table[idx] = NULL; |
tty | 1102 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) { |
tty | 1103 | drivers/char/tty_io.c | tty->driver.termios[idx] = NULL; |
tty | 1106 | drivers/char/tty_io.c | if (tty == redirect || o_tty == redirect) |
tty | 1113 | drivers/char/tty_io.c | if (tty->flip.tqueue.sync) { |
tty | 1117 | drivers/char/tty_io.c | if (tq == &tty->flip.tqueue) { |
tty | 1127 | drivers/char/tty_io.c | tty->magic = 0; |
tty | 1128 | drivers/char/tty_io.c | (*tty->driver.refcount)--; |
tty | 1129 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1152 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 1161 | drivers/char/tty_io.c | if (!current->tty) |
tty | 1163 | drivers/char/tty_io.c | device = current->tty->device; |
tty | 1172 | drivers/char/tty_io.c | retval = init_dev(device, &tty); |
tty | 1175 | drivers/char/tty_io.c | filp->private_data = tty; |
tty | 1176 | drivers/char/tty_io.c | check_tty_count(tty, "tty_open"); |
tty | 1177 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1178 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1181 | drivers/char/tty_io.c | printk("opening %s...", tty_name(tty)); |
tty | 1183 | drivers/char/tty_io.c | if (tty->driver.open) |
tty | 1184 | drivers/char/tty_io.c | retval = tty->driver.open(tty, filp); |
tty | 1188 | drivers/char/tty_io.c | if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser()) |
tty | 1193 | drivers/char/tty_io.c | printk("error %d in opening %s...", retval, tty_name(tty)); |
tty | 1210 | drivers/char/tty_io.c | !current->tty && |
tty | 1211 | drivers/char/tty_io.c | tty->session == 0) { |
tty | 1212 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1214 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1215 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1232 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1234 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1235 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_select")) |
tty | 1238 | drivers/char/tty_io.c | if (tty->ldisc.select) |
tty | 1239 | drivers/char/tty_io.c | return (tty->ldisc.select)(tty, inode, filp, sel_type, wait); |
tty | 1285 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1288 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1289 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync")) |
tty | 1292 | drivers/char/tty_io.c | retval = fasync_helper(inode, filp, on, &tty->fasync); |
tty | 1297 | drivers/char/tty_io.c | if (!tty->read_wait) |
tty | 1298 | drivers/char/tty_io.c | tty->minimum_to_wake = 1; |
tty | 1300 | drivers/char/tty_io.c | if (tty->pgrp) |
tty | 1301 | drivers/char/tty_io.c | filp->f_owner = -tty->pgrp; |
tty | 1306 | drivers/char/tty_io.c | if (!tty->fasync && !tty->read_wait) |
tty | 1307 | drivers/char/tty_io.c | tty->minimum_to_wake = N_TTY_BUF_SIZE; |
tty | 1350 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1357 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 1358 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) |
tty | 1361 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1362 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1363 | drivers/char/tty_io.c | real_tty = tty->link; |
tty | 1365 | drivers/char/tty_io.c | real_tty = tty; |
tty | 1369 | drivers/char/tty_io.c | if ((current->tty != tty) && !suser()) |
tty | 1375 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, &ch, &mbz, 1); |
tty | 1382 | drivers/char/tty_io.c | memcpy_tofs((struct winsize *) arg, &tty->winsize, |
tty | 1392 | drivers/char/tty_io.c | if (memcmp(&tmp_ws, &tty->winsize, |
tty | 1394 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 1395 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGWINCH, 1); |
tty | 1396 | drivers/char/tty_io.c | if ((real_tty->pgrp != tty->pgrp) && |
tty | 1400 | drivers/char/tty_io.c | tty->winsize = tmp_ws; |
tty | 1404 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) { |
tty | 1425 | drivers/char/tty_io.c | set_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1428 | drivers/char/tty_io.c | clear_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1431 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 1435 | drivers/char/tty_io.c | current->tty = NULL; |
tty | 1439 | drivers/char/tty_io.c | (current->session == tty->session)) |
tty | 1445 | drivers/char/tty_io.c | if (!current->leader || current->tty) |
tty | 1447 | drivers/char/tty_io.c | if (tty->session > 0) { |
tty | 1459 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 1460 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 1464 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1466 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1467 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1474 | drivers/char/tty_io.c | if (tty == real_tty && current->tty != real_tty) |
tty | 1486 | drivers/char/tty_io.c | if (!current->tty || |
tty | 1487 | drivers/char/tty_io.c | (current->tty != real_tty) || |
tty | 1502 | drivers/char/tty_io.c | put_user(tty->ldisc.num, (int *) arg); |
tty | 1505 | drivers/char/tty_io.c | retval = tty_check_change(tty); |
tty | 1509 | drivers/char/tty_io.c | return tty_set_ldisc(tty, arg); |
tty | 1511 | drivers/char/tty_io.c | if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE) |
tty | 1513 | drivers/char/tty_io.c | if (current->tty != tty && !suser()) |
tty | 1531 | drivers/char/tty_io.c | return set_selection(arg, tty); |
tty | 1533 | drivers/char/tty_io.c | return paste_selection(tty); |
tty | 1575 | drivers/char/tty_io.c | tty, sizeof(struct tty_struct)); |
tty | 1578 | drivers/char/tty_io.c | if (tty->driver.ioctl) { |
tty | 1579 | drivers/char/tty_io.c | retval = (tty->driver.ioctl)(tty, file, |
tty | 1584 | drivers/char/tty_io.c | if (tty->ldisc.ioctl) { |
tty | 1585 | drivers/char/tty_io.c | retval = (tty->ldisc.ioctl)(tty, file, |
tty | 1607 | drivers/char/tty_io.c | void do_SAK( struct tty_struct *tty) |
tty | 1610 | drivers/char/tty_io.c | tty_hangup(tty); |
tty | 1617 | drivers/char/tty_io.c | if (!tty) |
tty | 1619 | drivers/char/tty_io.c | session = tty->session; |
tty | 1620 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 1621 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 1622 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 1623 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 1627 | drivers/char/tty_io.c | if (((*p)->tty == tty) || |
tty | 1634 | drivers/char/tty_io.c | (filp->private_data == tty)) { |
tty | 1650 | drivers/char/tty_io.c | struct tty_struct *tty = (struct tty_struct *) private_; |
tty | 1655 | drivers/char/tty_io.c | if (tty->flip.buf_num) { |
tty | 1656 | drivers/char/tty_io.c | cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1657 | drivers/char/tty_io.c | fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1658 | drivers/char/tty_io.c | tty->flip.buf_num = 0; |
tty | 1661 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1662 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1664 | drivers/char/tty_io.c | cp = tty->flip.char_buf; |
tty | 1665 | drivers/char/tty_io.c | fp = tty->flip.flag_buf; |
tty | 1666 | drivers/char/tty_io.c | tty->flip.buf_num = 1; |
tty | 1669 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1670 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1672 | drivers/char/tty_io.c | count = tty->flip.count; |
tty | 1673 | drivers/char/tty_io.c | tty->flip.count = 0; |
tty | 1677 | drivers/char/tty_io.c | if (count > tty->max_flip_cnt) |
tty | 1678 | drivers/char/tty_io.c | tty->max_flip_cnt = count; |
tty | 1680 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, cp, fp, count); |
tty | 1686 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty) |
tty | 1688 | drivers/char/tty_io.c | memset(tty, 0, sizeof(struct tty_struct)); |
tty | 1689 | drivers/char/tty_io.c | tty->magic = TTY_MAGIC; |
tty | 1690 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1691 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 1692 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1693 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1694 | drivers/char/tty_io.c | tty->flip.tqueue.routine = flush_to_ldisc; |
tty | 1695 | drivers/char/tty_io.c | tty->flip.tqueue.data = tty; |
tty | 1701 | drivers/char/tty_io.c | void tty_default_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1703 | drivers/char/tty_io.c | tty->driver.write(tty, 0, &ch, 1); |
tty | 43 | drivers/char/tty_ioctl.c | void tty_wait_until_sent(struct tty_struct * tty, int timeout) |
tty | 48 | drivers/char/tty_ioctl.c | printk("%s wait until sent...\n", tty_name(tty)); |
tty | 50 | drivers/char/tty_ioctl.c | if (!tty->driver.chars_in_buffer || |
tty | 51 | drivers/char/tty_ioctl.c | !tty->driver.chars_in_buffer(tty)) |
tty | 53 | drivers/char/tty_ioctl.c | add_wait_queue(&tty->write_wait, &wait); |
tty | 61 | drivers/char/tty_ioctl.c | printk("waiting %s...(%d)\n", tty_name(tty), tty->driver.chars_in_buffer(tty)); |
tty | 66 | drivers/char/tty_ioctl.c | if (!tty->driver.chars_in_buffer(tty)) |
tty | 71 | drivers/char/tty_ioctl.c | remove_wait_queue(&tty->write_wait, &wait); |
tty | 97 | drivers/char/tty_ioctl.c | static void change_termios(struct tty_struct * tty, struct termios * new_termios) |
tty | 100 | drivers/char/tty_ioctl.c | struct termios old_termios = *tty->termios; |
tty | 103 | drivers/char/tty_ioctl.c | *tty->termios = *new_termios; |
tty | 104 | drivers/char/tty_ioctl.c | unset_locked_termios(tty->termios, &old_termios, tty->termios_locked); |
tty | 105 | drivers/char/tty_ioctl.c | canon_change = (old_termios.c_lflag ^ tty->termios->c_lflag) & ICANON; |
tty | 107 | drivers/char/tty_ioctl.c | memset(&tty->read_flags, 0, sizeof tty->read_flags); |
tty | 108 | drivers/char/tty_ioctl.c | tty->canon_head = tty->read_tail; |
tty | 109 | drivers/char/tty_ioctl.c | tty->canon_data = 0; |
tty | 110 | drivers/char/tty_ioctl.c | tty->erasing = 0; |
tty | 113 | drivers/char/tty_ioctl.c | if (canon_change && !L_ICANON(tty) && tty->read_cnt) |
tty | 115 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->read_wait); |
tty | 119 | drivers/char/tty_ioctl.c | if (tty->link && tty->link->packet) { |
tty | 123 | drivers/char/tty_ioctl.c | int new_flow = (I_IXON(tty) && |
tty | 124 | drivers/char/tty_ioctl.c | STOP_CHAR(tty) == '\023' && |
tty | 125 | drivers/char/tty_ioctl.c | START_CHAR(tty) == '\021'); |
tty | 127 | drivers/char/tty_ioctl.c | tty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP); |
tty | 129 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_DOSTOP; |
tty | 131 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_NOSTOP; |
tty | 132 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 136 | drivers/char/tty_ioctl.c | if (tty->driver.set_termios) |
tty | 137 | drivers/char/tty_ioctl.c | (*tty->driver.set_termios)(tty, &old_termios); |
tty | 139 | drivers/char/tty_ioctl.c | if (tty->ldisc.set_termios) |
tty | 140 | drivers/char/tty_ioctl.c | (*tty->ldisc.set_termios)(tty, &old_termios); |
tty | 143 | drivers/char/tty_ioctl.c | static int set_termios(struct tty_struct * tty, unsigned long arg, int opt) |
tty | 148 | drivers/char/tty_ioctl.c | retval = tty_check_change(tty); |
tty | 157 | drivers/char/tty_ioctl.c | tmp_termios = *tty->termios; |
tty | 169 | drivers/char/tty_ioctl.c | if ((opt & TERMIOS_FLUSH) && tty->ldisc.flush_buffer) |
tty | 170 | drivers/char/tty_ioctl.c | tty->ldisc.flush_buffer(tty); |
tty | 173 | drivers/char/tty_ioctl.c | tty_wait_until_sent(tty, 0); |
tty | 175 | drivers/char/tty_ioctl.c | change_termios(tty, &tmp_termios); |
tty | 179 | drivers/char/tty_ioctl.c | static int get_termio(struct tty_struct * tty, struct termio * termio) |
tty | 187 | drivers/char/tty_ioctl.c | trans_to_termio(tty->termios, &tmp_termio); |
tty | 192 | drivers/char/tty_ioctl.c | static unsigned long inq_canon(struct tty_struct * tty) |
tty | 196 | drivers/char/tty_ioctl.c | if (!tty->canon_data || !tty->read_buf) |
tty | 198 | drivers/char/tty_ioctl.c | head = tty->canon_head; |
tty | 199 | drivers/char/tty_ioctl.c | tail = tty->read_tail; |
tty | 203 | drivers/char/tty_ioctl.c | if (test_bit(tail, &tty->read_flags) && |
tty | 204 | drivers/char/tty_ioctl.c | tty->read_buf[tail] == __DISABLED_CHAR) |
tty | 217 | drivers/char/tty_ioctl.c | static int get_sgflags(struct tty_struct * tty) |
tty | 221 | drivers/char/tty_ioctl.c | if (!(tty->termios->c_lflag & ICANON)) |
tty | 222 | drivers/char/tty_ioctl.c | if (tty->termios->c_lflag & ISIG) |
tty | 226 | drivers/char/tty_ioctl.c | if (tty->termios->c_lflag & ECHO) |
tty | 228 | drivers/char/tty_ioctl.c | if (tty->termios->c_oflag & OPOST) |
tty | 229 | drivers/char/tty_ioctl.c | if (tty->termios->c_oflag & ONLCR) |
tty | 234 | drivers/char/tty_ioctl.c | static int get_sgttyb(struct tty_struct * tty, struct sgttyb * sgttyb) |
tty | 244 | drivers/char/tty_ioctl.c | tmp.sg_erase = tty->termios->c_cc[VERASE]; |
tty | 245 | drivers/char/tty_ioctl.c | tmp.sg_kill = tty->termios->c_cc[VKILL]; |
tty | 246 | drivers/char/tty_ioctl.c | tmp.sg_flags = get_sgflags(tty); |
tty | 276 | drivers/char/tty_ioctl.c | static int set_sgttyb(struct tty_struct * tty, struct sgttyb * sgttyb) |
tty | 285 | drivers/char/tty_ioctl.c | retval = tty_check_change(tty); |
tty | 288 | drivers/char/tty_ioctl.c | termios = *tty->termios; |
tty | 293 | drivers/char/tty_ioctl.c | change_termios(tty, &termios); |
tty | 299 | drivers/char/tty_ioctl.c | static int get_tchars(struct tty_struct * tty, struct tchars * tchars) |
tty | 307 | drivers/char/tty_ioctl.c | tmp.t_intrc = tty->termios->c_cc[VINTR]; |
tty | 308 | drivers/char/tty_ioctl.c | tmp.t_quitc = tty->termios->c_cc[VQUIT]; |
tty | 309 | drivers/char/tty_ioctl.c | tmp.t_startc = tty->termios->c_cc[VSTART]; |
tty | 310 | drivers/char/tty_ioctl.c | tmp.t_stopc = tty->termios->c_cc[VSTOP]; |
tty | 311 | drivers/char/tty_ioctl.c | tmp.t_eofc = tty->termios->c_cc[VEOF]; |
tty | 312 | drivers/char/tty_ioctl.c | tmp.t_brkc = tty->termios->c_cc[VEOL2]; /* what is brkc anyway? */ |
tty | 317 | drivers/char/tty_ioctl.c | static int set_tchars(struct tty_struct * tty, struct tchars * tchars) |
tty | 326 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VINTR] = tmp.t_intrc; |
tty | 327 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VQUIT] = tmp.t_quitc; |
tty | 328 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VSTART] = tmp.t_startc; |
tty | 329 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VSTOP] = tmp.t_stopc; |
tty | 330 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VEOF] = tmp.t_eofc; |
tty | 331 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VEOL2] = tmp.t_brkc; /* what is brkc anyway? */ |
tty | 337 | drivers/char/tty_ioctl.c | static int get_ltchars(struct tty_struct * tty, struct ltchars * ltchars) |
tty | 345 | drivers/char/tty_ioctl.c | tmp.t_suspc = tty->termios->c_cc[VSUSP]; |
tty | 346 | drivers/char/tty_ioctl.c | tmp.t_dsuspc = tty->termios->c_cc[VSUSP]; /* what is dsuspc anyway? */ |
tty | 347 | drivers/char/tty_ioctl.c | tmp.t_rprntc = tty->termios->c_cc[VREPRINT]; |
tty | 348 | drivers/char/tty_ioctl.c | tmp.t_flushc = tty->termios->c_cc[VEOL2]; /* what is flushc anyway? */ |
tty | 349 | drivers/char/tty_ioctl.c | tmp.t_werasc = tty->termios->c_cc[VWERASE]; |
tty | 350 | drivers/char/tty_ioctl.c | tmp.t_lnextc = tty->termios->c_cc[VLNEXT]; |
tty | 355 | drivers/char/tty_ioctl.c | static int set_ltchars(struct tty_struct * tty, struct ltchars * ltchars) |
tty | 364 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VSUSP] = tmp.t_suspc; |
tty | 365 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VEOL2] = tmp.t_dsuspc; /* what is dsuspc anyway? */ |
tty | 366 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VREPRINT] = tmp.t_rprntc; |
tty | 367 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VEOL2] = tmp.t_flushc; /* what is flushc anyway? */ |
tty | 368 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VWERASE] = tmp.t_werasc; |
tty | 369 | drivers/char/tty_ioctl.c | tty->termios->c_cc[VLNEXT] = tmp.t_lnextc; |
tty | 374 | drivers/char/tty_ioctl.c | int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
tty | 381 | drivers/char/tty_ioctl.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 382 | drivers/char/tty_ioctl.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 383 | drivers/char/tty_ioctl.c | real_tty = tty->link; |
tty | 385 | drivers/char/tty_ioctl.c | real_tty = tty; |
tty | 431 | drivers/char/tty_ioctl.c | retval = tty_check_change(tty); |
tty | 436 | drivers/char/tty_ioctl.c | stop_tty(tty); |
tty | 439 | drivers/char/tty_ioctl.c | start_tty(tty); |
tty | 442 | drivers/char/tty_ioctl.c | if (STOP_CHAR(tty) != __DISABLED_CHAR) |
tty | 443 | drivers/char/tty_ioctl.c | tty->driver.write(tty, 0, |
tty | 444 | drivers/char/tty_ioctl.c | &STOP_CHAR(tty), 1); |
tty | 447 | drivers/char/tty_ioctl.c | if (START_CHAR(tty) != __DISABLED_CHAR) |
tty | 448 | drivers/char/tty_ioctl.c | tty->driver.write(tty, 0, |
tty | 449 | drivers/char/tty_ioctl.c | &START_CHAR(tty), 1); |
tty | 456 | drivers/char/tty_ioctl.c | retval = tty_check_change(tty); |
tty | 461 | drivers/char/tty_ioctl.c | if (tty->ldisc.flush_buffer) |
tty | 462 | drivers/char/tty_ioctl.c | tty->ldisc.flush_buffer(tty); |
tty | 465 | drivers/char/tty_ioctl.c | if (tty->ldisc.flush_buffer) |
tty | 466 | drivers/char/tty_ioctl.c | tty->ldisc.flush_buffer(tty); |
tty | 469 | drivers/char/tty_ioctl.c | if (tty->driver.flush_buffer) |
tty | 470 | drivers/char/tty_ioctl.c | tty->driver.flush_buffer(tty); |
tty | 481 | drivers/char/tty_ioctl.c | if (tty->driver.chars_in_buffer) |
tty | 482 | drivers/char/tty_ioctl.c | put_user(tty->driver.chars_in_buffer(tty), |
tty | 492 | drivers/char/tty_ioctl.c | if (L_ICANON(tty)) |
tty | 493 | drivers/char/tty_ioctl.c | put_fs_long(inq_canon(tty), |
tty | 496 | drivers/char/tty_ioctl.c | put_fs_long(tty->read_cnt, |
tty | 520 | drivers/char/tty_ioctl.c | if (tty->driver.type != TTY_DRIVER_TYPE_PTY || |
tty | 521 | drivers/char/tty_ioctl.c | tty->driver.subtype != PTY_TYPE_MASTER) |
tty | 528 | drivers/char/tty_ioctl.c | if (!tty->packet) { |
tty | 529 | drivers/char/tty_ioctl.c | tty->packet = 1; |
tty | 530 | drivers/char/tty_ioctl.c | tty->link->ctrl_status = 0; |
tty | 533 | drivers/char/tty_ioctl.c | tty->packet = 0; |
tty | 538 | drivers/char/tty_ioctl.c | retval = tty_check_change(tty); |
tty | 541 | drivers/char/tty_ioctl.c | tty_wait_until_sent(tty, 0); |
tty | 542 | drivers/char/tty_ioctl.c | if (!tty->driver.ioctl) |
tty | 544 | drivers/char/tty_ioctl.c | tty->driver.ioctl(tty, file, cmd, arg); |
tty | 124 | drivers/char/vt.c | if ( p->tty && MAJOR(p->tty->device) == TTY_MAJOR && |
tty | 125 | drivers/char/vt.c | MINOR(p->tty->device) <= MAX_NR_CONSOLES && MINOR(p->tty->device) ) |
tty | 187 | drivers/char/vt.c | int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 194 | drivers/char/vt.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 206 | drivers/char/vt.c | if (current->tty == tty || suser()) |
tty | 325 | drivers/char/vt.c | if (tty->ldisc.flush_buffer) |
tty | 326 | drivers/char/vt.c | tty->ldisc.flush_buffer(tty); |
tty | 237 | drivers/net/ppp.c | static int ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
tty | 241 | drivers/net/ppp.c | static int ppp_tty_room (struct tty_struct *tty); |
tty | 242 | drivers/net/ppp.c | static void ppp_tty_receive (struct tty_struct *tty, const u_char * cp, |
tty | 244 | drivers/net/ppp.c | static void ppp_tty_wakeup (struct tty_struct *tty); |
tty | 255 | drivers/net/ppp.c | #define tty2ppp(tty) ((struct ppp *) (tty->disc_data)) |
tty | 257 | drivers/net/ppp.c | #define ppp2tty(ppp) ((struct tty_struct *) ppp->tty) |
tty | 726 | drivers/net/ppp.c | ppp->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 768 | drivers/net/ppp.c | struct tty_struct *tty; |
tty | 771 | drivers/net/ppp.c | tty = ppp2tty (ppp); |
tty | 776 | drivers/net/ppp.c | if (tty != NULL && tty->disc_data == ppp) |
tty | 777 | drivers/net/ppp.c | tty->disc_data = NULL; /* Break the tty->ppp link */ |
tty | 805 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 815 | drivers/net/ppp.c | ppp_tty_close (struct tty_struct *tty) |
tty | 817 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 842 | drivers/net/ppp.c | ppp_tty_open (struct tty_struct *tty) |
tty | 844 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 870 | drivers/net/ppp.c | ppp->tty = tty; |
tty | 871 | drivers/net/ppp.c | tty->disc_data = ppp; |
tty | 875 | drivers/net/ppp.c | if (tty->ldisc.flush_buffer) |
tty | 876 | drivers/net/ppp.c | tty->ldisc.flush_buffer (tty); |
tty | 878 | drivers/net/ppp.c | if (tty->driver.flush_buffer) |
tty | 879 | drivers/net/ppp.c | tty->driver.flush_buffer (tty); |
tty | 930 | drivers/net/ppp.c | ppp_tty_wakeup_code (struct ppp *ppp, struct tty_struct *tty, |
tty | 948 | drivers/net/ppp.c | actual = tty->driver.write (tty, 0, |
tty | 971 | drivers/net/ppp.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 1024 | drivers/net/ppp.c | ppp_tty_wakeup (struct tty_struct *tty) |
tty | 1027 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 1040 | drivers/net/ppp.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 1042 | drivers/net/ppp.c | ppp_tty_wakeup_code (ppp, tty, xbuf); |
tty | 1081 | drivers/net/ppp.c | ppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 1105 | drivers/net/ppp.c | ppp_tty_room (struct tty_struct *tty) |
tty | 1115 | drivers/net/ppp.c | ppp_tty_receive (struct tty_struct *tty, const u_char * data, |
tty | 1118 | drivers/net/ppp.c | register struct ppp *ppp = tty2ppp (tty); |
tty | 1405 | drivers/net/ppp.c | if (ppp->tty->fasync != NULL) |
tty | 1406 | drivers/net/ppp.c | kill_fasync (ppp->tty->fasync, SIGIO); |
tty | 1772 | drivers/net/ppp.c | ppp_tty_read (struct tty_struct *tty, struct file *file, u_char * buf, |
tty | 1775 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 1804 | drivers/net/ppp.c | ppp = tty2ppp (tty); |
tty | 2162 | drivers/net/ppp.c | ppp_tty_write (struct tty_struct *tty, struct file *file, const u_char * data, |
tty | 2165 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2208 | drivers/net/ppp.c | ppp = tty2ppp (tty); |
tty | 2326 | drivers/net/ppp.c | ppp_tty_ioctl (struct tty_struct *tty, struct file *file, unsigned int param2, |
tty | 2329 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2597 | drivers/net/ppp.c | error = n_tty_ioctl (tty, file, param2, param3); |
tty | 2622 | drivers/net/ppp.c | ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
tty | 2625 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2656 | drivers/net/ppp.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 2894 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 2903 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 3021 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 3026 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 3120 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 3146 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 3342 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 3555 | drivers/net/ppp.c | if (ppp->inuse && ppp->tty != NULL) { |
tty | 140 | drivers/net/slip.c | slp->ctrl.tty = NULL; |
tty | 438 | drivers/net/slip.c | sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 439 | drivers/net/slip.c | actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count); |
tty | 451 | drivers/net/slip.c | static void slip_write_wakeup(struct tty_struct *tty) |
tty | 454 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 465 | drivers/net/slip.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 471 | drivers/net/slip.c | actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft); |
tty | 506 | drivers/net/slip.c | (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ? |
tty | 509 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 571 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 654 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 657 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 667 | drivers/net/slip.c | slip_receive_room(struct tty_struct *tty) |
tty | 679 | drivers/net/slip.c | slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) |
tty | 681 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 724 | drivers/net/slip.c | slip_open(struct tty_struct *tty) |
tty | 726 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 739 | drivers/net/slip.c | sl->tty = tty; |
tty | 740 | drivers/net/slip.c | tty->disc_data = sl; |
tty | 741 | drivers/net/slip.c | if (tty->driver.flush_buffer) { |
tty | 742 | drivers/net/slip.c | tty->driver.flush_buffer(tty); |
tty | 744 | drivers/net/slip.c | if (tty->ldisc.flush_buffer) { |
tty | 745 | drivers/net/slip.c | tty->ldisc.flush_buffer(tty); |
tty | 775 | drivers/net/slip.c | slip_close(struct tty_struct *tty) |
tty | 777 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 786 | drivers/net/slip.c | tty->disc_data = 0; |
tty | 787 | drivers/net/slip.c | sl->tty = NULL; |
tty | 1010 | drivers/net/slip.c | slip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) |
tty | 1012 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 1092 | drivers/net/slip.c | return n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg); |
tty | 1102 | drivers/net/slip.c | if(sl->tty==NULL) |
tty | 50 | drivers/net/slip.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 381 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 392 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 402 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 419 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 430 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 440 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 595 | fs/open.c | if (current->tty) |
tty | 596 | fs/open.c | tty_vhangup(current->tty); |
tty | 500 | fs/proc/array.c | if (tsk->tty) |
tty | 501 | fs/proc/array.c | tty_pgrp = tsk->tty->pgrp; |
tty | 521 | fs/proc/array.c | tsk->tty ? kdev_t_to_nr(tsk->tty->device) : 0, |
tty | 79 | include/linux/cyclades.h | struct tty_struct *tty; |
tty | 112 | include/linux/if_pppvar.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 232 | include/linux/scc.h | struct tty_struct *tty; /* link to tty control structure */ |
tty | 216 | include/linux/sched.h | struct tty_struct *tty; /* NULL if no tty */ |
tty | 138 | include/linux/serial.h | struct tty_struct *tty; |
tty | 105 | include/linux/tty.h | #define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) |
tty | 106 | include/linux/tty.h | #define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) |
tty | 107 | include/linux/tty.h | #define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) |
tty | 108 | include/linux/tty.h | #define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) |
tty | 109 | include/linux/tty.h | #define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) |
tty | 110 | include/linux/tty.h | #define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME]) |
tty | 111 | include/linux/tty.h | #define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN]) |
tty | 112 | include/linux/tty.h | #define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC]) |
tty | 113 | include/linux/tty.h | #define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) |
tty | 114 | include/linux/tty.h | #define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) |
tty | 115 | include/linux/tty.h | #define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) |
tty | 116 | include/linux/tty.h | #define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL]) |
tty | 117 | include/linux/tty.h | #define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT]) |
tty | 118 | include/linux/tty.h | #define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD]) |
tty | 119 | include/linux/tty.h | #define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) |
tty | 120 | include/linux/tty.h | #define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) |
tty | 121 | include/linux/tty.h | #define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2]) |
tty | 123 | include/linux/tty.h | #define _I_FLAG(tty,f) ((tty)->termios->c_iflag & (f)) |
tty | 124 | include/linux/tty.h | #define _O_FLAG(tty,f) ((tty)->termios->c_oflag & (f)) |
tty | 125 | include/linux/tty.h | #define _C_FLAG(tty,f) ((tty)->termios->c_cflag & (f)) |
tty | 126 | include/linux/tty.h | #define _L_FLAG(tty,f) ((tty)->termios->c_lflag & (f)) |
tty | 128 | include/linux/tty.h | #define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK) |
tty | 129 | include/linux/tty.h | #define I_BRKINT(tty) _I_FLAG((tty),BRKINT) |
tty | 130 | include/linux/tty.h | #define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR) |
tty | 131 | include/linux/tty.h | #define I_PARMRK(tty) _I_FLAG((tty),PARMRK) |
tty | 132 | include/linux/tty.h | #define I_INPCK(tty) _I_FLAG((tty),INPCK) |
tty | 133 | include/linux/tty.h | #define I_ISTRIP(tty) _I_FLAG((tty),ISTRIP) |
tty | 134 | include/linux/tty.h | #define I_INLCR(tty) _I_FLAG((tty),INLCR) |
tty | 135 | include/linux/tty.h | #define I_IGNCR(tty) _I_FLAG((tty),IGNCR) |
tty | 136 | include/linux/tty.h | #define I_ICRNL(tty) _I_FLAG((tty),ICRNL) |
tty | 137 | include/linux/tty.h | #define I_IUCLC(tty) _I_FLAG((tty),IUCLC) |
tty | 138 | include/linux/tty.h | #define I_IXON(tty) _I_FLAG((tty),IXON) |
tty | 139 | include/linux/tty.h | #define I_IXANY(tty) _I_FLAG((tty),IXANY) |
tty | 140 | include/linux/tty.h | #define I_IXOFF(tty) _I_FLAG((tty),IXOFF) |
tty | 141 | include/linux/tty.h | #define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL) |
tty | 143 | include/linux/tty.h | #define O_OPOST(tty) _O_FLAG((tty),OPOST) |
tty | 144 | include/linux/tty.h | #define O_OLCUC(tty) _O_FLAG((tty),OLCUC) |
tty | 145 | include/linux/tty.h | #define O_ONLCR(tty) _O_FLAG((tty),ONLCR) |
tty | 146 | include/linux/tty.h | #define O_OCRNL(tty) _O_FLAG((tty),OCRNL) |
tty | 147 | include/linux/tty.h | #define O_ONOCR(tty) _O_FLAG((tty),ONOCR) |
tty | 148 | include/linux/tty.h | #define O_ONLRET(tty) _O_FLAG((tty),ONLRET) |
tty | 149 | include/linux/tty.h | #define O_OFILL(tty) _O_FLAG((tty),OFILL) |
tty | 150 | include/linux/tty.h | #define O_OFDEL(tty) _O_FLAG((tty),OFDEL) |
tty | 151 | include/linux/tty.h | #define O_NLDLY(tty) _O_FLAG((tty),NLDLY) |
tty | 152 | include/linux/tty.h | #define O_CRDLY(tty) _O_FLAG((tty),CRDLY) |
tty | 153 | include/linux/tty.h | #define O_TABDLY(tty) _O_FLAG((tty),TABDLY) |
tty | 154 | include/linux/tty.h | #define O_BSDLY(tty) _O_FLAG((tty),BSDLY) |
tty | 155 | include/linux/tty.h | #define O_VTDLY(tty) _O_FLAG((tty),VTDLY) |
tty | 156 | include/linux/tty.h | #define O_FFDLY(tty) _O_FLAG((tty),FFDLY) |
tty | 158 | include/linux/tty.h | #define C_BAUD(tty) _C_FLAG((tty),CBAUD) |
tty | 159 | include/linux/tty.h | #define C_CSIZE(tty) _C_FLAG((tty),CSIZE) |
tty | 160 | include/linux/tty.h | #define C_CSTOPB(tty) _C_FLAG((tty),CSTOPB) |
tty | 161 | include/linux/tty.h | #define C_CREAD(tty) _C_FLAG((tty),CREAD) |
tty | 162 | include/linux/tty.h | #define C_PARENB(tty) _C_FLAG((tty),PARENB) |
tty | 163 | include/linux/tty.h | #define C_PARODD(tty) _C_FLAG((tty),PARODD) |
tty | 164 | include/linux/tty.h | #define C_HUPCL(tty) _C_FLAG((tty),HUPCL) |
tty | 165 | include/linux/tty.h | #define C_CLOCAL(tty) _C_FLAG((tty),CLOCAL) |
tty | 166 | include/linux/tty.h | #define C_CIBAUD(tty) _C_FLAG((tty),CIBAUD) |
tty | 167 | include/linux/tty.h | #define C_CRTSCTS(tty) _C_FLAG((tty),CRTSCTS) |
tty | 169 | include/linux/tty.h | #define L_ISIG(tty) _L_FLAG((tty),ISIG) |
tty | 170 | include/linux/tty.h | #define L_ICANON(tty) _L_FLAG((tty),ICANON) |
tty | 171 | include/linux/tty.h | #define L_XCASE(tty) _L_FLAG((tty),XCASE) |
tty | 172 | include/linux/tty.h | #define L_ECHO(tty) _L_FLAG((tty),ECHO) |
tty | 173 | include/linux/tty.h | #define L_ECHOE(tty) _L_FLAG((tty),ECHOE) |
tty | 174 | include/linux/tty.h | #define L_ECHOK(tty) _L_FLAG((tty),ECHOK) |
tty | 175 | include/linux/tty.h | #define L_ECHONL(tty) _L_FLAG((tty),ECHONL) |
tty | 176 | include/linux/tty.h | #define L_NOFLSH(tty) _L_FLAG((tty),NOFLSH) |
tty | 177 | include/linux/tty.h | #define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP) |
tty | 178 | include/linux/tty.h | #define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL) |
tty | 179 | include/linux/tty.h | #define L_ECHOPRT(tty) _L_FLAG((tty),ECHOPRT) |
tty | 180 | include/linux/tty.h | #define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE) |
tty | 181 | include/linux/tty.h | #define L_FLUSHO(tty) _L_FLAG((tty),FLUSHO) |
tty | 182 | include/linux/tty.h | #define L_PENDIN(tty) _L_FLAG((tty),PENDIN) |
tty | 183 | include/linux/tty.h | #define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) |
tty | 265 | include/linux/tty.h | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
tty | 287 | include/linux/tty.h | extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, |
tty | 289 | include/linux/tty.h | extern char *_tty_name(struct tty_struct *tty, char *buf); |
tty | 290 | include/linux/tty.h | extern char *tty_name(struct tty_struct *tty); |
tty | 291 | include/linux/tty.h | extern void tty_wait_until_sent(struct tty_struct * tty, int timeout); |
tty | 292 | include/linux/tty.h | extern int tty_check_change(struct tty_struct * tty); |
tty | 293 | include/linux/tty.h | extern void stop_tty(struct tty_struct * tty); |
tty | 294 | include/linux/tty.h | extern void start_tty(struct tty_struct * tty); |
tty | 298 | include/linux/tty.h | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
tty | 300 | include/linux/tty.h | extern void tty_write_message(struct tty_struct *tty, char *msg); |
tty | 304 | include/linux/tty.h | extern int tty_signal(int sig, struct tty_struct *tty); |
tty | 305 | include/linux/tty.h | extern void tty_hangup(struct tty_struct * tty); |
tty | 306 | include/linux/tty.h | extern void tty_vhangup(struct tty_struct * tty); |
tty | 309 | include/linux/tty.h | extern void do_SAK(struct tty_struct *tty); |
tty | 316 | include/linux/tty.h | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
tty | 321 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
tty | 325 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
tty | 329 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
tty | 335 | include/linux/tty.h | extern int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 124 | include/linux/tty_driver.h | int (*open)(struct tty_struct * tty, struct file * filp); |
tty | 125 | include/linux/tty_driver.h | void (*close)(struct tty_struct * tty, struct file * filp); |
tty | 126 | include/linux/tty_driver.h | int (*write)(struct tty_struct * tty, int from_user, |
tty | 128 | include/linux/tty_driver.h | void (*put_char)(struct tty_struct *tty, unsigned char ch); |
tty | 129 | include/linux/tty_driver.h | void (*flush_chars)(struct tty_struct *tty); |
tty | 130 | include/linux/tty_driver.h | int (*write_room)(struct tty_struct *tty); |
tty | 131 | include/linux/tty_driver.h | int (*chars_in_buffer)(struct tty_struct *tty); |
tty | 132 | include/linux/tty_driver.h | int (*ioctl)(struct tty_struct *tty, struct file * file, |
tty | 134 | include/linux/tty_driver.h | void (*set_termios)(struct tty_struct *tty, struct termios * old); |
tty | 135 | include/linux/tty_driver.h | void (*throttle)(struct tty_struct * tty); |
tty | 136 | include/linux/tty_driver.h | void (*unthrottle)(struct tty_struct * tty); |
tty | 137 | include/linux/tty_driver.h | void (*stop)(struct tty_struct *tty); |
tty | 138 | include/linux/tty_driver.h | void (*start)(struct tty_struct *tty); |
tty | 139 | include/linux/tty_driver.h | void (*hangup)(struct tty_struct *tty); |
tty | 140 | include/linux/tty_driver.h | void (*flush_buffer)(struct tty_struct *tty); |
tty | 141 | include/linux/tty_driver.h | void (*set_ldisc)(struct tty_struct *tty); |
tty | 10 | include/linux/tty_flip.h | _INLINE_ void tty_insert_flip_char(struct tty_struct *tty, |
tty | 13 | include/linux/tty_flip.h | if (tty->flip.count++ >= TTY_FLIPBUF_SIZE) |
tty | 15 | include/linux/tty_flip.h | *tty->flip.flag_buf_ptr++ = flag; |
tty | 16 | include/linux/tty_flip.h | *tty->flip.char_buf_ptr++ = ch; |
tty | 19 | include/linux/tty_flip.h | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) |
tty | 21 | include/linux/tty_flip.h | queue_task(&tty->flip.tqueue, &tq_timer); |
tty | 20 | include/linux/tty_ldisc.h | void (*flush_buffer)(struct tty_struct *tty); |
tty | 21 | include/linux/tty_ldisc.h | int (*chars_in_buffer)(struct tty_struct *tty); |
tty | 22 | include/linux/tty_ldisc.h | int (*read)(struct tty_struct * tty, struct file * file, |
tty | 24 | include/linux/tty_ldisc.h | int (*write)(struct tty_struct * tty, struct file * file, |
tty | 26 | include/linux/tty_ldisc.h | int (*ioctl)(struct tty_struct * tty, struct file * file, |
tty | 28 | include/linux/tty_ldisc.h | void (*set_termios)(struct tty_struct *tty, struct termios * old); |
tty | 29 | include/linux/tty_ldisc.h | int (*select)(struct tty_struct * tty, struct inode * inode, |
tty | 248 | kernel/printk.c | void tty_write_message(struct tty_struct *tty, char *msg) |
tty | 250 | kernel/printk.c | if (tty && tty->driver.write) |
tty | 251 | kernel/printk.c | tty->driver.write(tty, 0, msg, strlen(msg)); |
tty | 570 | kernel/sys.c | current->tty = NULL; |