tag | line | file | source code |
tty | 931 | drivers/char/console.c | static void respond_string(const char * p, struct tty_struct * tty) |
tty | 934 | drivers/char/console.c | tty_insert_flip_char(tty, *p, 0); |
tty | 937 | drivers/char/console.c | tty_schedule_flip(tty); |
tty | 940 | drivers/char/console.c | static void cursor_report(int currcons, struct tty_struct * tty) |
tty | 945 | drivers/char/console.c | respond_string(buf, tty); |
tty | 948 | drivers/char/console.c | static inline void status_report(struct tty_struct * tty) |
tty | 950 | drivers/char/console.c | respond_string("\033[0n", tty); /* Terminal ok */ |
tty | 953 | drivers/char/console.c | static inline void respond_ID(struct tty_struct * tty) |
tty | 955 | drivers/char/console.c | respond_string(VT102ID, tty); |
tty | 958 | drivers/char/console.c | void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry) |
tty | 964 | drivers/char/console.c | respond_string(buf, tty); |
tty | 1341 | drivers/char/console.c | static void con_stop(struct tty_struct *tty) |
tty | 1344 | drivers/char/console.c | if (!tty) |
tty | 1346 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1356 | drivers/char/console.c | static void con_start(struct tty_struct *tty) |
tty | 1359 | drivers/char/console.c | if (!tty) |
tty | 1361 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1368 | drivers/char/console.c | static int con_write(struct tty_struct * tty, int from_user, |
tty | 1373 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 1390 | drivers/char/console.c | while (!tty->stopped && count) { |
tty | 1558 | drivers/char/console.c | respond_ID(tty); |
tty | 1649 | drivers/char/console.c | status_report(tty); |
tty | 1651 | drivers/char/console.c | cursor_report(currcons,tty); |
tty | 1713 | drivers/char/console.c | respond_ID(tty); |
tty | 1827 | drivers/char/console.c | static int con_write_room(struct tty_struct *tty) |
tty | 1829 | drivers/char/console.c | if (tty->stopped) |
tty | 1834 | drivers/char/console.c | static int con_chars_in_buffer(struct tty_struct *tty) |
tty | 1907 | drivers/char/console.c | static void con_throttle(struct tty_struct *tty) |
tty | 1911 | drivers/char/console.c | static void con_unthrottle(struct tty_struct *tty) |
tty | 1913 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *) tty->driver_data; |
tty | 2245 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
tty | 2250 | drivers/char/console.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2257 | drivers/char/console.c | tty->driver_data = vt_cons[idx]; |
tty | 2259 | drivers/char/console.c | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { |
tty | 2260 | drivers/char/console.c | tty->winsize.ws_row = video_num_lines; |
tty | 2261 | drivers/char/console.c | tty->winsize.ws_col = video_num_columns; |
tty | 527 | drivers/char/cyclades.c | cy_stop(struct tty_struct *tty) |
tty | 530 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 539 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_stop")) |
tty | 559 | drivers/char/cyclades.c | cy_start(struct tty_struct *tty) |
tty | 562 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 571 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_start")) |
tty | 648 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 703 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 714 | drivers/char/cyclades.c | tty = info->tty; |
tty | 721 | drivers/char/cyclades.c | if (tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 722 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 725 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 727 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 730 | drivers/char/cyclades.c | do_SAK(tty); |
tty | 733 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 735 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 738 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 740 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 743 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 745 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 750 | drivers/char/cyclades.c | if(tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 751 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 752 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 754 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 762 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 763 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 766 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 767 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 785 | drivers/char/cyclades.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE){ |
tty | 788 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 790 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = TTY_NORMAL; |
tty | 791 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = data; |
tty | 797 | drivers/char/cyclades.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 823 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 868 | drivers/char/cyclades.c | if (info->tty->stopped || info->tty->hw_stopped){ |
tty | 926 | drivers/char/cyclades.c | if(info->tty == 0){ /* nowhere to put the data, ignore it */ |
tty | 942 | drivers/char/cyclades.c | if(info->tty->stopped){ |
tty | 945 | drivers/char/cyclades.c | info->tty->stopped = 0; |
tty | 952 | drivers/char/cyclades.c | info->tty->stopped = 1; |
tty | 1007 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 1009 | drivers/char/cyclades.c | tty = info->tty; |
tty | 1010 | drivers/char/cyclades.c | if (!tty) |
tty | 1014 | drivers/char/cyclades.c | tty_hangup(info->tty); |
tty | 1023 | drivers/char/cyclades.c | if((tty->flags & (1<< TTY_DO_WRITE_WAKEUP)) |
tty | 1024 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup){ |
tty | 1025 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1027 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1199 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1200 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1248 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1249 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1326 | drivers/char/cyclades.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1338 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1339 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1362 | drivers/char/cyclades.c | if (!info->tty || !info->tty->termios){ |
tty | 1368 | drivers/char/cyclades.c | cflag = info->tty->termios->c_cflag; |
tty | 1391 | drivers/char/cyclades.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1494 | drivers/char/cyclades.c | base_addr[CySCHR1<<index] = START_CHAR(info->tty); |
tty | 1495 | drivers/char/cyclades.c | base_addr[CySCHR2<<index] = STOP_CHAR(info->tty); |
tty | 1510 | drivers/char/cyclades.c | if (C_CLOCAL(info->tty)) { |
tty | 1538 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1539 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1548 | drivers/char/cyclades.c | cy_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1550 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1557 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_put_char")) |
tty | 1560 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf) |
tty | 1577 | drivers/char/cyclades.c | cy_flush_chars(struct tty_struct *tty) |
tty | 1579 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1588 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_chars")) |
tty | 1591 | drivers/char/cyclades.c | if (info->xmit_cnt <= 0 || tty->stopped |
tty | 1592 | drivers/char/cyclades.c | || tty->hw_stopped || !info->xmit_buf) |
tty | 1617 | drivers/char/cyclades.c | cy_write(struct tty_struct * tty, int from_user, |
tty | 1620 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1628 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write")){ |
tty | 1632 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf || !tmp_buf){ |
tty | 1664 | drivers/char/cyclades.c | && !tty->stopped |
tty | 1665 | drivers/char/cyclades.c | && !tty->hw_stopped ) { |
tty | 1673 | drivers/char/cyclades.c | cy_write_room(struct tty_struct *tty) |
tty | 1675 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1682 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write_room")) |
tty | 1692 | drivers/char/cyclades.c | cy_chars_in_buffer(struct tty_struct *tty) |
tty | 1694 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1700 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer")) |
tty | 1708 | drivers/char/cyclades.c | cy_flush_buffer(struct tty_struct *tty) |
tty | 1710 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1717 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_buffer")) |
tty | 1722 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1723 | drivers/char/cyclades.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) |
tty | 1724 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup) |
tty | 1725 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1734 | drivers/char/cyclades.c | cy_throttle(struct tty_struct * tty) |
tty | 1736 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1744 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1745 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1749 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1753 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1754 | drivers/char/cyclades.c | info->x_char = STOP_CHAR(tty); |
tty | 1776 | drivers/char/cyclades.c | cy_unthrottle(struct tty_struct * tty) |
tty | 1778 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1786 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1787 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1791 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1795 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1796 | drivers/char/cyclades.c | info->x_char = START_CHAR(tty); |
tty | 2143 | drivers/char/cyclades.c | cy_ioctl(struct tty_struct *tty, struct file * file, |
tty | 2147 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2213 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2216 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2221 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2224 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2241 | drivers/char/cyclades.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 2246 | drivers/char/cyclades.c | tty->termios->c_cflag = |
tty | 2247 | drivers/char/cyclades.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 2288 | drivers/char/cyclades.c | cy_set_termios(struct tty_struct *tty, struct termios * old_termios) |
tty | 2290 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 2296 | drivers/char/cyclades.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2301 | drivers/char/cyclades.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 2302 | drivers/char/cyclades.c | tty->stopped = 0; |
tty | 2303 | drivers/char/cyclades.c | cy_start(tty); |
tty | 2307 | drivers/char/cyclades.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 2316 | drivers/char/cyclades.c | cy_close(struct tty_struct * tty, struct file * filp) |
tty | 2318 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2327 | drivers/char/cyclades.c | || serial_paranoia_check(info, tty->device, "cy_close")){ |
tty | 2342 | drivers/char/cyclades.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2375 | drivers/char/cyclades.c | info->normal_termios = *tty->termios; |
tty | 2377 | drivers/char/cyclades.c | info->callout_termios = *tty->termios; |
tty | 2379 | drivers/char/cyclades.c | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ |
tty | 2381 | drivers/char/cyclades.c | if (tty->driver.flush_buffer) |
tty | 2382 | drivers/char/cyclades.c | tty->driver.flush_buffer(tty); |
tty | 2383 | drivers/char/cyclades.c | if (tty->ldisc.flush_buffer) |
tty | 2384 | drivers/char/cyclades.c | tty->ldisc.flush_buffer(tty); |
tty | 2386 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2412 | drivers/char/cyclades.c | cy_hangup(struct tty_struct *tty) |
tty | 2414 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2420 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_hangup")) |
tty | 2429 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2443 | drivers/char/cyclades.c | block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2470 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2554 | drivers/char/cyclades.c | && (C_CLOCAL(tty) |
tty | 2594 | drivers/char/cyclades.c | cy_open(struct tty_struct *tty, struct file * filp) |
tty | 2600 | drivers/char/cyclades.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2611 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_open")){ |
tty | 2621 | drivers/char/cyclades.c | tty->driver_data = info; |
tty | 2622 | drivers/char/cyclades.c | info->tty = tty; |
tty | 2632 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2633 | drivers/char/cyclades.c | *tty->termios = info->normal_termios; |
tty | 2635 | drivers/char/cyclades.c | *tty->termios = info->callout_termios; |
tty | 2645 | drivers/char/cyclades.c | retval = block_til_ready(tty, filp, info); |
tty | 2876 | drivers/char/cyclades.c | info->tty = 0; |
tty | 3148 | drivers/char/cyclades.c | (long)info->tty, info->read_status_mask, |
tty | 265 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 619 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp); |
tty | 620 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp); |
tty | 621 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 622 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 623 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty); |
tty | 624 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty); |
tty | 625 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty); |
tty | 626 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 627 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old); |
tty | 628 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty); |
tty | 629 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty); |
tty | 630 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty); |
tty | 631 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty); |
tty | 632 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty); |
tty | 633 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty); |
tty | 816 | drivers/char/istallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 817 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 852 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp) |
tty | 860 | drivers/char/istallion.c | printk("stli_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 863 | drivers/char/istallion.c | minordev = MINOR(tty->device); |
tty | 901 | drivers/char/istallion.c | portp->tty = tty; |
tty | 902 | drivers/char/istallion.c | tty->driver_data = portp; |
tty | 915 | drivers/char/istallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 941 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 965 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 966 | drivers/char/istallion.c | *tty->termios = portp->normaltermios; |
tty | 968 | drivers/char/istallion.c | *tty->termios = portp->callouttermios; |
tty | 979 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp) |
tty | 986 | drivers/char/istallion.c | printk("stli_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 989 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1007 | drivers/char/istallion.c | portp->normaltermios = *tty->termios; |
tty | 1009 | drivers/char/istallion.c | portp->callouttermios = *tty->termios; |
tty | 1017 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1018 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1019 | drivers/char/istallion.c | tty->closing = 1; |
tty | 1022 | drivers/char/istallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 1028 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 1037 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1038 | drivers/char/istallion.c | if (tty->ldisc.flush_buffer) |
tty | 1039 | drivers/char/istallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 1041 | drivers/char/istallion.c | stli_flushbuffer(tty); |
tty | 1043 | drivers/char/istallion.c | tty->closing = 0; |
tty | 1044 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 1045 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1070 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 1088 | drivers/char/istallion.c | tty = portp->tty; |
tty | 1089 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1091 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, tty->termios); |
tty | 1324 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 1332 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, portp->tty->termios); |
tty | 1395 | drivers/char/istallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 1422 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 1434 | 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 | 1437 | drivers/char/istallion.c | if ((tty == (struct tty_struct *) NULL) || (stli_tmpwritebuf == (char *) NULL)) |
tty | 1439 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1440 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1441 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1547 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 1550 | drivers/char/istallion.c | printk("stli_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 1553 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1555 | drivers/char/istallion.c | if (tty != stli_txcooktty) { |
tty | 1558 | drivers/char/istallion.c | stli_txcooktty = tty; |
tty | 1574 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty) |
tty | 1587 | drivers/char/istallion.c | printk("stli_flushchars(tty=%x)\n", (int) tty); |
tty | 1596 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1600 | drivers/char/istallion.c | if (tty != cooktty) |
tty | 1601 | drivers/char/istallion.c | tty = cooktty; |
tty | 1605 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1669 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty) |
tty | 1678 | drivers/char/istallion.c | printk("stli_writeroom(tty=%x)\n", (int) tty); |
tty | 1681 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1683 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1690 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1712 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1729 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty) |
tty | 1738 | drivers/char/istallion.c | printk("stli_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1741 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1743 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1744 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1745 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1843 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1851 | drivers/char/istallion.c | printk("stli_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1854 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1856 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1869 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1870 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1878 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1879 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1886 | drivers/char/istallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1891 | drivers/char/istallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1963 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1971 | drivers/char/istallion.c | printk("stli_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1974 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1976 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1985 | drivers/char/istallion.c | tiosp = tty->termios; |
tty | 1994 | drivers/char/istallion.c | tty->hw_stopped = 0; |
tty | 2011 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty) |
tty | 2016 | drivers/char/istallion.c | printk("stli_throttle(tty=%x)\n", (int) tty); |
tty | 2019 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2021 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2036 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty) |
tty | 2041 | drivers/char/istallion.c | printk("stli_unthrottle(tty=%x)\n", (int) tty); |
tty | 2044 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2046 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2060 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty) |
tty | 2067 | drivers/char/istallion.c | printk("stli_stop(tty=%x)\n", (int) tty); |
tty | 2070 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2072 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2094 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty) |
tty | 2101 | drivers/char/istallion.c | printk("stli_start(tty=%x)\n", (int) tty); |
tty | 2104 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2106 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2144 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 2146 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 2158 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty) |
tty | 2165 | drivers/char/istallion.c | printk("stli_hangup(tty=%x)\n", (int) tty); |
tty | 2168 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2170 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2185 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 2199 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 2200 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 2201 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 2216 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty) |
tty | 2223 | drivers/char/istallion.c | printk("stli_flushbuffer(tty=%x)\n", (int) tty); |
tty | 2226 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2228 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2239 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 2256 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2257 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2258 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2327 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2337 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2338 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2355 | drivers/char/istallion.c | len = MIN(len, (TTY_FLIPBUF_SIZE - tty->flip.count)); |
tty | 2360 | drivers/char/istallion.c | memcpy(tty->flip.char_buf_ptr, (char *) (shbuf + tail), stlen); |
tty | 2361 | drivers/char/istallion.c | memset(tty->flip.flag_buf_ptr, 0, stlen); |
tty | 2362 | drivers/char/istallion.c | tty->flip.char_buf_ptr += stlen; |
tty | 2363 | drivers/char/istallion.c | tty->flip.flag_buf_ptr += stlen; |
tty | 2364 | drivers/char/istallion.c | tty->flip.count += stlen; |
tty | 2379 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 2436 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2511 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2522 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) |
tty | 2531 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2532 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2533 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2534 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2539 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2540 | drivers/char/istallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 2541 | drivers/char/istallion.c | tty->flip.count++; |
tty | 2542 | drivers/char/istallion.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 2543 | drivers/char/istallion.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 2546 | drivers/char/istallion.c | do_SAK(tty); |
tty | 2548 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 116 | drivers/char/keyboard.c | static struct tty_struct * tty = NULL; |
tty | 382 | drivers/char/keyboard.c | tty = ttytab[fg_console]; |
tty | 531 | drivers/char/keyboard.c | (vc_kbd_mode(kbd,VC_REPEAT) && tty && |
tty | 532 | drivers/char/keyboard.c | (L_ECHO(tty) || (tty->driver.chars_in_buffer(tty) == 0)))) { |
tty | 583 | drivers/char/keyboard.c | if (tty) { |
tty | 584 | drivers/char/keyboard.c | tty_insert_flip_char(tty, ch, 0); |
tty | 585 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 592 | drivers/char/keyboard.c | if (!tty) |
tty | 596 | drivers/char/keyboard.c | tty_insert_flip_char(tty, *cp, 0); |
tty | 599 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 640 | drivers/char/keyboard.c | if (rep || !tty) |
tty | 648 | drivers/char/keyboard.c | if (tty->stopped) |
tty | 649 | drivers/char/keyboard.c | start_tty(tty); |
tty | 651 | drivers/char/keyboard.c | stop_tty(tty); |
tty | 708 | drivers/char/keyboard.c | if (!tty) |
tty | 710 | drivers/char/keyboard.c | tty_insert_flip_char(tty, 0, TTY_BREAK); |
tty | 711 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 745 | 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 | 299 | drivers/char/serial.c | static void rs_stop(struct tty_struct *tty) |
tty | 301 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 304 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_stop")) |
tty | 315 | drivers/char/serial.c | static void rs_start(struct tty_struct *tty) |
tty | 317 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 320 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_start")) |
tty | 378 | drivers/char/serial.c | struct tty_struct *tty = info->tty; |
tty | 389 | drivers/char/serial.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE) |
tty | 391 | drivers/char/serial.c | tty->flip.count++; |
tty | 394 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 396 | drivers/char/serial.c | do_SAK(tty); |
tty | 398 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_PARITY; |
tty | 400 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_FRAME; |
tty | 402 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; |
tty | 404 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 405 | drivers/char/serial.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 409 | drivers/char/serial.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 426 | drivers/char/serial.c | if ((info->xmit_cnt <= 0) || info->tty->stopped || |
tty | 427 | drivers/char/serial.c | info->tty->hw_stopped) { |
tty | 492 | drivers/char/serial.c | if (info->tty->hw_stopped) { |
tty | 497 | drivers/char/serial.c | info->tty->hw_stopped = 0; |
tty | 508 | drivers/char/serial.c | info->tty->hw_stopped = 1; |
tty | 541 | drivers/char/serial.c | if (!info->tty || |
tty | 598 | drivers/char/serial.c | if (!info || !info->tty) |
tty | 659 | drivers/char/serial.c | if (!info->tty || |
tty | 736 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 738 | drivers/char/serial.c | tty = info->tty; |
tty | 739 | drivers/char/serial.c | if (!tty) |
tty | 743 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 744 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 745 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 746 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 762 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 764 | drivers/char/serial.c | tty = info->tty; |
tty | 765 | drivers/char/serial.c | if (!tty) |
tty | 768 | drivers/char/serial.c | tty_hangup(tty); |
tty | 908 | drivers/char/serial.c | if (info->tty) |
tty | 909 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 946 | drivers/char/serial.c | if (info->tty) |
tty | 947 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 972 | drivers/char/serial.c | if (info->tty) |
tty | 974 | drivers/char/serial.c | &info->tty->flags); |
tty | 1029 | drivers/char/serial.c | if (info->tty) |
tty | 1030 | drivers/char/serial.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1118 | drivers/char/serial.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1129 | drivers/char/serial.c | if (info->tty) |
tty | 1130 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1147 | drivers/char/serial.c | if (!info->tty || !info->tty->termios) |
tty | 1149 | drivers/char/serial.c | cflag = info->tty->termios->c_cflag; |
tty | 1156 | drivers/char/serial.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1249 | drivers/char/serial.c | if (I_INPCK(info->tty)) |
tty | 1251 | drivers/char/serial.c | if (I_BRKINT(info->tty) || I_PARMRK(info->tty)) |
tty | 1255 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1259 | drivers/char/serial.c | if (I_IGNBRK(info->tty)) { |
tty | 1266 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1281 | drivers/char/serial.c | static void rs_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1283 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1286 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_put_char")) |
tty | 1289 | drivers/char/serial.c | if (!tty || !info->xmit_buf) |
tty | 1304 | drivers/char/serial.c | static void rs_flush_chars(struct tty_struct *tty) |
tty | 1306 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1309 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_chars")) |
tty | 1312 | drivers/char/serial.c | if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || |
tty | 1322 | drivers/char/serial.c | static int rs_write(struct tty_struct * tty, int from_user, |
tty | 1326 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1329 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write")) |
tty | 1332 | drivers/char/serial.c | if (!tty || !info->xmit_buf || !tmp_buf) |
tty | 1361 | drivers/char/serial.c | if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped && |
tty | 1370 | drivers/char/serial.c | static int rs_write_room(struct tty_struct *tty) |
tty | 1372 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1375 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write_room")) |
tty | 1383 | drivers/char/serial.c | static int rs_chars_in_buffer(struct tty_struct *tty) |
tty | 1385 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1387 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer")) |
tty | 1392 | drivers/char/serial.c | static void rs_flush_buffer(struct tty_struct *tty) |
tty | 1394 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1396 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_buffer")) |
tty | 1401 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 1402 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 1403 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 1404 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1415 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty) |
tty | 1417 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1421 | drivers/char/serial.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1422 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1425 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_throttle")) |
tty | 1428 | drivers/char/serial.c | if (I_IXOFF(tty)) |
tty | 1429 | drivers/char/serial.c | info->x_char = STOP_CHAR(tty); |
tty | 1438 | drivers/char/serial.c | static void rs_unthrottle(struct tty_struct * tty) |
tty | 1440 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1444 | drivers/char/serial.c | printk("unthrottle %s: %d....\n", _tty_name(tty, buf), |
tty | 1445 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1448 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_unthrottle")) |
tty | 1451 | drivers/char/serial.c | if (I_IXOFF(tty)) { |
tty | 1455 | drivers/char/serial.c | info->x_char = START_CHAR(tty); |
tty | 1870 | drivers/char/serial.c | static int rs_ioctl(struct tty_struct *tty, struct file * file, |
tty | 1874 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 1879 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_ioctl")) |
tty | 1886 | drivers/char/serial.c | if (tty->flags & (1 << TTY_IO_ERROR)) |
tty | 1892 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1895 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1900 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1903 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1910 | drivers/char/serial.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 1915 | drivers/char/serial.c | tty->termios->c_cflag = |
tty | 1916 | drivers/char/serial.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 2040 | drivers/char/serial.c | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 2042 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 2044 | drivers/char/serial.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2050 | drivers/char/serial.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 2051 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 2052 | drivers/char/serial.c | rs_start(tty); |
tty | 2063 | drivers/char/serial.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 2078 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
tty | 2080 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2084 | drivers/char/serial.c | if (!info || serial_paranoia_check(info, tty->device, "rs_close")) |
tty | 2097 | drivers/char/serial.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2124 | drivers/char/serial.c | info->normal_termios = *tty->termios; |
tty | 2126 | drivers/char/serial.c | info->callout_termios = *tty->termios; |
tty | 2131 | drivers/char/serial.c | tty->closing = 1; |
tty | 2133 | drivers/char/serial.c | tty_wait_until_sent(tty, info->closing_wait); |
tty | 2159 | drivers/char/serial.c | if (tty->driver.flush_buffer) |
tty | 2160 | drivers/char/serial.c | tty->driver.flush_buffer(tty); |
tty | 2161 | drivers/char/serial.c | if (tty->ldisc.flush_buffer) |
tty | 2162 | drivers/char/serial.c | tty->ldisc.flush_buffer(tty); |
tty | 2163 | drivers/char/serial.c | tty->closing = 0; |
tty | 2165 | drivers/char/serial.c | info->tty = 0; |
tty | 2166 | drivers/char/serial.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 2167 | drivers/char/serial.c | if (tty->ldisc.close) |
tty | 2168 | drivers/char/serial.c | (tty->ldisc.close)(tty); |
tty | 2169 | drivers/char/serial.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 2170 | drivers/char/serial.c | tty->termios->c_line = N_TTY; |
tty | 2171 | drivers/char/serial.c | if (tty->ldisc.open) |
tty | 2172 | drivers/char/serial.c | (tty->ldisc.open)(tty); |
tty | 2191 | drivers/char/serial.c | void rs_hangup(struct tty_struct *tty) |
tty | 2193 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2195 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_hangup")) |
tty | 2198 | drivers/char/serial.c | rs_flush_buffer(tty); |
tty | 2203 | drivers/char/serial.c | info->tty = 0; |
tty | 2212 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2241 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2261 | drivers/char/serial.c | (tty->flags & (1 << TTY_IO_ERROR))) { |
tty | 2272 | drivers/char/serial.c | if (tty->termios->c_cflag & CLOCAL) |
tty | 2350 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
tty | 2356 | drivers/char/serial.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2360 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_open")) |
tty | 2364 | drivers/char/serial.c | printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, |
tty | 2368 | drivers/char/serial.c | tty->driver_data = info; |
tty | 2369 | drivers/char/serial.c | info->tty = tty; |
tty | 2388 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
tty | 2398 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2399 | drivers/char/serial.c | *tty->termios = info->normal_termios; |
tty | 2401 | drivers/char/serial.c | *tty->termios = info->callout_termios; |
tty | 2739 | drivers/char/serial.c | info->tty = 0; |
tty | 2862 | drivers/char/serial.c | if (info->tty) |
tty | 2863 | drivers/char/serial.c | tty_hangup(info->tty); |
tty | 240 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 455 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp); |
tty | 456 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp); |
tty | 457 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 458 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 459 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty); |
tty | 460 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty); |
tty | 461 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty); |
tty | 462 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 463 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old); |
tty | 464 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty); |
tty | 465 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty); |
tty | 466 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty); |
tty | 467 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty); |
tty | 468 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty); |
tty | 469 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty); |
tty | 568 | drivers/char/stallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 569 | drivers/char/stallion.c | stl_hangup(portp->tty); |
tty | 617 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp) |
tty | 625 | drivers/char/stallion.c | printk("stl_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 628 | drivers/char/stallion.c | minordev = MINOR(tty->device); |
tty | 656 | drivers/char/stallion.c | portp->tty = tty; |
tty | 657 | drivers/char/stallion.c | tty->driver_data = portp; |
tty | 668 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 673 | drivers/char/stallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 695 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 719 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 720 | drivers/char/stallion.c | *tty->termios = portp->normaltermios; |
tty | 722 | drivers/char/stallion.c | *tty->termios = portp->callouttermios; |
tty | 723 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 767 | drivers/char/stallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 788 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp) |
tty | 794 | drivers/char/stallion.c | printk("stl_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 797 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 816 | drivers/char/stallion.c | portp->normaltermios = *tty->termios; |
tty | 818 | drivers/char/stallion.c | portp->callouttermios = *tty->termios; |
tty | 825 | drivers/char/stallion.c | tty->closing = 1; |
tty | 828 | drivers/char/stallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 833 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 836 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 844 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 845 | drivers/char/stallion.c | if (tty->ldisc.flush_buffer) |
tty | 846 | drivers/char/stallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 848 | drivers/char/stallion.c | tty->closing = 0; |
tty | 849 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 850 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 890 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 899 | 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 | 902 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (stl_tmpwritebuf == (char *) NULL)) |
tty | 904 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 967 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 974 | drivers/char/stallion.c | printk("stl_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 977 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 979 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1007 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty) |
tty | 1012 | drivers/char/stallion.c | printk("stl_flushchars(tty=%x)\n", (int) tty); |
tty | 1015 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1017 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1024 | drivers/char/stallion.c | if (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail)) |
tty | 1032 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty) |
tty | 1038 | drivers/char/stallion.c | printk("stl_writeroom(tty=%x)\n", (int) tty); |
tty | 1041 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1043 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1065 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty) |
tty | 1072 | drivers/char/stallion.c | printk("stl_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1075 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1077 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1154 | drivers/char/stallion.c | stl_setport(portp, portp->tty->termios); |
tty | 1160 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1166 | drivers/char/stallion.c | printk("stl_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1169 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1171 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1179 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1180 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1186 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1187 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1193 | drivers/char/stallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1198 | drivers/char/stallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1250 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1256 | drivers/char/stallion.c | printk("stl_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1259 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1261 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1265 | drivers/char/stallion.c | tiosp = tty->termios; |
tty | 1272 | drivers/char/stallion.c | tty->hw_stopped = 0; |
tty | 1273 | drivers/char/stallion.c | stl_start(tty); |
tty | 1286 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty) |
tty | 1292 | drivers/char/stallion.c | printk("stl_throttle(tty=%x)\n", (int) tty); |
tty | 1295 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1297 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1305 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1310 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1324 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty) |
tty | 1330 | drivers/char/stallion.c | printk("stl_unthrottle(tty=%x)\n", (int) tty); |
tty | 1333 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1335 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1343 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1354 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1369 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty) |
tty | 1374 | drivers/char/stallion.c | printk("stl_stop(tty=%x)\n", (int) tty); |
tty | 1377 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1379 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1392 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty) |
tty | 1397 | drivers/char/stallion.c | printk("stl_start(tty=%x)\n", (int) tty); |
tty | 1400 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1402 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1417 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty) |
tty | 1422 | drivers/char/stallion.c | printk("stl_hangup(tty=%x)\n", (int) tty); |
tty | 1425 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1427 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1433 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 1436 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 1438 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1445 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 1446 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1454 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty) |
tty | 1460 | drivers/char/stallion.c | printk("stl_flushbuffer(tty=%x)\n", (int) tty); |
tty | 1463 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1465 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1480 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1481 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1482 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1625 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1641 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1646 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (tty->flip.char_buf_ptr == (char *) NULL) || |
tty | 1647 | drivers/char/stallion.c | ((buflen = TTY_FLIPBUF_SIZE - tty->flip.count) == 0)) { |
tty | 1654 | drivers/char/stallion.c | insb((ioaddr + EREG_DATA), tty->flip.char_buf_ptr, len); |
tty | 1655 | drivers/char/stallion.c | memset(tty->flip.flag_buf_ptr, 0, len); |
tty | 1656 | drivers/char/stallion.c | tty->flip.flag_buf_ptr += len; |
tty | 1657 | drivers/char/stallion.c | tty->flip.char_buf_ptr += len; |
tty | 1658 | drivers/char/stallion.c | tty->flip.count += len; |
tty | 1659 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1666 | drivers/char/stallion.c | if ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) { |
tty | 1672 | drivers/char/stallion.c | do_SAK(tty); |
tty | 1686 | drivers/char/stallion.c | if (tty->flip.char_buf_ptr != (char *) NULL) { |
tty | 1687 | drivers/char/stallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 1688 | drivers/char/stallion.c | *tty->flip.flag_buf_ptr++ = status; |
tty | 1689 | drivers/char/stallion.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 1690 | drivers/char/stallion.c | tty->flip.count++; |
tty | 1692 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1891 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1901 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1902 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1906 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1907 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1908 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1919 | drivers/char/stallion.c | tty_hangup(tty); |
tty | 111 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty); |
tty | 134 | drivers/char/tty_io.c | char *_tty_name(struct tty_struct *tty, char *buf) |
tty | 136 | drivers/char/tty_io.c | if (tty) |
tty | 137 | drivers/char/tty_io.c | sprintf(buf, "%s%d", tty->driver.name, |
tty | 138 | drivers/char/tty_io.c | MINOR(tty->device) - tty->driver.minor_start + |
tty | 139 | drivers/char/tty_io.c | tty->driver.name_base); |
tty | 145 | drivers/char/tty_io.c | char *tty_name(struct tty_struct *tty) |
tty | 149 | drivers/char/tty_io.c | return(_tty_name(tty, buf)); |
tty | 152 | drivers/char/tty_io.c | inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device, |
tty | 161 | drivers/char/tty_io.c | if (!tty) { |
tty | 165 | drivers/char/tty_io.c | if (tty->magic != TTY_MAGIC) { |
tty | 173 | drivers/char/tty_io.c | static int check_tty_count(struct tty_struct *tty, const char *routine) |
tty | 182 | drivers/char/tty_io.c | if (f->private_data == tty) { |
tty | 186 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 187 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_SLAVE && |
tty | 188 | drivers/char/tty_io.c | tty->link && tty->link->count) |
tty | 190 | drivers/char/tty_io.c | if (tty->count != count) { |
tty | 192 | drivers/char/tty_io.c | kdevname(tty->device), tty->count, count, routine); |
tty | 215 | drivers/char/tty_io.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc) |
tty | 233 | drivers/char/tty_io.c | if (tty->ldisc.num == ldisc) |
tty | 235 | drivers/char/tty_io.c | o_ldisc = tty->ldisc; |
tty | 237 | drivers/char/tty_io.c | tty_wait_until_sent(tty, 0); |
tty | 240 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 241 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 244 | drivers/char/tty_io.c | tty->ldisc = ldiscs[ldisc]; |
tty | 245 | drivers/char/tty_io.c | tty->termios->c_line = ldisc; |
tty | 246 | drivers/char/tty_io.c | if (tty->ldisc.open) |
tty | 247 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 249 | drivers/char/tty_io.c | tty->ldisc = o_ldisc; |
tty | 250 | drivers/char/tty_io.c | tty->termios->c_line = tty->ldisc.num; |
tty | 251 | drivers/char/tty_io.c | if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) { |
tty | 252 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 253 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 254 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 255 | drivers/char/tty_io.c | int r = tty->ldisc.open(tty); |
tty | 260 | drivers/char/tty_io.c | tty_name(tty), r); |
tty | 264 | drivers/char/tty_io.c | if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc) |
tty | 265 | drivers/char/tty_io.c | tty->driver.set_ldisc(tty); |
tty | 297 | drivers/char/tty_io.c | int tty_check_change(struct tty_struct * tty) |
tty | 299 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 301 | drivers/char/tty_io.c | if (tty->pgrp <= 0) { |
tty | 305 | drivers/char/tty_io.c | if (current->pgrp == tty->pgrp) |
tty | 369 | drivers/char/tty_io.c | void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) |
tty | 375 | drivers/char/tty_io.c | if (!tty) |
tty | 377 | drivers/char/tty_io.c | check_tty_count(tty, "do_tty_hangup"); |
tty | 381 | drivers/char/tty_io.c | if (filp->private_data != tty) |
tty | 392 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 393 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 394 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 395 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 396 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 397 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 398 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 399 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 400 | drivers/char/tty_io.c | wake_up_interruptible(&tty->read_wait); |
tty | 406 | drivers/char/tty_io.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 407 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 408 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 409 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 410 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 411 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 412 | drivers/char/tty_io.c | i = (tty->ldisc.open)(tty); |
tty | 420 | drivers/char/tty_io.c | if ((tty->session > 0) && (p->session == tty->session) && |
tty | 424 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 425 | drivers/char/tty_io.c | p->tty_old_pgrp = tty->pgrp; |
tty | 427 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 428 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 430 | drivers/char/tty_io.c | tty->flags = 0; |
tty | 431 | drivers/char/tty_io.c | tty->session = 0; |
tty | 432 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 433 | drivers/char/tty_io.c | tty->ctrl_status = 0; |
tty | 434 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) |
tty | 435 | drivers/char/tty_io.c | *tty->termios = tty->driver.init_termios; |
tty | 436 | drivers/char/tty_io.c | if (tty->driver.hangup) |
tty | 437 | drivers/char/tty_io.c | (tty->driver.hangup)(tty); |
tty | 440 | drivers/char/tty_io.c | void tty_hangup(struct tty_struct * tty) |
tty | 443 | drivers/char/tty_io.c | printk("%s hangup...\n", tty_name(tty)); |
tty | 445 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 448 | drivers/char/tty_io.c | void tty_vhangup(struct tty_struct * tty) |
tty | 451 | drivers/char/tty_io.c | printk("%s vhangup...\n", tty_name(tty)); |
tty | 453 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 476 | drivers/char/tty_io.c | struct tty_struct *tty = current->tty; |
tty | 479 | drivers/char/tty_io.c | if (tty) { |
tty | 481 | drivers/char/tty_io.c | tty_vhangup(tty); |
tty | 489 | drivers/char/tty_io.c | if (tty->pgrp > 0) { |
tty | 490 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGHUP, on_exit); |
tty | 491 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGCONT, on_exit); |
tty | 495 | drivers/char/tty_io.c | tty->session = 0; |
tty | 496 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 500 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 686 | drivers/char/tty_io.c | void stop_tty(struct tty_struct *tty) |
tty | 688 | drivers/char/tty_io.c | if (tty->stopped) |
tty | 690 | drivers/char/tty_io.c | tty->stopped = 1; |
tty | 691 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 692 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_START; |
tty | 693 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_STOP; |
tty | 694 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 696 | drivers/char/tty_io.c | if (tty->driver.stop) |
tty | 697 | drivers/char/tty_io.c | (tty->driver.stop)(tty); |
tty | 700 | drivers/char/tty_io.c | void start_tty(struct tty_struct *tty) |
tty | 702 | drivers/char/tty_io.c | if (!tty->stopped) |
tty | 704 | drivers/char/tty_io.c | tty->stopped = 0; |
tty | 705 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 706 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_STOP; |
tty | 707 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_START; |
tty | 708 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 710 | drivers/char/tty_io.c | if (tty->driver.start) |
tty | 711 | drivers/char/tty_io.c | (tty->driver.start)(tty); |
tty | 712 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 713 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 714 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 715 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 721 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 723 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 724 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) |
tty | 726 | drivers/char/tty_io.c | if (!tty || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 735 | drivers/char/tty_io.c | (tty->pgrp > 0) && |
tty | 736 | drivers/char/tty_io.c | (current->tty == tty) && |
tty | 737 | drivers/char/tty_io.c | (tty->pgrp != current->pgrp)) |
tty | 745 | drivers/char/tty_io.c | if (tty->ldisc.read) |
tty | 747 | drivers/char/tty_io.c | i = (tty->ldisc.read)(tty,file,(unsigned char *)buf,(unsigned int)count); |
tty | 758 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 763 | drivers/char/tty_io.c | tty = redirect; |
tty | 765 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 766 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) |
tty | 768 | drivers/char/tty_io.c | if (!tty || !tty->driver.write || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 771 | drivers/char/tty_io.c | if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) && |
tty | 772 | drivers/char/tty_io.c | (current->tty == tty) && (tty->pgrp != current->pgrp)) { |
tty | 781 | drivers/char/tty_io.c | if (tty->ldisc.write) |
tty | 783 | drivers/char/tty_io.c | i = (tty->ldisc.write)(tty,file,(const unsigned char *)buf,(unsigned int)count); |
tty | 798 | drivers/char/tty_io.c | struct tty_struct *tty, **tty_loc, *o_tty, **o_tty_loc; |
tty | 810 | drivers/char/tty_io.c | tty = o_tty = NULL; |
tty | 827 | drivers/char/tty_io.c | if (!*tty_loc && !tty) { |
tty | 828 | drivers/char/tty_io.c | if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL))) |
tty | 830 | drivers/char/tty_io.c | initialize_tty_struct(tty); |
tty | 831 | drivers/char/tty_io.c | tty->device = device; |
tty | 832 | drivers/char/tty_io.c | tty->driver = *driver; |
tty | 898 | drivers/char/tty_io.c | tty->termios = *tp_loc; |
tty | 899 | drivers/char/tty_io.c | tty->termios_locked = *ltp_loc; |
tty | 900 | drivers/char/tty_io.c | *tty_loc = tty; |
tty | 903 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 904 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 907 | drivers/char/tty_io.c | tty = NULL; |
tty | 911 | drivers/char/tty_io.c | tty = NULL; |
tty | 954 | drivers/char/tty_io.c | if (tty) |
tty | 955 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 976 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 981 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 982 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev")) |
tty | 985 | drivers/char/tty_io.c | check_tty_count(tty, "release_dev"); |
tty | 989 | drivers/char/tty_io.c | tp = tty->termios; |
tty | 990 | drivers/char/tty_io.c | ltp = tty->termios_locked; |
tty | 992 | drivers/char/tty_io.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 994 | drivers/char/tty_io.c | if (idx < 0 || idx >= tty->driver.num) { |
tty | 996 | drivers/char/tty_io.c | kdevname(tty->device)); |
tty | 999 | drivers/char/tty_io.c | if (tty != tty->driver.table[idx]) { |
tty | 1001 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1004 | drivers/char/tty_io.c | if (tp != tty->driver.termios[idx]) { |
tty | 1007 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1010 | drivers/char/tty_io.c | if (ltp != tty->driver.termios_locked[idx]) { |
tty | 1013 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1019 | drivers/char/tty_io.c | printk("release_dev of %s (tty count=%d)...", tty_name(tty), |
tty | 1020 | drivers/char/tty_io.c | tty->count); |
tty | 1023 | drivers/char/tty_io.c | o_tty = tty->link; |
tty | 1028 | drivers/char/tty_io.c | if (tty->driver.other) { |
tty | 1029 | drivers/char/tty_io.c | if (o_tty != tty->driver.other->table[idx]) { |
tty | 1032 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1035 | drivers/char/tty_io.c | if (o_tp != tty->driver.other->termios[idx]) { |
tty | 1038 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1041 | drivers/char/tty_io.c | if (o_ltp != tty->driver.other->termios_locked[idx]) { |
tty | 1044 | drivers/char/tty_io.c | idx, kdevname(tty->device)); |
tty | 1048 | drivers/char/tty_io.c | if (o_tty->link != tty) { |
tty | 1055 | drivers/char/tty_io.c | if (tty->driver.close) |
tty | 1056 | drivers/char/tty_io.c | tty->driver.close(tty, filp); |
tty | 1057 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1058 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 1059 | drivers/char/tty_io.c | if (--tty->link->count < 0) { |
tty | 1061 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1062 | drivers/char/tty_io.c | tty->link->count = 0; |
tty | 1065 | drivers/char/tty_io.c | if (--tty->count < 0) { |
tty | 1067 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1068 | drivers/char/tty_io.c | tty->count = 0; |
tty | 1070 | drivers/char/tty_io.c | if (tty->count) |
tty | 1079 | drivers/char/tty_io.c | tty->driver.other->table[idx] = NULL; |
tty | 1080 | drivers/char/tty_io.c | tty->driver.other->termios[idx] = NULL; |
tty | 1087 | drivers/char/tty_io.c | tty->flags |= (1 << TTY_CLOSING); |
tty | 1096 | drivers/char/tty_io.c | if ((*p)->tty == tty) |
tty | 1097 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1098 | drivers/char/tty_io.c | if (o_tty && (*p)->tty == o_tty) |
tty | 1099 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1106 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 1107 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 1108 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1109 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 1116 | drivers/char/tty_io.c | tty->driver.table[idx] = NULL; |
tty | 1117 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) { |
tty | 1118 | drivers/char/tty_io.c | tty->driver.termios[idx] = NULL; |
tty | 1121 | drivers/char/tty_io.c | if (tty == redirect || o_tty == redirect) |
tty | 1128 | drivers/char/tty_io.c | if (tty->flip.tqueue.sync) { |
tty | 1132 | drivers/char/tty_io.c | if (tq == &tty->flip.tqueue) { |
tty | 1142 | drivers/char/tty_io.c | tty->magic = 0; |
tty | 1143 | drivers/char/tty_io.c | (*tty->driver.refcount)--; |
tty | 1144 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1167 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 1176 | drivers/char/tty_io.c | if (!current->tty) |
tty | 1178 | drivers/char/tty_io.c | device = current->tty->device; |
tty | 1187 | drivers/char/tty_io.c | retval = init_dev(device, &tty); |
tty | 1190 | drivers/char/tty_io.c | filp->private_data = tty; |
tty | 1191 | drivers/char/tty_io.c | check_tty_count(tty, "tty_open"); |
tty | 1192 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1193 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1196 | drivers/char/tty_io.c | printk("opening %s...", tty_name(tty)); |
tty | 1198 | drivers/char/tty_io.c | if (tty->driver.open) |
tty | 1199 | drivers/char/tty_io.c | retval = tty->driver.open(tty, filp); |
tty | 1203 | drivers/char/tty_io.c | if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser()) |
tty | 1208 | drivers/char/tty_io.c | printk("error %d in opening %s...", retval, tty_name(tty)); |
tty | 1225 | drivers/char/tty_io.c | !current->tty && |
tty | 1226 | drivers/char/tty_io.c | tty->session == 0) { |
tty | 1227 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1229 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1230 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1247 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1249 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1250 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_select")) |
tty | 1253 | drivers/char/tty_io.c | if (tty->ldisc.select) |
tty | 1254 | drivers/char/tty_io.c | return (tty->ldisc.select)(tty, inode, filp, sel_type, wait); |
tty | 1300 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1303 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1304 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync")) |
tty | 1307 | drivers/char/tty_io.c | retval = fasync_helper(inode, filp, on, &tty->fasync); |
tty | 1312 | drivers/char/tty_io.c | if (!tty->read_wait) |
tty | 1313 | drivers/char/tty_io.c | tty->minimum_to_wake = 1; |
tty | 1315 | drivers/char/tty_io.c | if (tty->pgrp) |
tty | 1316 | drivers/char/tty_io.c | filp->f_owner = -tty->pgrp; |
tty | 1321 | drivers/char/tty_io.c | if (!tty->fasync && !tty->read_wait) |
tty | 1322 | drivers/char/tty_io.c | tty->minimum_to_wake = N_TTY_BUF_SIZE; |
tty | 1365 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1372 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 1373 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) |
tty | 1376 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1377 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1378 | drivers/char/tty_io.c | real_tty = tty->link; |
tty | 1380 | drivers/char/tty_io.c | real_tty = tty; |
tty | 1384 | drivers/char/tty_io.c | if ((current->tty != tty) && !suser()) |
tty | 1390 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, &ch, &mbz, 1); |
tty | 1397 | drivers/char/tty_io.c | memcpy_tofs((struct winsize *) arg, &tty->winsize, |
tty | 1407 | drivers/char/tty_io.c | if (memcmp(&tmp_ws, &tty->winsize, |
tty | 1409 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 1410 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGWINCH, 1); |
tty | 1411 | drivers/char/tty_io.c | if ((real_tty->pgrp != tty->pgrp) && |
tty | 1415 | drivers/char/tty_io.c | tty->winsize = tmp_ws; |
tty | 1419 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) { |
tty | 1440 | drivers/char/tty_io.c | set_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1443 | drivers/char/tty_io.c | clear_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1446 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 1450 | drivers/char/tty_io.c | current->tty = NULL; |
tty | 1454 | drivers/char/tty_io.c | (current->session == tty->session)) |
tty | 1460 | drivers/char/tty_io.c | if (!current->leader || current->tty) |
tty | 1462 | drivers/char/tty_io.c | if (tty->session > 0) { |
tty | 1474 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 1475 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 1479 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1481 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1482 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1489 | drivers/char/tty_io.c | if (tty == real_tty && current->tty != real_tty) |
tty | 1501 | drivers/char/tty_io.c | if (!current->tty || |
tty | 1502 | drivers/char/tty_io.c | (current->tty != real_tty) || |
tty | 1517 | drivers/char/tty_io.c | put_user(tty->ldisc.num, (int *) arg); |
tty | 1520 | drivers/char/tty_io.c | retval = tty_check_change(tty); |
tty | 1524 | drivers/char/tty_io.c | return tty_set_ldisc(tty, arg); |
tty | 1526 | drivers/char/tty_io.c | if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE) |
tty | 1528 | drivers/char/tty_io.c | if (current->tty != tty && !suser()) |
tty | 1546 | drivers/char/tty_io.c | return set_selection(arg, tty); |
tty | 1548 | drivers/char/tty_io.c | return paste_selection(tty); |
tty | 1590 | drivers/char/tty_io.c | tty, sizeof(struct tty_struct)); |
tty | 1593 | drivers/char/tty_io.c | if (tty->driver.ioctl) { |
tty | 1594 | drivers/char/tty_io.c | retval = (tty->driver.ioctl)(tty, file, |
tty | 1599 | drivers/char/tty_io.c | if (tty->ldisc.ioctl) { |
tty | 1600 | drivers/char/tty_io.c | retval = (tty->ldisc.ioctl)(tty, file, |
tty | 1622 | drivers/char/tty_io.c | void do_SAK( struct tty_struct *tty) |
tty | 1625 | drivers/char/tty_io.c | tty_hangup(tty); |
tty | 1632 | drivers/char/tty_io.c | if (!tty) |
tty | 1634 | drivers/char/tty_io.c | session = tty->session; |
tty | 1635 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 1636 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 1637 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 1638 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 1642 | drivers/char/tty_io.c | if (((*p)->tty == tty) || |
tty | 1649 | drivers/char/tty_io.c | (filp->private_data == tty)) { |
tty | 1665 | drivers/char/tty_io.c | struct tty_struct *tty = (struct tty_struct *) private_; |
tty | 1670 | drivers/char/tty_io.c | if (tty->flip.buf_num) { |
tty | 1671 | drivers/char/tty_io.c | cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1672 | drivers/char/tty_io.c | fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1673 | drivers/char/tty_io.c | tty->flip.buf_num = 0; |
tty | 1676 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1677 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1679 | drivers/char/tty_io.c | cp = tty->flip.char_buf; |
tty | 1680 | drivers/char/tty_io.c | fp = tty->flip.flag_buf; |
tty | 1681 | drivers/char/tty_io.c | tty->flip.buf_num = 1; |
tty | 1684 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1685 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1687 | drivers/char/tty_io.c | count = tty->flip.count; |
tty | 1688 | drivers/char/tty_io.c | tty->flip.count = 0; |
tty | 1692 | drivers/char/tty_io.c | if (count > tty->max_flip_cnt) |
tty | 1693 | drivers/char/tty_io.c | tty->max_flip_cnt = count; |
tty | 1695 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, cp, fp, count); |
tty | 1701 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty) |
tty | 1703 | drivers/char/tty_io.c | memset(tty, 0, sizeof(struct tty_struct)); |
tty | 1704 | drivers/char/tty_io.c | tty->magic = TTY_MAGIC; |
tty | 1705 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1706 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 1707 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1708 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1709 | drivers/char/tty_io.c | tty->flip.tqueue.routine = flush_to_ldisc; |
tty | 1710 | drivers/char/tty_io.c | tty->flip.tqueue.data = tty; |
tty | 1716 | drivers/char/tty_io.c | void tty_default_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1718 | 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 | 125 | drivers/char/vt.c | if ( p->tty && MAJOR(p->tty->device) == TTY_MAJOR && |
tty | 126 | drivers/char/vt.c | MINOR(p->tty->device) <= MAX_NR_CONSOLES && MINOR(p->tty->device) ) |
tty | 196 | drivers/char/vt.c | int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 203 | drivers/char/vt.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 215 | drivers/char/vt.c | if (current->tty == tty || suser()) |
tty | 342 | drivers/char/vt.c | if (tty->ldisc.flush_buffer) |
tty | 343 | drivers/char/vt.c | tty->ldisc.flush_buffer(tty); |
tty | 57 | drivers/isdn/isdn_tty.c | struct tty_struct *tty; |
tty | 62 | drivers/isdn/isdn_tty.c | if ((tty = dev->mdm.info[i].tty)) { |
tty | 64 | drivers/isdn/isdn_tty.c | c = TTY_FLIPBUF_SIZE - tty->flip.count - 1; |
tty | 67 | drivers/isdn/isdn_tty.c | memcpy(tty->flip.char_buf_ptr, buf, len); |
tty | 68 | drivers/isdn/isdn_tty.c | tty->flip.count += len; |
tty | 69 | drivers/isdn/isdn_tty.c | memset(tty->flip.flag_buf_ptr, 0, len); |
tty | 71 | drivers/isdn/isdn_tty.c | tty->flip.flag_buf_ptr[len - 1] = 0xff; |
tty | 72 | drivers/isdn/isdn_tty.c | tty->flip.flag_buf_ptr += len; |
tty | 73 | drivers/isdn/isdn_tty.c | tty->flip.char_buf_ptr += len; |
tty | 75 | drivers/isdn/isdn_tty.c | tty_insert_flip_char(tty, buf[0], 0); |
tty | 76 | drivers/isdn/isdn_tty.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 93 | drivers/isdn/isdn_tty.c | struct tty_struct *tty; |
tty | 103 | drivers/isdn/isdn_tty.c | if ((tty = info->tty)) { |
tty | 105 | drivers/isdn/isdn_tty.c | c = TTY_FLIPBUF_SIZE - tty->flip.count - 1; |
tty | 108 | drivers/isdn/isdn_tty.c | tty->flip.char_buf_ptr, |
tty | 109 | drivers/isdn/isdn_tty.c | tty->flip.flag_buf_ptr, c, 0); |
tty | 111 | drivers/isdn/isdn_tty.c | memset(tty->flip.flag_buf_ptr, 0, r); |
tty | 112 | drivers/isdn/isdn_tty.c | tty->flip.count += r; |
tty | 113 | drivers/isdn/isdn_tty.c | tty->flip.flag_buf_ptr += r; |
tty | 114 | drivers/isdn/isdn_tty.c | tty->flip.char_buf_ptr += r; |
tty | 116 | drivers/isdn/isdn_tty.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 239 | drivers/isdn/isdn_tty.c | if (!info->tty || !info->tty->termios) |
tty | 241 | drivers/isdn/isdn_tty.c | cflag = info->tty->termios->c_cflag; |
tty | 247 | drivers/isdn/isdn_tty.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 293 | drivers/isdn/isdn_tty.c | if (info->tty) |
tty | 294 | drivers/isdn/isdn_tty.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 307 | drivers/isdn/isdn_tty.c | if (info->tty) |
tty | 308 | drivers/isdn/isdn_tty.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 338 | drivers/isdn/isdn_tty.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 348 | drivers/isdn/isdn_tty.c | if (info->tty) |
tty | 349 | drivers/isdn/isdn_tty.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 355 | drivers/isdn/isdn_tty.c | static int isdn_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int count) |
tty | 358 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 362 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write")) |
tty | 364 | drivers/isdn/isdn_tty.c | if (!tty) |
tty | 425 | drivers/isdn/isdn_tty.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 426 | drivers/isdn/isdn_tty.c | tty->ldisc.write_wakeup) |
tty | 427 | drivers/isdn/isdn_tty.c | (tty->ldisc.write_wakeup) (tty); |
tty | 428 | drivers/isdn/isdn_tty.c | wake_up_interruptible(&tty->write_wait); |
tty | 452 | drivers/isdn/isdn_tty.c | static int isdn_tty_write_room(struct tty_struct *tty) |
tty | 454 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 457 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write_room")) |
tty | 465 | drivers/isdn/isdn_tty.c | static int isdn_tty_chars_in_buffer(struct tty_struct *tty) |
tty | 467 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 469 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_chars_in_buffer")) |
tty | 476 | drivers/isdn/isdn_tty.c | static void isdn_tty_flush_buffer(struct tty_struct *tty) |
tty | 478 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 481 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_flush_buffer")) |
tty | 487 | drivers/isdn/isdn_tty.c | wake_up_interruptible(&tty->write_wait); |
tty | 488 | drivers/isdn/isdn_tty.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 489 | drivers/isdn/isdn_tty.c | tty->ldisc.write_wakeup) |
tty | 490 | drivers/isdn/isdn_tty.c | (tty->ldisc.write_wakeup) (tty); |
tty | 493 | drivers/isdn/isdn_tty.c | static void isdn_tty_flush_chars(struct tty_struct *tty) |
tty | 495 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 497 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_flush_chars")) |
tty | 511 | drivers/isdn/isdn_tty.c | static void isdn_tty_throttle(struct tty_struct *tty) |
tty | 513 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 515 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_throttle")) |
tty | 517 | drivers/isdn/isdn_tty.c | if (I_IXOFF(tty)) |
tty | 518 | drivers/isdn/isdn_tty.c | info->x_char = STOP_CHAR(tty); |
tty | 522 | drivers/isdn/isdn_tty.c | static void isdn_tty_unthrottle(struct tty_struct *tty) |
tty | 524 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 526 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_unthrottle")) |
tty | 528 | drivers/isdn/isdn_tty.c | if (I_IXOFF(tty)) { |
tty | 532 | drivers/isdn/isdn_tty.c | info->x_char = START_CHAR(tty); |
tty | 640 | drivers/isdn/isdn_tty.c | static int isdn_tty_ioctl(struct tty_struct *tty, struct file *file, |
tty | 643 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 647 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_ioctl")) |
tty | 651 | drivers/isdn/isdn_tty.c | retval = tty_check_change(tty); |
tty | 654 | drivers/isdn/isdn_tty.c | tty_wait_until_sent(tty, 0); |
tty | 657 | drivers/isdn/isdn_tty.c | retval = tty_check_change(tty); |
tty | 660 | drivers/isdn/isdn_tty.c | tty_wait_until_sent(tty, 0); |
tty | 666 | drivers/isdn/isdn_tty.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg); |
tty | 670 | drivers/isdn/isdn_tty.c | tty->termios->c_cflag = |
tty | 671 | drivers/isdn/isdn_tty.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 752 | drivers/isdn/isdn_tty.c | static void isdn_tty_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 754 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 756 | drivers/isdn/isdn_tty.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 760 | drivers/isdn/isdn_tty.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 761 | drivers/isdn/isdn_tty.c | tty->hw_stopped = 0; |
tty | 770 | drivers/isdn/isdn_tty.c | static int isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info * info) |
tty | 798 | drivers/isdn/isdn_tty.c | if (tty->driver.subtype == ISDN_SERIAL_TYPE_CALLOUT) { |
tty | 826 | drivers/isdn/isdn_tty.c | if (tty->termios->c_cflag & CLOCAL) |
tty | 900 | drivers/isdn/isdn_tty.c | static int isdn_tty_open(struct tty_struct *tty, struct file *filp) |
tty | 905 | drivers/isdn/isdn_tty.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 909 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_open")) |
tty | 912 | drivers/isdn/isdn_tty.c | printk(KERN_DEBUG "isdn_tty_open %s%d, count = %d\n", tty->driver.name, |
tty | 916 | drivers/isdn/isdn_tty.c | tty->driver_data = info; |
tty | 917 | drivers/isdn/isdn_tty.c | info->tty = tty; |
tty | 928 | drivers/isdn/isdn_tty.c | retval = isdn_tty_block_til_ready(tty, filp, info); |
tty | 936 | drivers/isdn/isdn_tty.c | if (tty->driver.subtype == ISDN_SERIAL_TYPE_NORMAL) |
tty | 937 | drivers/isdn/isdn_tty.c | *tty->termios = info->normal_termios; |
tty | 939 | drivers/isdn/isdn_tty.c | *tty->termios = info->callout_termios; |
tty | 954 | drivers/isdn/isdn_tty.c | static void isdn_tty_close(struct tty_struct *tty, struct file *filp) |
tty | 956 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 960 | drivers/isdn/isdn_tty.c | if (!info || isdn_tty_paranoia_check(info, tty->device, "isdn_tty_close")) |
tty | 972 | drivers/isdn/isdn_tty.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 1002 | drivers/isdn/isdn_tty.c | info->normal_termios = *tty->termios; |
tty | 1004 | drivers/isdn/isdn_tty.c | info->callout_termios = *tty->termios; |
tty | 1006 | drivers/isdn/isdn_tty.c | tty->closing = 1; |
tty | 1015 | drivers/isdn/isdn_tty.c | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ |
tty | 1032 | drivers/isdn/isdn_tty.c | if (tty->driver.flush_buffer) |
tty | 1033 | drivers/isdn/isdn_tty.c | tty->driver.flush_buffer(tty); |
tty | 1034 | drivers/isdn/isdn_tty.c | if (tty->ldisc.flush_buffer) |
tty | 1035 | drivers/isdn/isdn_tty.c | tty->ldisc.flush_buffer(tty); |
tty | 1036 | drivers/isdn/isdn_tty.c | info->tty = 0; |
tty | 1037 | drivers/isdn/isdn_tty.c | tty->closing = 0; |
tty | 1039 | drivers/isdn/isdn_tty.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 1040 | drivers/isdn/isdn_tty.c | if (tty->ldisc.close) |
tty | 1041 | drivers/isdn/isdn_tty.c | (tty->ldisc.close) (tty); |
tty | 1042 | drivers/isdn/isdn_tty.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1043 | drivers/isdn/isdn_tty.c | tty->termios->c_line = N_TTY; |
tty | 1044 | drivers/isdn/isdn_tty.c | if (tty->ldisc.open) |
tty | 1045 | drivers/isdn/isdn_tty.c | (tty->ldisc.open) (tty); |
tty | 1068 | drivers/isdn/isdn_tty.c | static void isdn_tty_hangup(struct tty_struct *tty) |
tty | 1070 | drivers/isdn/isdn_tty.c | modem_info *info = (modem_info *) tty->driver_data; |
tty | 1072 | drivers/isdn/isdn_tty.c | if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_hangup")) |
tty | 1077 | drivers/isdn/isdn_tty.c | info->tty = 0; |
tty | 1186 | drivers/isdn/isdn_tty.c | info->tty = 0; |
tty | 1314 | drivers/isdn/isdn_tty.c | struct tty_struct *tty; |
tty | 1326 | drivers/isdn/isdn_tty.c | tty = info->tty; |
tty | 1341 | drivers/isdn/isdn_tty.c | if ((info->flags & ISDN_ASYNC_CLOSING) || (!tty)) { |
tty | 1345 | drivers/isdn/isdn_tty.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE) |
tty | 1347 | drivers/isdn/isdn_tty.c | tty_insert_flip_char(tty, c, 0); |
tty | 1350 | drivers/isdn/isdn_tty.c | queue_task(&tty->flip.tqueue, &tq_timer); |
tty | 1459 | drivers/isdn/isdn_tty.c | if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { |
tty | 1496 | drivers/isdn/isdn_tty.c | if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { |
tty | 1503 | drivers/isdn/isdn_tty.c | tty_hangup(info->tty); |
tty | 2003 | drivers/isdn/isdn_tty.c | struct tty_struct *tty = info->tty; |
tty | 2030 | drivers/isdn/isdn_tty.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 2031 | drivers/isdn/isdn_tty.c | tty->ldisc.write_wakeup) |
tty | 2032 | drivers/isdn/isdn_tty.c | (tty->ldisc.write_wakeup) (tty); |
tty | 2033 | drivers/isdn/isdn_tty.c | wake_up_interruptible(&tty->write_wait); |
tty | 197 | drivers/net/ppp.c | static int ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
tty | 201 | drivers/net/ppp.c | static int ppp_tty_room (struct tty_struct *tty); |
tty | 202 | drivers/net/ppp.c | static void ppp_tty_receive (struct tty_struct *tty, const __u8 * cp, |
tty | 204 | drivers/net/ppp.c | static void ppp_tty_wakeup (struct tty_struct *tty); |
tty | 215 | drivers/net/ppp.c | #define tty2ppp(tty) ((struct ppp *) (tty->disc_data)) |
tty | 217 | drivers/net/ppp.c | #define ppp2tty(ppp) ((struct tty_struct *) ppp->tty) |
tty | 641 | drivers/net/ppp.c | ppp->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 683 | drivers/net/ppp.c | struct tty_struct *tty; |
tty | 686 | drivers/net/ppp.c | tty = ppp2tty (ppp); |
tty | 695 | drivers/net/ppp.c | if (tty != NULL && tty->disc_data == ppp) |
tty | 696 | drivers/net/ppp.c | tty->disc_data = NULL; /* Break the tty->ppp link */ |
tty | 724 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 734 | drivers/net/ppp.c | ppp_tty_close_local (struct tty_struct *tty, int sc_xfer) |
tty | 736 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 756 | drivers/net/ppp.c | ppp_tty_close (struct tty_struct *tty) |
tty | 758 | drivers/net/ppp.c | ppp_tty_close_local (tty, 0); |
tty | 768 | drivers/net/ppp.c | ppp_tty_open (struct tty_struct *tty) |
tty | 770 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 803 | drivers/net/ppp.c | ppp->tty = tty; |
tty | 804 | drivers/net/ppp.c | tty->disc_data = ppp; |
tty | 808 | drivers/net/ppp.c | if (tty->ldisc.flush_buffer) |
tty | 809 | drivers/net/ppp.c | tty->ldisc.flush_buffer (tty); |
tty | 811 | drivers/net/ppp.c | if (tty->driver.flush_buffer) |
tty | 812 | drivers/net/ppp.c | tty->driver.flush_buffer (tty); |
tty | 866 | drivers/net/ppp.c | ppp_tty_wakeup_code (struct ppp *ppp, struct tty_struct *tty, |
tty | 884 | drivers/net/ppp.c | actual = tty->driver.write (tty, 0, |
tty | 907 | drivers/net/ppp.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 960 | drivers/net/ppp.c | ppp_tty_wakeup (struct tty_struct *tty) |
tty | 963 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 976 | drivers/net/ppp.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 978 | drivers/net/ppp.c | ppp_tty_wakeup_code (ppp, tty, xbuf); |
tty | 1017 | drivers/net/ppp.c | ppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 1041 | drivers/net/ppp.c | ppp_tty_room (struct tty_struct *tty) |
tty | 1051 | drivers/net/ppp.c | ppp_tty_receive (struct tty_struct *tty, const __u8 * data, |
tty | 1054 | drivers/net/ppp.c | register struct ppp *ppp = tty2ppp (tty); |
tty | 1332 | drivers/net/ppp.c | if (ppp->tty->fasync != NULL) |
tty | 1333 | drivers/net/ppp.c | kill_fasync (ppp->tty->fasync, SIGIO); |
tty | 1674 | drivers/net/ppp.c | ppp_tty_read (struct tty_struct *tty, struct file *file, __u8 * buf, |
tty | 1677 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 1706 | drivers/net/ppp.c | ppp = tty2ppp (tty); |
tty | 2060 | drivers/net/ppp.c | ppp_tty_write (struct tty_struct *tty, struct file *file, const __u8 * data, |
tty | 2063 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2106 | drivers/net/ppp.c | ppp = tty2ppp (tty); |
tty | 2224 | drivers/net/ppp.c | ppp_tty_ioctl (struct tty_struct *tty, struct file * file, |
tty | 2227 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2492 | drivers/net/ppp.c | ppp_tty_close_local (tty, current->pid); |
tty | 2544 | drivers/net/ppp.c | error = n_tty_ioctl (tty, file, param2, param3); |
tty | 2582 | drivers/net/ppp.c | ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
tty | 2585 | drivers/net/ppp.c | struct ppp *ppp = tty2ppp (tty); |
tty | 2616 | drivers/net/ppp.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 2852 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 2861 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 2976 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 2981 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 3044 | drivers/net/ppp.c | struct tty_struct *tty = ppp2tty (ppp); |
tty | 3070 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 3225 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 3437 | drivers/net/ppp.c | if (ppp->inuse && ppp->tty != NULL) { |
tty | 147 | drivers/net/slip.c | slp->ctrl.tty = NULL; |
tty | 445 | drivers/net/slip.c | sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 446 | drivers/net/slip.c | actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count); |
tty | 460 | drivers/net/slip.c | static void slip_write_wakeup(struct tty_struct *tty) |
tty | 463 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 473 | drivers/net/slip.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 479 | drivers/net/slip.c | actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft); |
tty | 514 | drivers/net/slip.c | (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ? |
tty | 517 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 579 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 671 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 674 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 684 | drivers/net/slip.c | slip_receive_room(struct tty_struct *tty) |
tty | 696 | drivers/net/slip.c | slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) |
tty | 698 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 741 | drivers/net/slip.c | slip_open(struct tty_struct *tty) |
tty | 743 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 756 | drivers/net/slip.c | sl->tty = tty; |
tty | 757 | drivers/net/slip.c | tty->disc_data = sl; |
tty | 758 | drivers/net/slip.c | if (tty->driver.flush_buffer) { |
tty | 759 | drivers/net/slip.c | tty->driver.flush_buffer(tty); |
tty | 761 | drivers/net/slip.c | if (tty->ldisc.flush_buffer) { |
tty | 762 | drivers/net/slip.c | tty->ldisc.flush_buffer(tty); |
tty | 792 | drivers/net/slip.c | slip_close(struct tty_struct *tty) |
tty | 794 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 803 | drivers/net/slip.c | tty->disc_data = 0; |
tty | 804 | drivers/net/slip.c | sl->tty = NULL; |
tty | 1042 | drivers/net/slip.c | slip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) |
tty | 1044 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 1178 | drivers/net/slip.c | return n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg); |
tty | 1188 | drivers/net/slip.c | if(sl->tty==NULL) |
tty | 1388 | drivers/net/slip.c | sl->tty->driver.write(sl->tty, 0, &s, 1); |
tty | 1417 | drivers/net/slip.c | tty_hangup(sl->tty); /* this must hangup tty & close slip */ |
tty | 54 | drivers/net/slip.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 384 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 395 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 405 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 422 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 433 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 443 | fs/dquot.c | tty_write_message(current->tty, quotamessage); |
tty | 614 | fs/open.c | if (current->tty) |
tty | 615 | fs/open.c | tty_vhangup(current->tty); |
tty | 676 | fs/proc/array.c | if (tsk->tty) |
tty | 677 | fs/proc/array.c | tty_pgrp = tsk->tty->pgrp; |
tty | 697 | 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 | 370 | include/linux/isdn.h | struct tty_struct *tty; |
tty | 232 | include/linux/scc.h | struct tty_struct *tty; /* link to tty control structure */ |
tty | 232 | include/linux/sched.h | struct tty_struct *tty; /* NULL if no tty */ |
tty | 139 | 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 | 288 | include/linux/tty.h | extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, |
tty | 290 | include/linux/tty.h | extern char *_tty_name(struct tty_struct *tty, char *buf); |
tty | 291 | include/linux/tty.h | extern char *tty_name(struct tty_struct *tty); |
tty | 292 | include/linux/tty.h | extern void tty_wait_until_sent(struct tty_struct * tty, int timeout); |
tty | 293 | include/linux/tty.h | extern int tty_check_change(struct tty_struct * tty); |
tty | 294 | include/linux/tty.h | extern void stop_tty(struct tty_struct * tty); |
tty | 295 | include/linux/tty.h | extern void start_tty(struct tty_struct * tty); |
tty | 299 | include/linux/tty.h | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
tty | 301 | include/linux/tty.h | extern void tty_write_message(struct tty_struct *tty, char *msg); |
tty | 305 | include/linux/tty.h | extern int tty_signal(int sig, struct tty_struct *tty); |
tty | 306 | include/linux/tty.h | extern void tty_hangup(struct tty_struct * tty); |
tty | 307 | include/linux/tty.h | extern void tty_vhangup(struct tty_struct * tty); |
tty | 310 | include/linux/tty.h | extern void do_SAK(struct tty_struct *tty); |
tty | 317 | include/linux/tty.h | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
tty | 322 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
tty | 326 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
tty | 330 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
tty | 336 | 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 | 591 | kernel/sys.c | current->tty = NULL; |