tag | line | file | source code |
tty | 1008 | drivers/char/console.c | static void respond_string(const char * p, struct tty_struct * tty) |
tty | 1011 | drivers/char/console.c | tty_insert_flip_char(tty, *p, 0); |
tty | 1014 | drivers/char/console.c | tty_schedule_flip(tty); |
tty | 1017 | drivers/char/console.c | static void cursor_report(int currcons, struct tty_struct * tty) |
tty | 1022 | drivers/char/console.c | respond_string(buf, tty); |
tty | 1025 | drivers/char/console.c | static inline void status_report(struct tty_struct * tty) |
tty | 1027 | drivers/char/console.c | respond_string("\033[0n", tty); /* Terminal ok */ |
tty | 1030 | drivers/char/console.c | static inline void respond_ID(struct tty_struct * tty) |
tty | 1032 | drivers/char/console.c | respond_string(VT102ID, tty); |
tty | 1035 | drivers/char/console.c | void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry) |
tty | 1041 | drivers/char/console.c | respond_string(buf, tty); |
tty | 1383 | drivers/char/console.c | static void con_stop(struct tty_struct *tty) |
tty | 1386 | drivers/char/console.c | if (!tty) |
tty | 1388 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1398 | drivers/char/console.c | static void con_start(struct tty_struct *tty) |
tty | 1401 | drivers/char/console.c | if (!tty) |
tty | 1403 | drivers/char/console.c | console_num = MINOR(tty->device) - (tty->driver.minor_start); |
tty | 1410 | drivers/char/console.c | static int con_write(struct tty_struct * tty, int from_user, |
tty | 1415 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 1432 | drivers/char/console.c | while (!tty->stopped && count) { |
tty | 1599 | drivers/char/console.c | respond_ID(tty); |
tty | 1690 | drivers/char/console.c | status_report(tty); |
tty | 1692 | drivers/char/console.c | cursor_report(currcons,tty); |
tty | 1754 | drivers/char/console.c | respond_ID(tty); |
tty | 1868 | drivers/char/console.c | static int con_write_room(struct tty_struct *tty) |
tty | 1870 | drivers/char/console.c | if (tty->stopped) |
tty | 1875 | drivers/char/console.c | static int con_chars_in_buffer(struct tty_struct *tty) |
tty | 1936 | drivers/char/console.c | static void con_throttle(struct tty_struct *tty) |
tty | 1940 | drivers/char/console.c | static void con_unthrottle(struct tty_struct *tty) |
tty | 1942 | drivers/char/console.c | struct vt_struct *vt = (struct vt_struct *) tty->driver_data; |
tty | 2347 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
tty | 2352 | drivers/char/console.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2359 | drivers/char/console.c | tty->driver_data = vt_cons[idx]; |
tty | 2361 | drivers/char/console.c | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { |
tty | 2362 | drivers/char/console.c | tty->winsize.ws_row = video_num_lines; |
tty | 2363 | drivers/char/console.c | tty->winsize.ws_col = video_num_columns; |
tty | 507 | drivers/char/cyclades.c | cy_stop(struct tty_struct *tty) |
tty | 510 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 519 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_stop")) |
tty | 539 | drivers/char/cyclades.c | cy_start(struct tty_struct *tty) |
tty | 542 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 551 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_start")) |
tty | 624 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 679 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 690 | drivers/char/cyclades.c | tty = info->tty; |
tty | 697 | drivers/char/cyclades.c | if (tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 698 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 701 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 703 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 706 | drivers/char/cyclades.c | do_SAK(tty); |
tty | 709 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 711 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 714 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 716 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 719 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 721 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 726 | drivers/char/cyclades.c | if(tty->flip.count < TTY_FLIPBUF_SIZE){ |
tty | 727 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 728 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = |
tty | 730 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = |
tty | 738 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 739 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 742 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 743 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 761 | drivers/char/cyclades.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE){ |
tty | 764 | drivers/char/cyclades.c | tty->flip.count++; |
tty | 766 | drivers/char/cyclades.c | *tty->flip.flag_buf_ptr++ = TTY_NORMAL; |
tty | 767 | drivers/char/cyclades.c | *tty->flip.char_buf_ptr++ = data; |
tty | 773 | drivers/char/cyclades.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 799 | drivers/char/cyclades.c | if(info->tty == 0){ |
tty | 844 | drivers/char/cyclades.c | if (info->tty->stopped || info->tty->hw_stopped){ |
tty | 902 | drivers/char/cyclades.c | if(info->tty == 0){ /* nowhere to put the data, ignore it */ |
tty | 918 | drivers/char/cyclades.c | if(info->tty->stopped){ |
tty | 921 | drivers/char/cyclades.c | info->tty->stopped = 0; |
tty | 928 | drivers/char/cyclades.c | info->tty->stopped = 1; |
tty | 983 | drivers/char/cyclades.c | struct tty_struct *tty; |
tty | 985 | drivers/char/cyclades.c | tty = info->tty; |
tty | 986 | drivers/char/cyclades.c | if (!tty) |
tty | 990 | drivers/char/cyclades.c | tty_hangup(info->tty); |
tty | 999 | drivers/char/cyclades.c | if((tty->flags & (1<< TTY_DO_WRITE_WAKEUP)) |
tty | 1000 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup){ |
tty | 1001 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1003 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1171 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1172 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1220 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1221 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1296 | drivers/char/cyclades.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1308 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1309 | drivers/char/cyclades.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1332 | drivers/char/cyclades.c | if (!info->tty || !info->tty->termios){ |
tty | 1338 | drivers/char/cyclades.c | cflag = info->tty->termios->c_cflag; |
tty | 1361 | drivers/char/cyclades.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1464 | drivers/char/cyclades.c | base_addr[CySCHR1<<index] = START_CHAR(info->tty); |
tty | 1465 | drivers/char/cyclades.c | base_addr[CySCHR2<<index] = STOP_CHAR(info->tty); |
tty | 1480 | drivers/char/cyclades.c | if (C_CLOCAL(info->tty)) { |
tty | 1508 | drivers/char/cyclades.c | if (info->tty){ |
tty | 1509 | drivers/char/cyclades.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1518 | drivers/char/cyclades.c | cy_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1520 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1527 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_put_char")) |
tty | 1530 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf) |
tty | 1547 | drivers/char/cyclades.c | cy_flush_chars(struct tty_struct *tty) |
tty | 1549 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1558 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_chars")) |
tty | 1561 | drivers/char/cyclades.c | if (info->xmit_cnt <= 0 || tty->stopped |
tty | 1562 | drivers/char/cyclades.c | || tty->hw_stopped || !info->xmit_buf) |
tty | 1587 | drivers/char/cyclades.c | cy_write(struct tty_struct * tty, int from_user, |
tty | 1590 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1598 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write")){ |
tty | 1602 | drivers/char/cyclades.c | if (!tty || !info->xmit_buf || !tmp_buf){ |
tty | 1634 | drivers/char/cyclades.c | && !tty->stopped |
tty | 1635 | drivers/char/cyclades.c | && !tty->hw_stopped ) { |
tty | 1643 | drivers/char/cyclades.c | cy_write_room(struct tty_struct *tty) |
tty | 1645 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1652 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_write_room")) |
tty | 1662 | drivers/char/cyclades.c | cy_chars_in_buffer(struct tty_struct *tty) |
tty | 1664 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1670 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer")) |
tty | 1678 | drivers/char/cyclades.c | cy_flush_buffer(struct tty_struct *tty) |
tty | 1680 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1687 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_flush_buffer")) |
tty | 1692 | drivers/char/cyclades.c | wake_up_interruptible(&tty->write_wait); |
tty | 1693 | drivers/char/cyclades.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) |
tty | 1694 | drivers/char/cyclades.c | && tty->ldisc.write_wakeup) |
tty | 1695 | drivers/char/cyclades.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1704 | drivers/char/cyclades.c | cy_throttle(struct tty_struct * tty) |
tty | 1706 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1714 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1715 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1719 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1723 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1724 | drivers/char/cyclades.c | info->x_char = STOP_CHAR(tty); |
tty | 1746 | drivers/char/cyclades.c | cy_unthrottle(struct tty_struct * tty) |
tty | 1748 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 1756 | drivers/char/cyclades.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1757 | drivers/char/cyclades.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1761 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_nthrottle")){ |
tty | 1765 | drivers/char/cyclades.c | if (I_IXOFF(tty)) { |
tty | 1766 | drivers/char/cyclades.c | info->x_char = START_CHAR(tty); |
tty | 2113 | drivers/char/cyclades.c | cy_ioctl(struct tty_struct *tty, struct file * file, |
tty | 2117 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2183 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2186 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2191 | drivers/char/cyclades.c | ret_val = tty_check_change(tty); |
tty | 2194 | drivers/char/cyclades.c | tty_wait_until_sent(tty,0); |
tty | 2211 | drivers/char/cyclades.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 2216 | drivers/char/cyclades.c | tty->termios->c_cflag = |
tty | 2217 | drivers/char/cyclades.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 2258 | drivers/char/cyclades.c | cy_set_termios(struct tty_struct *tty, struct termios * old_termios) |
tty | 2260 | drivers/char/cyclades.c | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
tty | 2266 | drivers/char/cyclades.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2271 | drivers/char/cyclades.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 2272 | drivers/char/cyclades.c | tty->stopped = 0; |
tty | 2273 | drivers/char/cyclades.c | cy_start(tty); |
tty | 2277 | drivers/char/cyclades.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 2286 | drivers/char/cyclades.c | cy_close(struct tty_struct * tty, struct file * filp) |
tty | 2288 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2296 | drivers/char/cyclades.c | || serial_paranoia_check(info, tty->device, "cy_close")){ |
tty | 2303 | drivers/char/cyclades.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2332 | drivers/char/cyclades.c | info->normal_termios = *tty->termios; |
tty | 2334 | drivers/char/cyclades.c | info->callout_termios = *tty->termios; |
tty | 2336 | drivers/char/cyclades.c | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ |
tty | 2338 | drivers/char/cyclades.c | if (tty->driver.flush_buffer) |
tty | 2339 | drivers/char/cyclades.c | tty->driver.flush_buffer(tty); |
tty | 2340 | drivers/char/cyclades.c | if (tty->ldisc.flush_buffer) |
tty | 2341 | drivers/char/cyclades.c | tty->ldisc.flush_buffer(tty); |
tty | 2343 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2344 | drivers/char/cyclades.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 2345 | drivers/char/cyclades.c | if (tty->ldisc.close) |
tty | 2346 | drivers/char/cyclades.c | (tty->ldisc.close)(tty); |
tty | 2347 | drivers/char/cyclades.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 2348 | drivers/char/cyclades.c | tty->termios->c_line = N_TTY; |
tty | 2349 | drivers/char/cyclades.c | if (tty->ldisc.open) |
tty | 2350 | drivers/char/cyclades.c | (tty->ldisc.open)(tty); |
tty | 2375 | drivers/char/cyclades.c | cy_hangup(struct tty_struct *tty) |
tty | 2377 | drivers/char/cyclades.c | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; |
tty | 2383 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_hangup")) |
tty | 2393 | drivers/char/cyclades.c | info->tty = 0; |
tty | 2408 | drivers/char/cyclades.c | block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2435 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2519 | drivers/char/cyclades.c | && (C_CLOCAL(tty) |
tty | 2559 | drivers/char/cyclades.c | cy_open(struct tty_struct *tty, struct file * filp) |
tty | 2565 | drivers/char/cyclades.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2576 | drivers/char/cyclades.c | if (serial_paranoia_check(info, tty->device, "cy_open")){ |
tty | 2586 | drivers/char/cyclades.c | tty->driver_data = info; |
tty | 2587 | drivers/char/cyclades.c | info->tty = tty; |
tty | 2597 | drivers/char/cyclades.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2598 | drivers/char/cyclades.c | *tty->termios = info->normal_termios; |
tty | 2600 | drivers/char/cyclades.c | *tty->termios = info->callout_termios; |
tty | 2610 | drivers/char/cyclades.c | retval = block_til_ready(tty, filp, info); |
tty | 2842 | drivers/char/cyclades.c | info->tty = 0; |
tty | 3087 | drivers/char/cyclades.c | (long)info->tty, info->read_status_mask, |
tty | 271 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 597 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp); |
tty | 598 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp); |
tty | 599 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 600 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 601 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty); |
tty | 602 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty); |
tty | 603 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty); |
tty | 604 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 605 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old); |
tty | 606 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty); |
tty | 607 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty); |
tty | 608 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty); |
tty | 609 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty); |
tty | 610 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty); |
tty | 611 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty); |
tty | 794 | drivers/char/istallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 795 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 858 | drivers/char/istallion.c | static int stli_open(struct tty_struct *tty, struct file *filp) |
tty | 866 | drivers/char/istallion.c | printk("stli_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 869 | drivers/char/istallion.c | minordev = MINOR(tty->device); |
tty | 907 | drivers/char/istallion.c | portp->tty = tty; |
tty | 908 | drivers/char/istallion.c | tty->driver_data = portp; |
tty | 921 | drivers/char/istallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 947 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 971 | drivers/char/istallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 972 | drivers/char/istallion.c | *tty->termios = portp->normaltermios; |
tty | 974 | drivers/char/istallion.c | *tty->termios = portp->callouttermios; |
tty | 985 | drivers/char/istallion.c | static void stli_close(struct tty_struct *tty, struct file *filp) |
tty | 992 | drivers/char/istallion.c | printk("stli_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 995 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1013 | drivers/char/istallion.c | portp->normaltermios = *tty->termios; |
tty | 1015 | drivers/char/istallion.c | portp->callouttermios = *tty->termios; |
tty | 1023 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1024 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1025 | drivers/char/istallion.c | tty->closing = 1; |
tty | 1028 | drivers/char/istallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 1034 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 1040 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1041 | drivers/char/istallion.c | if (tty->ldisc.flush_buffer) |
tty | 1042 | drivers/char/istallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 1044 | drivers/char/istallion.c | stli_flushbuffer(tty); |
tty | 1046 | drivers/char/istallion.c | tty->closing = 0; |
tty | 1047 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 1048 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1073 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 1091 | drivers/char/istallion.c | tty = portp->tty; |
tty | 1092 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1094 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, tty->termios); |
tty | 1327 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 1333 | drivers/char/istallion.c | stli_mkasyport(portp, &aport, portp->tty->termios); |
tty | 1396 | drivers/char/istallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 1423 | drivers/char/istallion.c | static int stli_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 1435 | 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 | 1438 | drivers/char/istallion.c | if ((tty == (struct tty_struct *) NULL) || (stli_tmpwritebuf == (char *) NULL)) |
tty | 1440 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1441 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1442 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1546 | drivers/char/istallion.c | static void stli_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 1549 | drivers/char/istallion.c | printk("stli_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 1552 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1554 | drivers/char/istallion.c | if (tty != stli_txcooktty) { |
tty | 1557 | drivers/char/istallion.c | stli_txcooktty = tty; |
tty | 1573 | drivers/char/istallion.c | static void stli_flushchars(struct tty_struct *tty) |
tty | 1586 | drivers/char/istallion.c | printk("stli_flushchars(tty=%x)\n", (int) tty); |
tty | 1595 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1599 | drivers/char/istallion.c | if (tty != cooktty) |
tty | 1600 | drivers/char/istallion.c | tty = cooktty; |
tty | 1604 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1666 | drivers/char/istallion.c | static int stli_writeroom(struct tty_struct *tty) |
tty | 1675 | drivers/char/istallion.c | printk("stli_writeroom(tty=%x)\n", (int) tty); |
tty | 1678 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1680 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1687 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1707 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 1724 | drivers/char/istallion.c | static int stli_charsinbuffer(struct tty_struct *tty) |
tty | 1733 | drivers/char/istallion.c | printk("stli_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1736 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1738 | drivers/char/istallion.c | if (tty == stli_txcooktty) |
tty | 1739 | drivers/char/istallion.c | stli_flushchars(tty); |
tty | 1740 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1831 | drivers/char/istallion.c | static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1839 | drivers/char/istallion.c | printk("stli_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1842 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1844 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1855 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1856 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1864 | drivers/char/istallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1865 | drivers/char/istallion.c | tty_wait_until_sent(tty, 0); |
tty | 1872 | drivers/char/istallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1877 | drivers/char/istallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1939 | drivers/char/istallion.c | static void stli_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1947 | drivers/char/istallion.c | printk("stli_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1950 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1952 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 1959 | drivers/char/istallion.c | tiosp = tty->termios; |
tty | 1968 | drivers/char/istallion.c | tty->hw_stopped = 0; |
tty | 1985 | drivers/char/istallion.c | static void stli_throttle(struct tty_struct *tty) |
tty | 1990 | drivers/char/istallion.c | printk("stli_throttle(tty=%x)\n", (int) tty); |
tty | 1993 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1995 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2010 | drivers/char/istallion.c | static void stli_unthrottle(struct tty_struct *tty) |
tty | 2015 | drivers/char/istallion.c | printk("stli_unthrottle(tty=%x)\n", (int) tty); |
tty | 2018 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2020 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2034 | drivers/char/istallion.c | static void stli_stop(struct tty_struct *tty) |
tty | 2041 | drivers/char/istallion.c | printk("stli_stop(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 | 2066 | drivers/char/istallion.c | static void stli_start(struct tty_struct *tty) |
tty | 2073 | drivers/char/istallion.c | printk("stli_start(tty=%x)\n", (int) tty); |
tty | 2076 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2078 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2114 | drivers/char/istallion.c | if (portp->tty == (struct tty_struct *) NULL) |
tty | 2116 | drivers/char/istallion.c | tty_hangup(portp->tty); |
tty | 2128 | drivers/char/istallion.c | static void stli_hangup(struct tty_struct *tty) |
tty | 2135 | drivers/char/istallion.c | printk("stli_hangup(tty=%x)\n", (int) tty); |
tty | 2138 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2140 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2153 | drivers/char/istallion.c | if (tty->termios->c_cflag & HUPCL) { |
tty | 2167 | drivers/char/istallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 2168 | drivers/char/istallion.c | tty->driver_data = (void *) NULL; |
tty | 2169 | drivers/char/istallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 2184 | drivers/char/istallion.c | static void stli_flushbuffer(struct tty_struct *tty) |
tty | 2191 | drivers/char/istallion.c | printk("stli_flushbuffer(tty=%x)\n", (int) tty); |
tty | 2194 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2196 | drivers/char/istallion.c | portp = tty->driver_data; |
tty | 2205 | drivers/char/istallion.c | if (tty == stli_txcooktty) { |
tty | 2222 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2223 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2224 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2291 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2301 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2302 | drivers/char/istallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 2319 | drivers/char/istallion.c | len = MIN(len, (TTY_FLIPBUF_SIZE - tty->flip.count)); |
tty | 2324 | drivers/char/istallion.c | memcpy(tty->flip.char_buf_ptr, (char *) (shbuf + tail), stlen); |
tty | 2325 | drivers/char/istallion.c | memset(tty->flip.flag_buf_ptr, 0, stlen); |
tty | 2326 | drivers/char/istallion.c | tty->flip.char_buf_ptr += stlen; |
tty | 2327 | drivers/char/istallion.c | tty->flip.flag_buf_ptr += stlen; |
tty | 2328 | drivers/char/istallion.c | tty->flip.count += stlen; |
tty | 2343 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 2400 | drivers/char/istallion.c | struct tty_struct *tty; |
tty | 2475 | drivers/char/istallion.c | tty = portp->tty; |
tty | 2486 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) |
tty | 2495 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2496 | drivers/char/istallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 2497 | drivers/char/istallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2498 | drivers/char/istallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 2503 | drivers/char/istallion.c | if (tty != (struct tty_struct *) NULL) { |
tty | 2504 | drivers/char/istallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 2505 | drivers/char/istallion.c | tty->flip.count++; |
tty | 2506 | drivers/char/istallion.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 2507 | drivers/char/istallion.c | *tty->flip.char_buf_ptr++ = 0; |
tty | 2510 | drivers/char/istallion.c | do_SAK(tty); |
tty | 2512 | drivers/char/istallion.c | tty_schedule_flip(tty); |
tty | 112 | drivers/char/keyboard.c | static struct tty_struct * tty = NULL; |
tty | 374 | drivers/char/keyboard.c | tty = ttytab[fg_console]; |
tty | 523 | drivers/char/keyboard.c | (vc_kbd_mode(kbd,VC_REPEAT) && tty && |
tty | 524 | drivers/char/keyboard.c | (L_ECHO(tty) || (tty->driver.chars_in_buffer(tty) == 0)))) { |
tty | 573 | drivers/char/keyboard.c | if (tty) { |
tty | 574 | drivers/char/keyboard.c | tty_insert_flip_char(tty, ch, 0); |
tty | 575 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 582 | drivers/char/keyboard.c | if (!tty) |
tty | 586 | drivers/char/keyboard.c | tty_insert_flip_char(tty, *cp, 0); |
tty | 589 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 630 | drivers/char/keyboard.c | if (rep || !tty) |
tty | 638 | drivers/char/keyboard.c | if (tty->stopped) |
tty | 639 | drivers/char/keyboard.c | start_tty(tty); |
tty | 641 | drivers/char/keyboard.c | stop_tty(tty); |
tty | 698 | drivers/char/keyboard.c | if (!tty) |
tty | 700 | drivers/char/keyboard.c | tty_insert_flip_char(tty, 0, TTY_BREAK); |
tty | 701 | drivers/char/keyboard.c | tty_schedule_flip(tty); |
tty | 735 | 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 | while (tty->column > col) { |
tty | 261 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 262 | drivers/char/n_tty.c | tty->column--; |
tty | 265 | drivers/char/n_tty.c | if (iscntrl(c) && L_ECHOCTL(tty)) { |
tty | 266 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 267 | drivers/char/n_tty.c | put_char(' ', tty); |
tty | 268 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 269 | drivers/char/n_tty.c | tty->column--; |
tty | 271 | drivers/char/n_tty.c | if (!iscntrl(c) || L_ECHOCTL(tty)) { |
tty | 272 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 273 | drivers/char/n_tty.c | put_char(' ', tty); |
tty | 274 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 275 | drivers/char/n_tty.c | tty->column--; |
tty | 282 | drivers/char/n_tty.c | if (tty->read_head == tty->canon_head) |
tty | 283 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 286 | drivers/char/n_tty.c | static void isig(int sig, struct tty_struct *tty) |
tty | 288 | drivers/char/n_tty.c | if (tty->pgrp > 0) |
tty | 289 | drivers/char/n_tty.c | kill_pg(tty->pgrp, sig, 1); |
tty | 290 | drivers/char/n_tty.c | if (!L_NOFLSH(tty)) { |
tty | 291 | drivers/char/n_tty.c | n_tty_flush_buffer(tty); |
tty | 292 | drivers/char/n_tty.c | if (tty->driver.flush_buffer) |
tty | 293 | drivers/char/n_tty.c | tty->driver.flush_buffer(tty); |
tty | 297 | drivers/char/n_tty.c | static inline void n_tty_receive_break(struct tty_struct *tty) |
tty | 299 | drivers/char/n_tty.c | if (I_IGNBRK(tty)) |
tty | 301 | drivers/char/n_tty.c | if (I_BRKINT(tty)) { |
tty | 302 | drivers/char/n_tty.c | isig(SIGINT, tty); |
tty | 305 | drivers/char/n_tty.c | if (I_PARMRK(tty)) { |
tty | 306 | drivers/char/n_tty.c | put_tty_queue('\377', tty); |
tty | 307 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 309 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 310 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 313 | drivers/char/n_tty.c | static inline void n_tty_receive_overrun(struct tty_struct *tty) |
tty | 317 | drivers/char/n_tty.c | tty->num_overrun++; |
tty | 318 | drivers/char/n_tty.c | if (tty->overrun_time < (jiffies - HZ)) { |
tty | 319 | drivers/char/n_tty.c | printk("%s: %d input overrun(s)\n", _tty_name(tty, buf), |
tty | 320 | drivers/char/n_tty.c | tty->num_overrun); |
tty | 321 | drivers/char/n_tty.c | tty->overrun_time = jiffies; |
tty | 322 | drivers/char/n_tty.c | tty->num_overrun = 0; |
tty | 326 | drivers/char/n_tty.c | static inline void n_tty_receive_parity_error(struct tty_struct *tty, |
tty | 329 | drivers/char/n_tty.c | if (I_IGNPAR(tty)) { |
tty | 332 | drivers/char/n_tty.c | if (I_PARMRK(tty)) { |
tty | 333 | drivers/char/n_tty.c | put_tty_queue('\377', tty); |
tty | 334 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 335 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 337 | drivers/char/n_tty.c | put_tty_queue('\0', tty); |
tty | 338 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 341 | drivers/char/n_tty.c | static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) |
tty | 343 | drivers/char/n_tty.c | if (tty->raw) { |
tty | 344 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 348 | drivers/char/n_tty.c | if (tty->stopped && I_IXON(tty) && I_IXANY(tty)) { |
tty | 349 | drivers/char/n_tty.c | start_tty(tty); |
tty | 353 | drivers/char/n_tty.c | if (I_ISTRIP(tty)) |
tty | 355 | drivers/char/n_tty.c | if (I_IUCLC(tty) && L_IEXTEN(tty)) |
tty | 358 | drivers/char/n_tty.c | if (tty->closing) { |
tty | 359 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 360 | drivers/char/n_tty.c | if (c == START_CHAR(tty)) |
tty | 361 | drivers/char/n_tty.c | start_tty(tty); |
tty | 362 | drivers/char/n_tty.c | else if (c == STOP_CHAR(tty)) |
tty | 363 | drivers/char/n_tty.c | stop_tty(tty); |
tty | 374 | drivers/char/n_tty.c | if (!test_bit(c, &tty->process_char_map) || tty->lnext) { |
tty | 375 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 376 | drivers/char/n_tty.c | tty->lnext = 0; |
tty | 377 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 378 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 379 | drivers/char/n_tty.c | put_char('\a', tty); /* beep if no space */ |
tty | 383 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 384 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 385 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 387 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 388 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 389 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 394 | drivers/char/n_tty.c | if (I_IGNCR(tty)) |
tty | 396 | drivers/char/n_tty.c | if (I_ICRNL(tty)) |
tty | 398 | drivers/char/n_tty.c | } else if (c == '\n' && I_INLCR(tty)) |
tty | 400 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 401 | drivers/char/n_tty.c | if (c == START_CHAR(tty)) { |
tty | 402 | drivers/char/n_tty.c | start_tty(tty); |
tty | 405 | drivers/char/n_tty.c | if (c == STOP_CHAR(tty)) { |
tty | 406 | drivers/char/n_tty.c | stop_tty(tty); |
tty | 410 | drivers/char/n_tty.c | if (L_ISIG(tty)) { |
tty | 411 | drivers/char/n_tty.c | if (c == INTR_CHAR(tty)) { |
tty | 412 | drivers/char/n_tty.c | isig(SIGINT, tty); |
tty | 415 | drivers/char/n_tty.c | if (c == QUIT_CHAR(tty)) { |
tty | 416 | drivers/char/n_tty.c | isig(SIGQUIT, tty); |
tty | 419 | drivers/char/n_tty.c | if (c == SUSP_CHAR(tty)) { |
tty | 420 | drivers/char/n_tty.c | if (!is_orphaned_pgrp(tty->pgrp)) |
tty | 421 | drivers/char/n_tty.c | isig(SIGTSTP, tty); |
tty | 425 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 426 | drivers/char/n_tty.c | if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || |
tty | 427 | drivers/char/n_tty.c | (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { |
tty | 428 | drivers/char/n_tty.c | eraser(c, tty); |
tty | 431 | drivers/char/n_tty.c | if (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) { |
tty | 432 | drivers/char/n_tty.c | tty->lnext = 1; |
tty | 433 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 434 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 435 | drivers/char/n_tty.c | if (L_ECHOCTL(tty)) { |
tty | 436 | drivers/char/n_tty.c | put_char('^', tty); |
tty | 437 | drivers/char/n_tty.c | put_char('\b', tty); |
tty | 442 | drivers/char/n_tty.c | if (c == REPRINT_CHAR(tty) && L_ECHO(tty) && |
tty | 443 | drivers/char/n_tty.c | L_IEXTEN(tty)) { |
tty | 444 | drivers/char/n_tty.c | unsigned long tail = tty->canon_head; |
tty | 446 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 447 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 448 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 449 | drivers/char/n_tty.c | while (tail != tty->read_head) { |
tty | 450 | drivers/char/n_tty.c | echo_char(tty->read_buf[tail], tty); |
tty | 456 | drivers/char/n_tty.c | if (L_ECHO(tty) || L_ECHONL(tty)) { |
tty | 457 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 458 | drivers/char/n_tty.c | put_char('\a', tty); |
tty | 461 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 465 | drivers/char/n_tty.c | if (c == EOF_CHAR(tty)) { |
tty | 466 | drivers/char/n_tty.c | if (tty->canon_head != tty->read_head) |
tty | 467 | drivers/char/n_tty.c | set_bit(TTY_PUSH, &tty->flags); |
tty | 471 | drivers/char/n_tty.c | if ((c == EOL_CHAR(tty)) || |
tty | 472 | drivers/char/n_tty.c | (c == EOL2_CHAR(tty) && L_IEXTEN(tty))) { |
tty | 476 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 477 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 478 | drivers/char/n_tty.c | put_char('\a', tty); |
tty | 482 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 483 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 484 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 490 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 491 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 494 | drivers/char/n_tty.c | set_bit(tty->read_head, &tty->read_flags); |
tty | 495 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 496 | drivers/char/n_tty.c | tty->canon_head = tty->read_head; |
tty | 497 | drivers/char/n_tty.c | tty->canon_data++; |
tty | 498 | drivers/char/n_tty.c | if (tty->fasync) |
tty | 499 | drivers/char/n_tty.c | kill_fasync(tty->fasync, SIGIO); |
tty | 500 | drivers/char/n_tty.c | if (tty->read_wait) |
tty | 501 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 506 | drivers/char/n_tty.c | finish_erasing(tty); |
tty | 507 | drivers/char/n_tty.c | if (L_ECHO(tty)) { |
tty | 508 | drivers/char/n_tty.c | if (tty->read_cnt >= N_TTY_BUF_SIZE-1) { |
tty | 509 | drivers/char/n_tty.c | put_char('\a', tty); /* beep if no space */ |
tty | 513 | drivers/char/n_tty.c | opost('\n', tty); |
tty | 516 | drivers/char/n_tty.c | if (tty->canon_head == tty->read_head) |
tty | 517 | drivers/char/n_tty.c | tty->canon_column = tty->column; |
tty | 518 | drivers/char/n_tty.c | echo_char(c, tty); |
tty | 522 | drivers/char/n_tty.c | if (I_PARMRK(tty) && c == (unsigned char) '\377') |
tty | 523 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 525 | drivers/char/n_tty.c | put_tty_queue(c, tty); |
tty | 528 | drivers/char/n_tty.c | static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
tty | 535 | drivers/char/n_tty.c | if (!tty->read_buf) |
tty | 538 | drivers/char/n_tty.c | if (tty->real_raw) { |
tty | 539 | drivers/char/n_tty.c | i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, |
tty | 540 | drivers/char/n_tty.c | N_TTY_BUF_SIZE - tty->read_head)); |
tty | 541 | drivers/char/n_tty.c | memcpy(tty->read_buf + tty->read_head, cp, i); |
tty | 542 | drivers/char/n_tty.c | tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); |
tty | 543 | drivers/char/n_tty.c | tty->read_cnt += i; |
tty | 547 | drivers/char/n_tty.c | i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, |
tty | 548 | drivers/char/n_tty.c | N_TTY_BUF_SIZE - tty->read_head)); |
tty | 549 | drivers/char/n_tty.c | memcpy(tty->read_buf + tty->read_head, cp, i); |
tty | 550 | drivers/char/n_tty.c | tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); |
tty | 551 | drivers/char/n_tty.c | tty->read_cnt += i; |
tty | 558 | drivers/char/n_tty.c | n_tty_receive_char(tty, *p); |
tty | 561 | drivers/char/n_tty.c | n_tty_receive_break(tty); |
tty | 565 | drivers/char/n_tty.c | n_tty_receive_parity_error(tty, *p); |
tty | 568 | drivers/char/n_tty.c | n_tty_receive_overrun(tty); |
tty | 571 | drivers/char/n_tty.c | printk("%s: unknown flag %d\n", tty_name(tty), |
tty | 576 | drivers/char/n_tty.c | if (tty->driver.flush_chars) |
tty | 577 | drivers/char/n_tty.c | tty->driver.flush_chars(tty); |
tty | 580 | drivers/char/n_tty.c | if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) { |
tty | 581 | drivers/char/n_tty.c | if (tty->fasync) |
tty | 582 | drivers/char/n_tty.c | kill_fasync(tty->fasync, SIGIO); |
tty | 583 | drivers/char/n_tty.c | if (tty->read_wait) |
tty | 584 | drivers/char/n_tty.c | wake_up_interruptible(&tty->read_wait); |
tty | 587 | drivers/char/n_tty.c | if ((tty->read_cnt >= TTY_THRESHOLD_THROTTLE) && |
tty | 588 | drivers/char/n_tty.c | tty->driver.throttle && |
tty | 589 | drivers/char/n_tty.c | !set_bit(TTY_THROTTLED, &tty->flags)) |
tty | 590 | drivers/char/n_tty.c | tty->driver.throttle(tty); |
tty | 593 | drivers/char/n_tty.c | static int n_tty_receive_room(struct tty_struct *tty) |
tty | 595 | drivers/char/n_tty.c | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; |
tty | 603 | drivers/char/n_tty.c | if (tty->icanon && !tty->canon_data) |
tty | 617 | drivers/char/n_tty.c | static void n_tty_set_termios(struct tty_struct *tty, struct termios * old) |
tty | 619 | drivers/char/n_tty.c | if (!tty) |
tty | 622 | drivers/char/n_tty.c | tty->icanon = (L_ICANON(tty) != 0); |
tty | 623 | drivers/char/n_tty.c | if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) || |
tty | 624 | drivers/char/n_tty.c | I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) || |
tty | 625 | drivers/char/n_tty.c | I_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) || |
tty | 626 | drivers/char/n_tty.c | I_PARMRK(tty)) { |
tty | 628 | drivers/char/n_tty.c | memset(tty->process_char_map, 0, 256/8); |
tty | 630 | drivers/char/n_tty.c | if (I_IGNCR(tty) || I_ICRNL(tty)) |
tty | 631 | drivers/char/n_tty.c | set_bit('\r', &tty->process_char_map); |
tty | 632 | drivers/char/n_tty.c | if (I_INLCR(tty)) |
tty | 633 | drivers/char/n_tty.c | set_bit('\n', &tty->process_char_map); |
tty | 635 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 636 | drivers/char/n_tty.c | set_bit(ERASE_CHAR(tty), &tty->process_char_map); |
tty | 637 | drivers/char/n_tty.c | set_bit(KILL_CHAR(tty), &tty->process_char_map); |
tty | 638 | drivers/char/n_tty.c | set_bit(EOF_CHAR(tty), &tty->process_char_map); |
tty | 639 | drivers/char/n_tty.c | set_bit('\n', &tty->process_char_map); |
tty | 640 | drivers/char/n_tty.c | set_bit(EOL_CHAR(tty), &tty->process_char_map); |
tty | 641 | drivers/char/n_tty.c | if (L_IEXTEN(tty)) { |
tty | 642 | drivers/char/n_tty.c | set_bit(WERASE_CHAR(tty), |
tty | 643 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 644 | drivers/char/n_tty.c | set_bit(LNEXT_CHAR(tty), |
tty | 645 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 646 | drivers/char/n_tty.c | set_bit(EOL2_CHAR(tty), |
tty | 647 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 648 | drivers/char/n_tty.c | if (L_ECHO(tty)) |
tty | 649 | drivers/char/n_tty.c | set_bit(REPRINT_CHAR(tty), |
tty | 650 | drivers/char/n_tty.c | &tty->process_char_map); |
tty | 653 | drivers/char/n_tty.c | if (I_IXON(tty)) { |
tty | 654 | drivers/char/n_tty.c | set_bit(START_CHAR(tty), &tty->process_char_map); |
tty | 655 | drivers/char/n_tty.c | set_bit(STOP_CHAR(tty), &tty->process_char_map); |
tty | 657 | drivers/char/n_tty.c | if (L_ISIG(tty)) { |
tty | 658 | drivers/char/n_tty.c | set_bit(INTR_CHAR(tty), &tty->process_char_map); |
tty | 659 | drivers/char/n_tty.c | set_bit(QUIT_CHAR(tty), &tty->process_char_map); |
tty | 660 | drivers/char/n_tty.c | set_bit(SUSP_CHAR(tty), &tty->process_char_map); |
tty | 662 | drivers/char/n_tty.c | clear_bit(__DISABLED_CHAR, &tty->process_char_map); |
tty | 664 | drivers/char/n_tty.c | tty->raw = 0; |
tty | 665 | drivers/char/n_tty.c | tty->real_raw = 0; |
tty | 667 | drivers/char/n_tty.c | tty->raw = 1; |
tty | 668 | drivers/char/n_tty.c | if ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) && |
tty | 669 | drivers/char/n_tty.c | (I_IGNPAR(tty) || !I_INPCK(tty)) && |
tty | 670 | drivers/char/n_tty.c | (tty->driver.flags & TTY_DRIVER_REAL_RAW)) |
tty | 671 | drivers/char/n_tty.c | tty->real_raw = 1; |
tty | 673 | drivers/char/n_tty.c | tty->real_raw = 0; |
tty | 677 | drivers/char/n_tty.c | static void n_tty_close(struct tty_struct *tty) |
tty | 679 | drivers/char/n_tty.c | n_tty_flush_buffer(tty); |
tty | 680 | drivers/char/n_tty.c | if (tty->read_buf) { |
tty | 681 | drivers/char/n_tty.c | free_page((unsigned long) tty->read_buf); |
tty | 682 | drivers/char/n_tty.c | tty->read_buf = 0; |
tty | 686 | drivers/char/n_tty.c | static int n_tty_open(struct tty_struct *tty) |
tty | 688 | drivers/char/n_tty.c | if (!tty) |
tty | 691 | drivers/char/n_tty.c | if (!tty->read_buf) { |
tty | 692 | drivers/char/n_tty.c | tty->read_buf = (unsigned char *) |
tty | 694 | drivers/char/n_tty.c | if (!tty->read_buf) |
tty | 697 | drivers/char/n_tty.c | memset(tty->read_buf, 0, N_TTY_BUF_SIZE); |
tty | 698 | drivers/char/n_tty.c | tty->read_head = tty->read_tail = tty->read_cnt = 0; |
tty | 699 | drivers/char/n_tty.c | memset(tty->read_flags, 0, sizeof(tty->read_flags)); |
tty | 700 | drivers/char/n_tty.c | n_tty_set_termios(tty, 0); |
tty | 701 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 702 | drivers/char/n_tty.c | tty->closing = 0; |
tty | 706 | drivers/char/n_tty.c | static inline int input_available_p(struct tty_struct *tty, int amt) |
tty | 708 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 709 | drivers/char/n_tty.c | if (tty->canon_data) |
tty | 711 | drivers/char/n_tty.c | } else if (tty->read_cnt >= (amt ? amt : 1)) |
tty | 725 | drivers/char/n_tty.c | static inline void copy_from_read_buf(struct tty_struct *tty, |
tty | 732 | drivers/char/n_tty.c | n = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail)); |
tty | 735 | drivers/char/n_tty.c | memcpy_tofs(*b, &tty->read_buf[tty->read_tail], n); |
tty | 736 | drivers/char/n_tty.c | tty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1); |
tty | 737 | drivers/char/n_tty.c | tty->read_cnt -= n; |
tty | 742 | drivers/char/n_tty.c | static int read_chan(struct tty_struct *tty, struct file *file, |
tty | 754 | drivers/char/n_tty.c | if (!tty->read_buf) { |
tty | 765 | drivers/char/n_tty.c | current->tty == tty) { |
tty | 766 | drivers/char/n_tty.c | if (tty->pgrp <= 0) |
tty | 768 | drivers/char/n_tty.c | else if (current->pgrp != tty->pgrp) { |
tty | 777 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 781 | drivers/char/n_tty.c | time = (HZ / 10) * TIME_CHAR(tty); |
tty | 782 | drivers/char/n_tty.c | minimum = MIN_CHAR(tty); |
tty | 786 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 787 | drivers/char/n_tty.c | else if (!tty->read_wait || |
tty | 788 | drivers/char/n_tty.c | (tty->minimum_to_wake > minimum)) |
tty | 789 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum; |
tty | 796 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum = 1; |
tty | 800 | drivers/char/n_tty.c | add_wait_queue(&tty->read_wait, &wait); |
tty | 803 | drivers/char/n_tty.c | if (tty->packet && tty->link->ctrl_status) { |
tty | 806 | drivers/char/n_tty.c | put_user(tty->link->ctrl_status, b++); |
tty | 807 | drivers/char/n_tty.c | tty->link->ctrl_status = 0; |
tty | 815 | drivers/char/n_tty.c | if (((minimum - (b - buf)) < tty->minimum_to_wake) && |
tty | 817 | drivers/char/n_tty.c | tty->minimum_to_wake = (minimum - (b - buf)); |
tty | 819 | drivers/char/n_tty.c | if (!input_available_p(tty, 0)) { |
tty | 820 | drivers/char/n_tty.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) { |
tty | 842 | drivers/char/n_tty.c | if (tty->packet && b == buf) { |
tty | 847 | drivers/char/n_tty.c | if (L_ICANON(tty)) { |
tty | 852 | drivers/char/n_tty.c | if (!tty->read_cnt) { |
tty | 856 | drivers/char/n_tty.c | eol = clear_bit(tty->read_tail, |
tty | 857 | drivers/char/n_tty.c | &tty->read_flags); |
tty | 858 | drivers/char/n_tty.c | c = tty->read_buf[tty->read_tail]; |
tty | 859 | drivers/char/n_tty.c | tty->read_tail = ((tty->read_tail+1) & |
tty | 861 | drivers/char/n_tty.c | tty->read_cnt--; |
tty | 869 | drivers/char/n_tty.c | if (--tty->canon_data < 0) { |
tty | 870 | drivers/char/n_tty.c | tty->canon_data = 0; |
tty | 880 | drivers/char/n_tty.c | copy_from_read_buf(tty, &b, &nr); |
tty | 881 | drivers/char/n_tty.c | copy_from_read_buf(tty, &b, &nr); |
tty | 887 | drivers/char/n_tty.c | if (tty->driver.unthrottle && |
tty | 888 | drivers/char/n_tty.c | (tty->read_cnt <= TTY_THRESHOLD_UNTHROTTLE) |
tty | 889 | drivers/char/n_tty.c | && clear_bit(TTY_THROTTLED, &tty->flags)) |
tty | 890 | drivers/char/n_tty.c | tty->driver.unthrottle(tty); |
tty | 897 | drivers/char/n_tty.c | remove_wait_queue(&tty->read_wait, &wait); |
tty | 899 | drivers/char/n_tty.c | if (!tty->read_wait) |
tty | 900 | drivers/char/n_tty.c | tty->minimum_to_wake = minimum; |
tty | 906 | drivers/char/n_tty.c | clear_bit(TTY_PUSH, &tty->flags); |
tty | 907 | drivers/char/n_tty.c | if (!size && clear_bit(TTY_PUSH, &tty->flags)) |
tty | 910 | drivers/char/n_tty.c | clear_bit(TTY_PUSH, &tty->flags); |
tty | 914 | drivers/char/n_tty.c | static int write_chan(struct tty_struct * tty, struct file * file, |
tty | 923 | drivers/char/n_tty.c | if (L_TOSTOP(tty) && file->f_inode->i_rdev != CONSOLE_DEV) { |
tty | 924 | drivers/char/n_tty.c | retval = tty_check_change(tty); |
tty | 929 | drivers/char/n_tty.c | add_wait_queue(&tty->write_wait, &wait); |
tty | 936 | drivers/char/n_tty.c | if (tty_hung_up_p(file) || (tty->link && !tty->link->count)) { |
tty | 940 | drivers/char/n_tty.c | if (O_OPOST(tty)) { |
tty | 943 | drivers/char/n_tty.c | if (opost(c, tty) < 0) |
tty | 947 | drivers/char/n_tty.c | if (tty->driver.flush_chars) |
tty | 948 | drivers/char/n_tty.c | tty->driver.flush_chars(tty); |
tty | 950 | drivers/char/n_tty.c | c = tty->driver.write(tty, 1, b, nr); |
tty | 963 | drivers/char/n_tty.c | remove_wait_queue(&tty->write_wait, &wait); |
tty | 967 | drivers/char/n_tty.c | static int normal_select(struct tty_struct * tty, struct inode * inode, |
tty | 972 | drivers/char/n_tty.c | if (input_available_p(tty, TIME_CHAR(tty) ? 0 : |
tty | 973 | drivers/char/n_tty.c | MIN_CHAR(tty))) |
tty | 977 | drivers/char/n_tty.c | if (tty->packet && tty->link->ctrl_status) |
tty | 979 | drivers/char/n_tty.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 983 | drivers/char/n_tty.c | if (!tty->read_wait) { |
tty | 984 | drivers/char/n_tty.c | if (MIN_CHAR(tty) && !TIME_CHAR(tty)) |
tty | 985 | drivers/char/n_tty.c | tty->minimum_to_wake = MIN_CHAR(tty); |
tty | 987 | drivers/char/n_tty.c | tty->minimum_to_wake = 1; |
tty | 989 | drivers/char/n_tty.c | select_wait(&tty->read_wait, wait); |
tty | 992 | drivers/char/n_tty.c | if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS) |
tty | 994 | drivers/char/n_tty.c | select_wait(&tty->write_wait, wait); |
tty | 63 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
tty | 65 | drivers/char/pty.c | if (!tty) |
tty | 67 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 68 | drivers/char/pty.c | if (tty->count > 1) |
tty | 69 | drivers/char/pty.c | printk("master pty_close: count = %d!!\n", tty->count); |
tty | 71 | drivers/char/pty.c | if (tty->count > 2) |
tty | 74 | drivers/char/pty.c | wake_up_interruptible(&tty->read_wait); |
tty | 75 | drivers/char/pty.c | wake_up_interruptible(&tty->write_wait); |
tty | 76 | drivers/char/pty.c | if (!tty->link) |
tty | 78 | drivers/char/pty.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 79 | drivers/char/pty.c | wake_up_interruptible(&tty->link->write_wait); |
tty | 80 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 81 | drivers/char/pty.c | tty_hangup(tty->link); |
tty | 83 | drivers/char/pty.c | start_tty(tty); |
tty | 84 | drivers/char/pty.c | set_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 98 | drivers/char/pty.c | static void pty_unthrottle(struct tty_struct * tty) |
tty | 100 | drivers/char/pty.c | struct tty_struct *o_tty = tty->link; |
tty | 109 | drivers/char/pty.c | set_bit(TTY_THROTTLED, &tty->flags); |
tty | 112 | drivers/char/pty.c | static int pty_write(struct tty_struct * tty, int from_user, |
tty | 115 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 119 | drivers/char/pty.c | if (!to || tty->stopped) |
tty | 125 | drivers/char/pty.c | ((tty->driver.subtype-1) * PTY_BUF_SIZE); |
tty | 146 | drivers/char/pty.c | static int pty_write_room(struct tty_struct *tty) |
tty | 148 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 150 | drivers/char/pty.c | if (!to || tty->stopped) |
tty | 156 | drivers/char/pty.c | static int pty_chars_in_buffer(struct tty_struct *tty) |
tty | 158 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 166 | drivers/char/pty.c | static void pty_flush_buffer(struct tty_struct *tty) |
tty | 168 | drivers/char/pty.c | struct tty_struct *to = tty->link; |
tty | 177 | drivers/char/pty.c | tty->ctrl_status |= TIOCPKT_FLUSHWRITE; |
tty | 182 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
tty | 187 | drivers/char/pty.c | if (!tty || !tty->link) |
tty | 189 | drivers/char/pty.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 193 | drivers/char/pty.c | tty->driver_data = pty; |
tty | 201 | drivers/char/pty.c | if (tty->driver.subtype == PTY_TYPE_SLAVE) |
tty | 202 | drivers/char/pty.c | clear_bit(TTY_SLAVE_CLOSED, &tty->link->flags); |
tty | 204 | drivers/char/pty.c | set_bit(TTY_THROTTLED, &tty->flags); |
tty | 207 | drivers/char/pty.c | while (!tty->link->count && !(current->signal & ~current->blocked)) |
tty | 209 | drivers/char/pty.c | if (!tty->link->count) |
tty | 163 | drivers/char/scc.c | int scc_open(struct tty_struct *tty, struct file *filp); |
tty | 164 | drivers/char/scc.c | static void scc_close(struct tty_struct *tty, struct file *filp); |
tty | 165 | drivers/char/scc.c | int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 166 | drivers/char/scc.c | static void scc_put_char(struct tty_struct *tty, unsigned char ch); |
tty | 167 | drivers/char/scc.c | static void scc_flush_chars(struct tty_struct *tty); |
tty | 168 | drivers/char/scc.c | static int scc_write_room(struct tty_struct *tty); |
tty | 169 | drivers/char/scc.c | static int scc_chars_in_buffer(struct tty_struct *tty); |
tty | 170 | drivers/char/scc.c | static void scc_flush_buffer(struct tty_struct *tty); |
tty | 171 | drivers/char/scc.c | static int scc_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 172 | drivers/char/scc.c | static void scc_set_termios(struct tty_struct *tty, struct termios *old_termios); |
tty | 173 | drivers/char/scc.c | static void scc_throttle(struct tty_struct *tty); |
tty | 174 | drivers/char/scc.c | static void scc_unthrottle(struct tty_struct *tty); |
tty | 175 | drivers/char/scc.c | static void scc_start(struct tty_struct *tty); |
tty | 176 | drivers/char/scc.c | static void scc_stop(struct tty_struct *tty); |
tty | 570 | drivers/char/scc.c | if (!scc->tty) break; |
tty | 611 | drivers/char/scc.c | if (!scc->tty) break; |
tty | 1109 | drivers/char/scc.c | if (scc2 == scc || !(scc2->tty && grp2)) |
tty | 1277 | drivers/char/scc.c | if (scc->tty && scc->init) |
tty | 1548 | drivers/char/scc.c | struct tty_struct * tty = scc->tty; |
tty | 1560 | drivers/char/scc.c | while(tty->flip.count < TTY_FLIPBUF_SIZE-3) |
tty | 1568 | drivers/char/scc.c | tty_insert_flip_char(tty, FEND, 0); |
tty | 1571 | drivers/char/scc.c | tty_insert_flip_char(tty, 0, 0); |
tty | 1579 | drivers/char/scc.c | tty_insert_flip_char(tty, FESC, 0); |
tty | 1580 | drivers/char/scc.c | tty_insert_flip_char(tty, TFEND, 0); |
tty | 1583 | drivers/char/scc.c | tty_insert_flip_char(tty, FESC, 0); |
tty | 1584 | drivers/char/scc.c | tty_insert_flip_char(tty, TFESC, 0); |
tty | 1587 | drivers/char/scc.c | tty_insert_flip_char(tty, ch, 0); |
tty | 1612 | drivers/char/scc.c | tty_insert_flip_char(tty, FEND, 0); /* send FEND for old frame */ |
tty | 1617 | drivers/char/scc.c | queue_task(&tty->flip.tqueue, &tq_timer); |
tty | 1628 | drivers/char/scc.c | queue_task(&tty->flip.tqueue, &tq_timer); /* kick it... */ |
tty | 1713 | drivers/char/scc.c | int scc_open(struct tty_struct *tty, struct file * filp) |
tty | 1718 | drivers/char/scc.c | chan = MINOR(tty->device) - tty->driver.minor_start; |
tty | 1724 | drivers/char/scc.c | tty->driver_data = scc; |
tty | 1725 | drivers/char/scc.c | tty->termios->c_cflag &= ~CBAUD; |
tty | 1732 | drivers/char/scc.c | printk("ERROR: scc_open(): bad magic number for device (%d, %d)", MAJOR(tty->device), MINOR(tty->device)); |
tty | 1736 | drivers/char/scc.c | if(scc->tty != NULL) |
tty | 1744 | drivers/char/scc.c | scc->tty = tty; |
tty | 1763 | drivers/char/scc.c | scc_close(struct tty_struct *tty, struct file * filp) |
tty | 1765 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 1777 | drivers/char/scc.c | tty->driver_data = NULLBUF; |
tty | 1785 | drivers/char/scc.c | scc->tty = NULL; |
tty | 1788 | drivers/char/scc.c | tty->stopped = 0; |
tty | 1801 | drivers/char/scc.c | if (scc->tty == NULL) |
tty | 1804 | drivers/char/scc.c | scc->modem.speed = baud_table[scc->tty->termios->c_cflag & CBAUD]; |
tty | 1830 | drivers/char/scc.c | scc_ioctl(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) |
tty | 1832 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
tty | 1842 | drivers/char/scc.c | MAJOR(tty->device), MINOR(tty->device)); |
tty | 1977 | drivers/char/scc.c | memcpy_tofs((void *) arg, scc->tty->termios, sizeof(struct termios)); |
tty | 1988 | drivers/char/scc.c | memcpy_fromfs(scc->tty->termios, (void *) arg, sizeof(struct termios)); |
tty | 2099 | drivers/char/scc.c | scc_set_termios(struct tty_struct * tty, struct termios * old_termios) |
tty | 2101 | drivers/char/scc.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 2103 | drivers/char/scc.c | scc_change_speed(tty->driver_data); |
tty | 2141 | drivers/char/scc.c | int scc_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 2143 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
tty | 2147 | drivers/char/scc.c | if (!tty) return count; |
tty | 2149 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write")) |
tty | 2187 | drivers/char/scc.c | static void scc_put_char(struct tty_struct * tty, unsigned char ch) |
tty | 2189 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2192 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_put_char")) |
tty | 2196 | drivers/char/scc.c | scc_write(tty, 0, &ch2, 1); /* that's all */ |
tty | 2199 | drivers/char/scc.c | static void scc_flush_chars(struct tty_struct * tty) |
tty | 2201 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2203 | drivers/char/scc.c | scc_paranoia_check(scc, tty->device, "scc_flush_chars"); /* just to annoy the user... */ |
tty | 2210 | drivers/char/scc.c | static int scc_write_room(struct tty_struct *tty) |
tty | 2212 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2214 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write_room")) |
tty | 2226 | drivers/char/scc.c | static int scc_chars_in_buffer(struct tty_struct *tty) |
tty | 2228 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2236 | drivers/char/scc.c | static void scc_flush_buffer(struct tty_struct *tty) |
tty | 2238 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2240 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_flush_buffer")) |
tty | 2245 | drivers/char/scc.c | wake_up_interruptible(&tty->write_wait); |
tty | 2246 | drivers/char/scc.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 2247 | drivers/char/scc.c | tty->ldisc.write_wakeup) |
tty | 2248 | drivers/char/scc.c | (tty->ldisc.write_wakeup)(tty); |
tty | 2251 | drivers/char/scc.c | static void scc_throttle(struct tty_struct *tty) |
tty | 2253 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2255 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_throttle")) |
tty | 2262 | drivers/char/scc.c | static void scc_unthrottle(struct tty_struct *tty) |
tty | 2264 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2266 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_unthrottle")) |
tty | 2272 | drivers/char/scc.c | static void scc_start(struct tty_struct *tty) |
tty | 2274 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2276 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_start")) |
tty | 2283 | drivers/char/scc.c | static void scc_stop(struct tty_struct *tty) |
tty | 2285 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
tty | 2287 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_stop")) |
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 | 295 | drivers/char/serial.c | static void rs_stop(struct tty_struct *tty) |
tty | 297 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 300 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_stop")) |
tty | 311 | drivers/char/serial.c | static void rs_start(struct tty_struct *tty) |
tty | 313 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 316 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_start")) |
tty | 374 | drivers/char/serial.c | struct tty_struct *tty = info->tty; |
tty | 385 | drivers/char/serial.c | if (tty->flip.count >= TTY_FLIPBUF_SIZE) |
tty | 387 | drivers/char/serial.c | tty->flip.count++; |
tty | 390 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_BREAK; |
tty | 392 | drivers/char/serial.c | do_SAK(tty); |
tty | 394 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_PARITY; |
tty | 396 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_FRAME; |
tty | 398 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; |
tty | 400 | drivers/char/serial.c | *tty->flip.flag_buf_ptr++ = 0; |
tty | 401 | drivers/char/serial.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 405 | drivers/char/serial.c | queue_task_irq_off(&tty->flip.tqueue, &tq_timer); |
tty | 422 | drivers/char/serial.c | if ((info->xmit_cnt <= 0) || info->tty->stopped || |
tty | 423 | drivers/char/serial.c | info->tty->hw_stopped) { |
tty | 475 | drivers/char/serial.c | if (info->tty->hw_stopped) { |
tty | 480 | drivers/char/serial.c | info->tty->hw_stopped = 0; |
tty | 491 | drivers/char/serial.c | info->tty->hw_stopped = 1; |
tty | 524 | drivers/char/serial.c | if (!info->tty || |
tty | 581 | drivers/char/serial.c | if (!info || !info->tty) |
tty | 642 | drivers/char/serial.c | if (!info->tty || |
tty | 719 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 721 | drivers/char/serial.c | tty = info->tty; |
tty | 722 | drivers/char/serial.c | if (!tty) |
tty | 726 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 727 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 728 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 729 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 745 | drivers/char/serial.c | struct tty_struct *tty; |
tty | 747 | drivers/char/serial.c | tty = info->tty; |
tty | 748 | drivers/char/serial.c | if (!tty) |
tty | 751 | drivers/char/serial.c | tty_hangup(tty); |
tty | 880 | drivers/char/serial.c | if (info->tty) |
tty | 881 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 920 | drivers/char/serial.c | if (info->tty) |
tty | 921 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 945 | drivers/char/serial.c | if (info->tty) |
tty | 947 | drivers/char/serial.c | &info->tty->flags); |
tty | 1002 | drivers/char/serial.c | if (info->tty) |
tty | 1003 | drivers/char/serial.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1090 | drivers/char/serial.c | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
tty | 1101 | drivers/char/serial.c | if (info->tty) |
tty | 1102 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 1119 | drivers/char/serial.c | if (!info->tty || !info->tty->termios) |
tty | 1121 | drivers/char/serial.c | cflag = info->tty->termios->c_cflag; |
tty | 1128 | drivers/char/serial.c | info->tty->termios->c_cflag &= ~CBAUDEX; |
tty | 1221 | drivers/char/serial.c | if (I_INPCK(info->tty)) |
tty | 1223 | drivers/char/serial.c | if (I_BRKINT(info->tty) || I_PARMRK(info->tty)) |
tty | 1227 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1231 | drivers/char/serial.c | if (I_IGNBRK(info->tty)) { |
tty | 1238 | drivers/char/serial.c | if (I_IGNPAR(info->tty)) { |
tty | 1253 | drivers/char/serial.c | static void rs_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1255 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1258 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_put_char")) |
tty | 1261 | drivers/char/serial.c | if (!tty || !info->xmit_buf) |
tty | 1276 | drivers/char/serial.c | static void rs_flush_chars(struct tty_struct *tty) |
tty | 1278 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1281 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_chars")) |
tty | 1284 | drivers/char/serial.c | if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || |
tty | 1294 | drivers/char/serial.c | static int rs_write(struct tty_struct * tty, int from_user, |
tty | 1298 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1301 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write")) |
tty | 1304 | drivers/char/serial.c | if (!tty || !info->xmit_buf || !tmp_buf) |
tty | 1331 | drivers/char/serial.c | if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped && |
tty | 1340 | drivers/char/serial.c | static int rs_write_room(struct tty_struct *tty) |
tty | 1342 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1345 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_write_room")) |
tty | 1353 | drivers/char/serial.c | static int rs_chars_in_buffer(struct tty_struct *tty) |
tty | 1355 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1357 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer")) |
tty | 1362 | drivers/char/serial.c | static void rs_flush_buffer(struct tty_struct *tty) |
tty | 1364 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1366 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_flush_buffer")) |
tty | 1371 | drivers/char/serial.c | wake_up_interruptible(&tty->write_wait); |
tty | 1372 | drivers/char/serial.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 1373 | drivers/char/serial.c | tty->ldisc.write_wakeup) |
tty | 1374 | drivers/char/serial.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1385 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty) |
tty | 1387 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1391 | drivers/char/serial.c | printk("throttle %s: %d....\n", _tty_name(tty, buf), |
tty | 1392 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1395 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_throttle")) |
tty | 1398 | drivers/char/serial.c | if (I_IXOFF(tty)) |
tty | 1399 | drivers/char/serial.c | info->x_char = STOP_CHAR(tty); |
tty | 1408 | drivers/char/serial.c | static void rs_unthrottle(struct tty_struct * tty) |
tty | 1410 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1414 | drivers/char/serial.c | printk("unthrottle %s: %d....\n", _tty_name(tty, buf), |
tty | 1415 | drivers/char/serial.c | tty->ldisc.chars_in_buffer(tty)); |
tty | 1418 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_unthrottle")) |
tty | 1421 | drivers/char/serial.c | if (I_IXOFF(tty)) { |
tty | 1425 | drivers/char/serial.c | info->x_char = START_CHAR(tty); |
tty | 1840 | drivers/char/serial.c | static int rs_ioctl(struct tty_struct *tty, struct file * file, |
tty | 1844 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 1847 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_ioctl")) |
tty | 1853 | drivers/char/serial.c | if (tty->flags & (1 << TTY_IO_ERROR)) |
tty | 1859 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1862 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1867 | drivers/char/serial.c | retval = tty_check_change(tty); |
tty | 1870 | drivers/char/serial.c | tty_wait_until_sent(tty, 0); |
tty | 1877 | drivers/char/serial.c | put_fs_long(C_CLOCAL(tty) ? 1 : 0, |
tty | 1882 | drivers/char/serial.c | tty->termios->c_cflag = |
tty | 1883 | drivers/char/serial.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 1958 | drivers/char/serial.c | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 1960 | drivers/char/serial.c | struct async_struct *info = (struct async_struct *)tty->driver_data; |
tty | 1962 | drivers/char/serial.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 1968 | drivers/char/serial.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 1969 | drivers/char/serial.c | tty->hw_stopped = 0; |
tty | 1970 | drivers/char/serial.c | rs_start(tty); |
tty | 1981 | drivers/char/serial.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 1996 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
tty | 1998 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2002 | drivers/char/serial.c | if (!info || serial_paranoia_check(info, tty->device, "rs_close")) |
tty | 2015 | drivers/char/serial.c | if ((tty->count == 1) && (info->count != 1)) { |
tty | 2042 | drivers/char/serial.c | info->normal_termios = *tty->termios; |
tty | 2044 | drivers/char/serial.c | info->callout_termios = *tty->termios; |
tty | 2049 | drivers/char/serial.c | tty->closing = 1; |
tty | 2051 | drivers/char/serial.c | tty_wait_until_sent(tty, info->closing_wait); |
tty | 2077 | drivers/char/serial.c | if (tty->driver.flush_buffer) |
tty | 2078 | drivers/char/serial.c | tty->driver.flush_buffer(tty); |
tty | 2079 | drivers/char/serial.c | if (tty->ldisc.flush_buffer) |
tty | 2080 | drivers/char/serial.c | tty->ldisc.flush_buffer(tty); |
tty | 2081 | drivers/char/serial.c | tty->closing = 0; |
tty | 2083 | drivers/char/serial.c | info->tty = 0; |
tty | 2084 | drivers/char/serial.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 2085 | drivers/char/serial.c | if (tty->ldisc.close) |
tty | 2086 | drivers/char/serial.c | (tty->ldisc.close)(tty); |
tty | 2087 | drivers/char/serial.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 2088 | drivers/char/serial.c | tty->termios->c_line = N_TTY; |
tty | 2089 | drivers/char/serial.c | if (tty->ldisc.open) |
tty | 2090 | drivers/char/serial.c | (tty->ldisc.open)(tty); |
tty | 2109 | drivers/char/serial.c | void rs_hangup(struct tty_struct *tty) |
tty | 2111 | drivers/char/serial.c | struct async_struct * info = (struct async_struct *)tty->driver_data; |
tty | 2113 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_hangup")) |
tty | 2116 | drivers/char/serial.c | rs_flush_buffer(tty); |
tty | 2121 | drivers/char/serial.c | info->tty = 0; |
tty | 2130 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 2157 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) { |
tty | 2177 | drivers/char/serial.c | (tty->flags & (1 << TTY_IO_ERROR))) { |
tty | 2188 | drivers/char/serial.c | if (tty->termios->c_cflag & CLOCAL) |
tty | 2263 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
tty | 2268 | drivers/char/serial.c | line = MINOR(tty->device) - tty->driver.minor_start; |
tty | 2272 | drivers/char/serial.c | if (serial_paranoia_check(info, tty->device, "rs_open")) |
tty | 2276 | drivers/char/serial.c | printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, |
tty | 2280 | drivers/char/serial.c | tty->driver_data = info; |
tty | 2281 | drivers/char/serial.c | info->tty = tty; |
tty | 2296 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
tty | 2306 | drivers/char/serial.c | if (tty->driver.subtype == SERIAL_TYPE_NORMAL) |
tty | 2307 | drivers/char/serial.c | *tty->termios = info->normal_termios; |
tty | 2309 | drivers/char/serial.c | *tty->termios = info->callout_termios; |
tty | 2648 | drivers/char/serial.c | info->tty = 0; |
tty | 2767 | drivers/char/serial.c | if (info->tty) |
tty | 2768 | drivers/char/serial.c | tty_hangup(info->tty); |
tty | 244 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 473 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp); |
tty | 474 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp); |
tty | 475 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count); |
tty | 476 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch); |
tty | 477 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty); |
tty | 478 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty); |
tty | 479 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty); |
tty | 480 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); |
tty | 481 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old); |
tty | 482 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty); |
tty | 483 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty); |
tty | 484 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty); |
tty | 485 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty); |
tty | 486 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty); |
tty | 487 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty); |
tty | 586 | drivers/char/stallion.c | if (portp->tty != (struct tty_struct *) NULL) |
tty | 587 | drivers/char/stallion.c | stl_hangup(portp->tty); |
tty | 662 | drivers/char/stallion.c | static int stl_open(struct tty_struct *tty, struct file *filp) |
tty | 670 | drivers/char/stallion.c | printk("stl_open(tty=%x,filp=%x): device=%x\n", (int) tty, (int) filp, tty->device); |
tty | 673 | drivers/char/stallion.c | minordev = MINOR(tty->device); |
tty | 701 | drivers/char/stallion.c | portp->tty = tty; |
tty | 702 | drivers/char/stallion.c | tty->driver_data = portp; |
tty | 713 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 718 | drivers/char/stallion.c | clear_bit(TTY_IO_ERROR, &tty->flags); |
tty | 740 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPCALLOUT) { |
tty | 764 | drivers/char/stallion.c | if (tty->driver.subtype == STL_DRVTYPSERIAL) |
tty | 765 | drivers/char/stallion.c | *tty->termios = portp->normaltermios; |
tty | 767 | drivers/char/stallion.c | *tty->termios = portp->callouttermios; |
tty | 768 | drivers/char/stallion.c | stl_setport(portp, tty->termios); |
tty | 812 | drivers/char/stallion.c | ((portp->tty->termios->c_cflag & CLOCAL) || |
tty | 833 | drivers/char/stallion.c | static void stl_close(struct tty_struct *tty, struct file *filp) |
tty | 839 | drivers/char/stallion.c | printk("stl_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); |
tty | 842 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 861 | drivers/char/stallion.c | portp->normaltermios = *tty->termios; |
tty | 863 | drivers/char/stallion.c | portp->callouttermios = *tty->termios; |
tty | 870 | drivers/char/stallion.c | tty->closing = 1; |
tty | 873 | drivers/char/stallion.c | tty_wait_until_sent(tty, portp->closing_wait); |
tty | 878 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 881 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 889 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 890 | drivers/char/stallion.c | if (tty->ldisc.flush_buffer) |
tty | 891 | drivers/char/stallion.c | (tty->ldisc.flush_buffer)(tty); |
tty | 893 | drivers/char/stallion.c | tty->closing = 0; |
tty | 894 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 895 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 935 | drivers/char/stallion.c | static int stl_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
tty | 944 | 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 | 947 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (stl_tmpwritebuf == (char *) NULL)) |
tty | 949 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1012 | drivers/char/stallion.c | static void stl_putchar(struct tty_struct *tty, unsigned char ch) |
tty | 1019 | drivers/char/stallion.c | printk("stl_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); |
tty | 1022 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1024 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1052 | drivers/char/stallion.c | static void stl_flushchars(struct tty_struct *tty) |
tty | 1057 | drivers/char/stallion.c | printk("stl_flushchars(tty=%x)\n", (int) tty); |
tty | 1060 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1062 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1069 | drivers/char/stallion.c | if (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail)) |
tty | 1077 | drivers/char/stallion.c | static int stl_writeroom(struct tty_struct *tty) |
tty | 1083 | drivers/char/stallion.c | printk("stl_writeroom(tty=%x)\n", (int) tty); |
tty | 1086 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1088 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1110 | drivers/char/stallion.c | static int stl_charsinbuffer(struct tty_struct *tty) |
tty | 1117 | drivers/char/stallion.c | printk("stl_charsinbuffer(tty=%x)\n", (int) tty); |
tty | 1120 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1122 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1199 | drivers/char/stallion.c | stl_setport(portp, portp->tty->termios); |
tty | 1205 | drivers/char/stallion.c | static int stl_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
tty | 1211 | drivers/char/stallion.c | printk("stl_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", (int) tty, (int) file, cmd, (int) arg); |
tty | 1214 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1216 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1224 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1225 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1231 | drivers/char/stallion.c | if ((rc = tty_check_change(tty)) == 0) { |
tty | 1232 | drivers/char/stallion.c | tty_wait_until_sent(tty, 0); |
tty | 1238 | drivers/char/stallion.c | put_fs_long(((tty->termios->c_cflag & CLOCAL) ? 1 : 0), (unsigned long *) arg); |
tty | 1243 | drivers/char/stallion.c | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); |
tty | 1295 | drivers/char/stallion.c | static void stl_settermios(struct tty_struct *tty, struct termios *old) |
tty | 1301 | drivers/char/stallion.c | printk("stl_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); |
tty | 1304 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1306 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1310 | drivers/char/stallion.c | tiosp = tty->termios; |
tty | 1317 | drivers/char/stallion.c | tty->hw_stopped = 0; |
tty | 1318 | drivers/char/stallion.c | stl_start(tty); |
tty | 1331 | drivers/char/stallion.c | static void stl_throttle(struct tty_struct *tty) |
tty | 1337 | drivers/char/stallion.c | printk("stl_throttle(tty=%x)\n", (int) tty); |
tty | 1340 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1342 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1350 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1355 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1369 | drivers/char/stallion.c | static void stl_unthrottle(struct tty_struct *tty) |
tty | 1375 | drivers/char/stallion.c | printk("stl_unthrottle(tty=%x)\n", (int) tty); |
tty | 1378 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1380 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1388 | drivers/char/stallion.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1399 | drivers/char/stallion.c | if (tty->termios->c_cflag & CRTSCTS) { |
tty | 1414 | drivers/char/stallion.c | static void stl_stop(struct tty_struct *tty) |
tty | 1419 | drivers/char/stallion.c | printk("stl_stop(tty=%x)\n", (int) tty); |
tty | 1422 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1424 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1437 | drivers/char/stallion.c | static void stl_start(struct tty_struct *tty) |
tty | 1442 | drivers/char/stallion.c | printk("stl_start(tty=%x)\n", (int) tty); |
tty | 1445 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1447 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1462 | drivers/char/stallion.c | static void stl_hangup(struct tty_struct *tty) |
tty | 1467 | drivers/char/stallion.c | printk("stl_hangup(tty=%x)\n", (int) tty); |
tty | 1470 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1472 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1478 | drivers/char/stallion.c | if (tty->termios->c_cflag & HUPCL) |
tty | 1481 | drivers/char/stallion.c | stl_flushbuffer(tty); |
tty | 1483 | drivers/char/stallion.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1490 | drivers/char/stallion.c | tty->driver_data = (void *) NULL; |
tty | 1491 | drivers/char/stallion.c | portp->tty = (struct tty_struct *) NULL; |
tty | 1499 | drivers/char/stallion.c | static void stl_flushbuffer(struct tty_struct *tty) |
tty | 1505 | drivers/char/stallion.c | printk("stl_flushbuffer(tty=%x)\n", (int) tty); |
tty | 1508 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1510 | drivers/char/stallion.c | portp = tty->driver_data; |
tty | 1525 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1526 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1527 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1670 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1686 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1691 | drivers/char/stallion.c | if ((tty == (struct tty_struct *) NULL) || (tty->flip.char_buf_ptr == (char *) NULL) || |
tty | 1692 | drivers/char/stallion.c | ((buflen = TTY_FLIPBUF_SIZE - tty->flip.count) == 0)) { |
tty | 1699 | drivers/char/stallion.c | insb((ioaddr + EREG_DATA), tty->flip.char_buf_ptr, len); |
tty | 1700 | drivers/char/stallion.c | memset(tty->flip.flag_buf_ptr, 0, len); |
tty | 1701 | drivers/char/stallion.c | tty->flip.flag_buf_ptr += len; |
tty | 1702 | drivers/char/stallion.c | tty->flip.char_buf_ptr += len; |
tty | 1703 | drivers/char/stallion.c | tty->flip.count += len; |
tty | 1704 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1711 | drivers/char/stallion.c | if ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) { |
tty | 1717 | drivers/char/stallion.c | do_SAK(tty); |
tty | 1731 | drivers/char/stallion.c | if (tty->flip.char_buf_ptr != (char *) NULL) { |
tty | 1732 | drivers/char/stallion.c | if (tty->flip.count < TTY_FLIPBUF_SIZE) { |
tty | 1733 | drivers/char/stallion.c | *tty->flip.flag_buf_ptr++ = status; |
tty | 1734 | drivers/char/stallion.c | *tty->flip.char_buf_ptr++ = ch; |
tty | 1735 | drivers/char/stallion.c | tty->flip.count++; |
tty | 1737 | drivers/char/stallion.c | tty_schedule_flip(tty); |
tty | 1936 | drivers/char/stallion.c | struct tty_struct *tty; |
tty | 1946 | drivers/char/stallion.c | tty = portp->tty; |
tty | 1947 | drivers/char/stallion.c | if (tty == (struct tty_struct *) NULL) |
tty | 1951 | drivers/char/stallion.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) |
tty | 1952 | drivers/char/stallion.c | (tty->ldisc.write_wakeup)(tty); |
tty | 1953 | drivers/char/stallion.c | wake_up_interruptible(&tty->write_wait); |
tty | 1964 | drivers/char/stallion.c | tty_hangup(tty); |
tty | 96 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty); |
tty | 119 | drivers/char/tty_io.c | char *_tty_name(struct tty_struct *tty, char *buf) |
tty | 121 | drivers/char/tty_io.c | if (tty) |
tty | 122 | drivers/char/tty_io.c | sprintf(buf, "%s%d", tty->driver.name, |
tty | 123 | drivers/char/tty_io.c | MINOR(tty->device) - tty->driver.minor_start + |
tty | 124 | drivers/char/tty_io.c | tty->driver.name_base); |
tty | 130 | drivers/char/tty_io.c | char *tty_name(struct tty_struct *tty) |
tty | 134 | drivers/char/tty_io.c | return(_tty_name(tty, buf)); |
tty | 137 | drivers/char/tty_io.c | inline int tty_paranoia_check(struct tty_struct *tty, dev_t device, |
tty | 146 | drivers/char/tty_io.c | if (!tty) { |
tty | 150 | drivers/char/tty_io.c | if (tty->magic != TTY_MAGIC) { |
tty | 158 | drivers/char/tty_io.c | static int check_tty_count(struct tty_struct *tty, const char *routine) |
tty | 167 | drivers/char/tty_io.c | if (f->private_data == tty) { |
tty | 171 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 172 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_SLAVE && |
tty | 173 | drivers/char/tty_io.c | tty->link && tty->link->count) |
tty | 175 | drivers/char/tty_io.c | if (tty->count != count) { |
tty | 177 | drivers/char/tty_io.c | MAJOR(tty->device), MINOR(tty->device), tty->count, |
tty | 201 | drivers/char/tty_io.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc) |
tty | 210 | drivers/char/tty_io.c | if (tty->ldisc.num == ldisc) |
tty | 212 | drivers/char/tty_io.c | o_ldisc = tty->ldisc; |
tty | 214 | drivers/char/tty_io.c | tty_wait_until_sent(tty, 0); |
tty | 217 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 218 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 221 | drivers/char/tty_io.c | tty->ldisc = ldiscs[ldisc]; |
tty | 222 | drivers/char/tty_io.c | tty->termios->c_line = ldisc; |
tty | 223 | drivers/char/tty_io.c | if (tty->ldisc.open) |
tty | 224 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 226 | drivers/char/tty_io.c | tty->ldisc = o_ldisc; |
tty | 227 | drivers/char/tty_io.c | tty->termios->c_line = tty->ldisc.num; |
tty | 228 | drivers/char/tty_io.c | if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) { |
tty | 229 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 230 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 231 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 232 | drivers/char/tty_io.c | int r = tty->ldisc.open(tty); |
tty | 237 | drivers/char/tty_io.c | tty_name(tty), r); |
tty | 241 | drivers/char/tty_io.c | if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc) |
tty | 242 | drivers/char/tty_io.c | tty->driver.set_ldisc(tty); |
tty | 274 | drivers/char/tty_io.c | int tty_check_change(struct tty_struct * tty) |
tty | 276 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 278 | drivers/char/tty_io.c | if (tty->pgrp <= 0) { |
tty | 282 | drivers/char/tty_io.c | if (current->pgrp == tty->pgrp) |
tty | 346 | drivers/char/tty_io.c | void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) |
tty | 352 | drivers/char/tty_io.c | if (!tty) |
tty | 354 | drivers/char/tty_io.c | check_tty_count(tty, "do_tty_hangup"); |
tty | 358 | drivers/char/tty_io.c | if (filp->private_data != tty) |
tty | 368 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 369 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 370 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 371 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 372 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 373 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 374 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 375 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 376 | drivers/char/tty_io.c | wake_up_interruptible(&tty->read_wait); |
tty | 382 | drivers/char/tty_io.c | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
tty | 383 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 384 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 385 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 386 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 387 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 388 | drivers/char/tty_io.c | i = (tty->ldisc.open)(tty); |
tty | 396 | drivers/char/tty_io.c | if ((tty->session > 0) && (p->session == tty->session) && |
tty | 400 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 401 | drivers/char/tty_io.c | p->tty_old_pgrp = tty->pgrp; |
tty | 403 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 404 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 406 | drivers/char/tty_io.c | tty->flags = 0; |
tty | 407 | drivers/char/tty_io.c | tty->session = 0; |
tty | 408 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 409 | drivers/char/tty_io.c | tty->ctrl_status = 0; |
tty | 410 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) |
tty | 411 | drivers/char/tty_io.c | *tty->termios = tty->driver.init_termios; |
tty | 412 | drivers/char/tty_io.c | if (tty->driver.hangup) |
tty | 413 | drivers/char/tty_io.c | (tty->driver.hangup)(tty); |
tty | 416 | drivers/char/tty_io.c | void tty_hangup(struct tty_struct * tty) |
tty | 419 | drivers/char/tty_io.c | printk("%s hangup...\n", tty_name(tty)); |
tty | 421 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 424 | drivers/char/tty_io.c | void tty_vhangup(struct tty_struct * tty) |
tty | 427 | drivers/char/tty_io.c | printk("%s vhangup...\n", tty_name(tty)); |
tty | 429 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 449 | drivers/char/tty_io.c | struct tty_struct *tty = current->tty; |
tty | 452 | drivers/char/tty_io.c | if (!tty) { |
tty | 459 | drivers/char/tty_io.c | if (tty->pgrp > 0) { |
tty | 460 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGHUP, priv); |
tty | 461 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGCONT, priv); |
tty | 465 | drivers/char/tty_io.c | tty->session = 0; |
tty | 466 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 470 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 656 | drivers/char/tty_io.c | void stop_tty(struct tty_struct *tty) |
tty | 658 | drivers/char/tty_io.c | if (tty->stopped) |
tty | 660 | drivers/char/tty_io.c | tty->stopped = 1; |
tty | 661 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 662 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_START; |
tty | 663 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_STOP; |
tty | 664 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 666 | drivers/char/tty_io.c | if (tty->driver.stop) |
tty | 667 | drivers/char/tty_io.c | (tty->driver.stop)(tty); |
tty | 670 | drivers/char/tty_io.c | void start_tty(struct tty_struct *tty) |
tty | 672 | drivers/char/tty_io.c | if (!tty->stopped) |
tty | 674 | drivers/char/tty_io.c | tty->stopped = 0; |
tty | 675 | drivers/char/tty_io.c | if (tty->link && tty->link->packet) { |
tty | 676 | drivers/char/tty_io.c | tty->ctrl_status &= ~TIOCPKT_STOP; |
tty | 677 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_START; |
tty | 678 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->read_wait); |
tty | 680 | drivers/char/tty_io.c | if (tty->driver.start) |
tty | 681 | drivers/char/tty_io.c | (tty->driver.start)(tty); |
tty | 682 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && |
tty | 683 | drivers/char/tty_io.c | tty->ldisc.write_wakeup) |
tty | 684 | drivers/char/tty_io.c | (tty->ldisc.write_wakeup)(tty); |
tty | 685 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_wait); |
tty | 691 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 693 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 694 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) |
tty | 696 | drivers/char/tty_io.c | if (!tty || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 705 | drivers/char/tty_io.c | (tty->pgrp > 0) && |
tty | 706 | drivers/char/tty_io.c | (current->tty == tty) && |
tty | 707 | drivers/char/tty_io.c | (tty->pgrp != current->pgrp)) |
tty | 715 | drivers/char/tty_io.c | if (tty->ldisc.read) |
tty | 717 | drivers/char/tty_io.c | i = (tty->ldisc.read)(tty,file,(unsigned char *)buf,(unsigned int)count); |
tty | 728 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 733 | drivers/char/tty_io.c | tty = redirect; |
tty | 735 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 736 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) |
tty | 738 | drivers/char/tty_io.c | if (!tty || !tty->driver.write || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 741 | drivers/char/tty_io.c | if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) && |
tty | 742 | drivers/char/tty_io.c | (current->tty == tty) && (tty->pgrp != current->pgrp)) { |
tty | 751 | drivers/char/tty_io.c | if (tty->ldisc.write) |
tty | 753 | drivers/char/tty_io.c | i = (tty->ldisc.write)(tty,file,(const unsigned char *)buf,(unsigned int)count); |
tty | 768 | drivers/char/tty_io.c | struct tty_struct *tty, **tty_loc, *o_tty, **o_tty_loc; |
tty | 780 | drivers/char/tty_io.c | tty = o_tty = NULL; |
tty | 797 | drivers/char/tty_io.c | if (!*tty_loc && !tty) { |
tty | 798 | drivers/char/tty_io.c | if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL))) |
tty | 800 | drivers/char/tty_io.c | initialize_tty_struct(tty); |
tty | 801 | drivers/char/tty_io.c | tty->device = device; |
tty | 802 | drivers/char/tty_io.c | tty->driver = *driver; |
tty | 868 | drivers/char/tty_io.c | tty->termios = *tp_loc; |
tty | 869 | drivers/char/tty_io.c | tty->termios_locked = *ltp_loc; |
tty | 870 | drivers/char/tty_io.c | *tty_loc = tty; |
tty | 873 | drivers/char/tty_io.c | if (tty->ldisc.open) { |
tty | 874 | drivers/char/tty_io.c | retval = (tty->ldisc.open)(tty); |
tty | 877 | drivers/char/tty_io.c | tty = NULL; |
tty | 881 | drivers/char/tty_io.c | tty = NULL; |
tty | 924 | drivers/char/tty_io.c | if (tty) |
tty | 925 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 946 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 951 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 952 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev")) |
tty | 955 | drivers/char/tty_io.c | check_tty_count(tty, "release_dev"); |
tty | 959 | drivers/char/tty_io.c | tp = tty->termios; |
tty | 960 | drivers/char/tty_io.c | ltp = tty->termios_locked; |
tty | 962 | drivers/char/tty_io.c | idx = MINOR(tty->device) - tty->driver.minor_start; |
tty | 964 | drivers/char/tty_io.c | if (idx < 0 || idx >= tty->driver.num) { |
tty | 966 | drivers/char/tty_io.c | MAJOR(tty->device), MINOR(tty->device)); |
tty | 969 | drivers/char/tty_io.c | if (tty != tty->driver.table[idx]) { |
tty | 971 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 974 | drivers/char/tty_io.c | if (tp != tty->driver.termios[idx]) { |
tty | 976 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 979 | drivers/char/tty_io.c | if (ltp != tty->driver.termios_locked[idx]) { |
tty | 981 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 987 | drivers/char/tty_io.c | printk("release_dev of %s (tty count=%d)...", tty_name(tty), |
tty | 988 | drivers/char/tty_io.c | tty->count); |
tty | 991 | drivers/char/tty_io.c | o_tty = tty->link; |
tty | 996 | drivers/char/tty_io.c | if (tty->driver.other) { |
tty | 997 | drivers/char/tty_io.c | if (o_tty != tty->driver.other->table[idx]) { |
tty | 999 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 1002 | drivers/char/tty_io.c | if (o_tp != tty->driver.other->termios[idx]) { |
tty | 1004 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 1007 | drivers/char/tty_io.c | if (o_ltp != tty->driver.other->termios_locked[idx]) { |
tty | 1009 | drivers/char/tty_io.c | idx, MAJOR(tty->device), MINOR(tty->device)); |
tty | 1013 | drivers/char/tty_io.c | if (o_tty->link != tty) { |
tty | 1020 | drivers/char/tty_io.c | if (tty->driver.close) |
tty | 1021 | drivers/char/tty_io.c | tty->driver.close(tty, filp); |
tty | 1022 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1023 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) { |
tty | 1024 | drivers/char/tty_io.c | if (--tty->link->count < 0) { |
tty | 1026 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1027 | drivers/char/tty_io.c | tty->link->count = 0; |
tty | 1030 | drivers/char/tty_io.c | if (--tty->count < 0) { |
tty | 1032 | drivers/char/tty_io.c | tty->count, tty_name(tty)); |
tty | 1033 | drivers/char/tty_io.c | tty->count = 0; |
tty | 1035 | drivers/char/tty_io.c | if (tty->count) |
tty | 1044 | drivers/char/tty_io.c | tty->driver.other->table[idx] = NULL; |
tty | 1045 | drivers/char/tty_io.c | tty->driver.other->termios[idx] = NULL; |
tty | 1052 | drivers/char/tty_io.c | tty->flags |= (1 << TTY_CLOSING); |
tty | 1061 | drivers/char/tty_io.c | if ((*p)->tty == tty) |
tty | 1062 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1063 | drivers/char/tty_io.c | if (o_tty && (*p)->tty == o_tty) |
tty | 1064 | drivers/char/tty_io.c | (*p)->tty = NULL; |
tty | 1071 | drivers/char/tty_io.c | if (tty->ldisc.close) |
tty | 1072 | drivers/char/tty_io.c | (tty->ldisc.close)(tty); |
tty | 1073 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1074 | drivers/char/tty_io.c | tty->termios->c_line = N_TTY; |
tty | 1081 | drivers/char/tty_io.c | tty->driver.table[idx] = NULL; |
tty | 1082 | drivers/char/tty_io.c | if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) { |
tty | 1083 | drivers/char/tty_io.c | tty->driver.termios[idx] = NULL; |
tty | 1086 | drivers/char/tty_io.c | if (tty == redirect || o_tty == redirect) |
tty | 1093 | drivers/char/tty_io.c | if (tty->flip.tqueue.sync) { |
tty | 1097 | drivers/char/tty_io.c | if (tq == &tty->flip.tqueue) { |
tty | 1107 | drivers/char/tty_io.c | tty->magic = 0; |
tty | 1108 | drivers/char/tty_io.c | (*tty->driver.refcount)--; |
tty | 1109 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1132 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 1141 | drivers/char/tty_io.c | if (!current->tty) |
tty | 1143 | drivers/char/tty_io.c | device = current->tty->device; |
tty | 1152 | drivers/char/tty_io.c | retval = init_dev(device, &tty); |
tty | 1155 | drivers/char/tty_io.c | filp->private_data = tty; |
tty | 1156 | drivers/char/tty_io.c | check_tty_count(tty, "tty_open"); |
tty | 1157 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1158 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1161 | drivers/char/tty_io.c | printk("opening %s...", tty_name(tty)); |
tty | 1163 | drivers/char/tty_io.c | if (tty->driver.open) |
tty | 1164 | drivers/char/tty_io.c | retval = tty->driver.open(tty, filp); |
tty | 1168 | drivers/char/tty_io.c | if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser()) |
tty | 1173 | drivers/char/tty_io.c | printk("error %d in opening %s...", retval, tty_name(tty)); |
tty | 1190 | drivers/char/tty_io.c | !current->tty && |
tty | 1191 | drivers/char/tty_io.c | tty->session == 0) { |
tty | 1192 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1194 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1195 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1212 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1214 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1215 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_select")) |
tty | 1218 | drivers/char/tty_io.c | if (tty->ldisc.select) |
tty | 1219 | drivers/char/tty_io.c | return (tty->ldisc.select)(tty, inode, filp, sel_type, wait); |
tty | 1265 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1268 | drivers/char/tty_io.c | tty = (struct tty_struct *)filp->private_data; |
tty | 1269 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync")) |
tty | 1272 | drivers/char/tty_io.c | retval = fasync_helper(inode, filp, on, &tty->fasync); |
tty | 1277 | drivers/char/tty_io.c | if (!tty->read_wait) |
tty | 1278 | drivers/char/tty_io.c | tty->minimum_to_wake = 1; |
tty | 1280 | drivers/char/tty_io.c | if (tty->pgrp) |
tty | 1281 | drivers/char/tty_io.c | filp->f_owner = -tty->pgrp; |
tty | 1286 | drivers/char/tty_io.c | if (!tty->fasync && !tty->read_wait) |
tty | 1287 | drivers/char/tty_io.c | tty->minimum_to_wake = N_TTY_BUF_SIZE; |
tty | 1330 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1337 | drivers/char/tty_io.c | tty = (struct tty_struct *)file->private_data; |
tty | 1338 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) |
tty | 1341 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_PTY && |
tty | 1342 | drivers/char/tty_io.c | tty->driver.subtype == PTY_TYPE_MASTER) |
tty | 1343 | drivers/char/tty_io.c | real_tty = tty->link; |
tty | 1345 | drivers/char/tty_io.c | real_tty = tty; |
tty | 1349 | drivers/char/tty_io.c | if ((current->tty != tty) && !suser()) |
tty | 1355 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, &ch, &mbz, 1); |
tty | 1362 | drivers/char/tty_io.c | memcpy_tofs((struct winsize *) arg, &tty->winsize, |
tty | 1372 | drivers/char/tty_io.c | if (memcmp(&tmp_ws, &tty->winsize, |
tty | 1374 | drivers/char/tty_io.c | if (tty->pgrp > 0) |
tty | 1375 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGWINCH, 1); |
tty | 1376 | drivers/char/tty_io.c | if ((real_tty->pgrp != tty->pgrp) && |
tty | 1380 | drivers/char/tty_io.c | tty->winsize = tmp_ws; |
tty | 1384 | drivers/char/tty_io.c | if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) { |
tty | 1405 | drivers/char/tty_io.c | set_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1408 | drivers/char/tty_io.c | clear_bit(TTY_EXCLUSIVE, &tty->flags); |
tty | 1411 | drivers/char/tty_io.c | if (current->tty != tty) |
tty | 1415 | drivers/char/tty_io.c | current->tty = NULL; |
tty | 1419 | drivers/char/tty_io.c | (current->session == tty->session)) |
tty | 1425 | drivers/char/tty_io.c | if (!current->leader || current->tty) |
tty | 1427 | drivers/char/tty_io.c | if (tty->session > 0) { |
tty | 1439 | drivers/char/tty_io.c | if (p->tty == tty) |
tty | 1440 | drivers/char/tty_io.c | p->tty = NULL; |
tty | 1444 | drivers/char/tty_io.c | current->tty = tty; |
tty | 1446 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1447 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1454 | drivers/char/tty_io.c | if (tty == real_tty && current->tty != real_tty) |
tty | 1466 | drivers/char/tty_io.c | if (!current->tty || |
tty | 1467 | drivers/char/tty_io.c | (current->tty != real_tty) || |
tty | 1482 | drivers/char/tty_io.c | put_user(tty->ldisc.num, (int *) arg); |
tty | 1485 | drivers/char/tty_io.c | retval = tty_check_change(tty); |
tty | 1489 | drivers/char/tty_io.c | return tty_set_ldisc(tty, arg); |
tty | 1491 | drivers/char/tty_io.c | if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE) |
tty | 1493 | drivers/char/tty_io.c | if (current->tty != tty && !suser()) |
tty | 1511 | drivers/char/tty_io.c | return set_selection(arg, tty); |
tty | 1513 | drivers/char/tty_io.c | return paste_selection(tty); |
tty | 1544 | drivers/char/tty_io.c | tty, sizeof(struct tty_struct)); |
tty | 1547 | drivers/char/tty_io.c | if (tty->driver.ioctl) { |
tty | 1548 | drivers/char/tty_io.c | retval = (tty->driver.ioctl)(tty, file, |
tty | 1553 | drivers/char/tty_io.c | if (tty->ldisc.ioctl) { |
tty | 1554 | drivers/char/tty_io.c | retval = (tty->ldisc.ioctl)(tty, file, |
tty | 1576 | drivers/char/tty_io.c | void do_SAK( struct tty_struct *tty) |
tty | 1579 | drivers/char/tty_io.c | tty_hangup(tty); |
tty | 1586 | drivers/char/tty_io.c | if (!tty) |
tty | 1588 | drivers/char/tty_io.c | session = tty->session; |
tty | 1589 | drivers/char/tty_io.c | if (tty->ldisc.flush_buffer) |
tty | 1590 | drivers/char/tty_io.c | tty->ldisc.flush_buffer(tty); |
tty | 1591 | drivers/char/tty_io.c | if (tty->driver.flush_buffer) |
tty | 1592 | drivers/char/tty_io.c | tty->driver.flush_buffer(tty); |
tty | 1596 | drivers/char/tty_io.c | if (((*p)->tty == tty) || |
tty | 1603 | drivers/char/tty_io.c | (filp->private_data == tty)) { |
tty | 1619 | drivers/char/tty_io.c | struct tty_struct *tty = (struct tty_struct *) private_; |
tty | 1624 | drivers/char/tty_io.c | if (tty->flip.buf_num) { |
tty | 1625 | drivers/char/tty_io.c | cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1626 | drivers/char/tty_io.c | fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1627 | drivers/char/tty_io.c | tty->flip.buf_num = 0; |
tty | 1630 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1631 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1633 | drivers/char/tty_io.c | cp = tty->flip.char_buf; |
tty | 1634 | drivers/char/tty_io.c | fp = tty->flip.flag_buf; |
tty | 1635 | drivers/char/tty_io.c | tty->flip.buf_num = 1; |
tty | 1638 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE; |
tty | 1639 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; |
tty | 1641 | drivers/char/tty_io.c | count = tty->flip.count; |
tty | 1642 | drivers/char/tty_io.c | tty->flip.count = 0; |
tty | 1646 | drivers/char/tty_io.c | if (count > tty->max_flip_cnt) |
tty | 1647 | drivers/char/tty_io.c | tty->max_flip_cnt = count; |
tty | 1649 | drivers/char/tty_io.c | tty->ldisc.receive_buf(tty, cp, fp, count); |
tty | 1655 | drivers/char/tty_io.c | static void initialize_tty_struct(struct tty_struct *tty) |
tty | 1657 | drivers/char/tty_io.c | memset(tty, 0, sizeof(struct tty_struct)); |
tty | 1658 | drivers/char/tty_io.c | tty->magic = TTY_MAGIC; |
tty | 1659 | drivers/char/tty_io.c | tty->ldisc = ldiscs[N_TTY]; |
tty | 1660 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 1661 | drivers/char/tty_io.c | tty->flip.char_buf_ptr = tty->flip.char_buf; |
tty | 1662 | drivers/char/tty_io.c | tty->flip.flag_buf_ptr = tty->flip.flag_buf; |
tty | 1663 | drivers/char/tty_io.c | tty->flip.tqueue.routine = flush_to_ldisc; |
tty | 1664 | drivers/char/tty_io.c | tty->flip.tqueue.data = tty; |
tty | 1670 | drivers/char/tty_io.c | void tty_default_put_char(struct tty_struct *tty, unsigned char ch) |
tty | 1672 | 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 | 120 | drivers/char/vt.c | if ( p->tty && MAJOR(p->tty->device) == TTY_MAJOR && |
tty | 121 | drivers/char/vt.c | MINOR(p->tty->device) <= MAX_NR_CONSOLES && MINOR(p->tty->device) ) |
tty | 183 | drivers/char/vt.c | int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 190 | drivers/char/vt.c | struct vt_struct *vt = (struct vt_struct *)tty->driver_data; |
tty | 202 | drivers/char/vt.c | if (current->tty == tty || suser()) |
tty | 321 | drivers/char/vt.c | if (tty->ldisc.flush_buffer) |
tty | 322 | drivers/char/vt.c | tty->ldisc.flush_buffer(tty); |
tty | 107 | drivers/net/ppp.c | #define ppp_find(tty) ((struct ppp *) tty->disc_data) |
tty | 147 | drivers/net/ppp.c | static int ppp_select(struct tty_struct *tty, struct inode * inode, |
tty | 153 | drivers/net/ppp.c | static int ppp_receive_room(struct tty_struct *tty); |
tty | 154 | drivers/net/ppp.c | static void ppp_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
tty | 156 | drivers/net/ppp.c | static void ppp_write_wakeup(struct tty_struct *tty); |
tty | 264 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 465 | drivers/net/ppp.c | if (ppp->tty != NULL && ppp->tty->disc_data == ppp) |
tty | 466 | drivers/net/ppp.c | ppp->tty->disc_data = NULL; /* Break the tty->ppp link */ |
tty | 490 | drivers/net/ppp.c | ppp->tty = NULL; |
tty | 494 | drivers/net/ppp.c | ppp_close(struct tty_struct *tty) |
tty | 496 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 513 | drivers/net/ppp.c | ppp_open(struct tty_struct *tty) |
tty | 515 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 532 | drivers/net/ppp.c | ppp->tty = tty; |
tty | 535 | drivers/net/ppp.c | tty->disc_data = ppp; |
tty | 536 | drivers/net/ppp.c | if (tty->driver.flush_buffer) |
tty | 537 | drivers/net/ppp.c | tty->driver.flush_buffer(tty); |
tty | 538 | drivers/net/ppp.c | if (tty->ldisc.flush_buffer) |
tty | 539 | drivers/net/ppp.c | tty->ldisc.flush_buffer(tty); |
tty | 541 | drivers/net/ppp.c | tty_read_flush (tty); |
tty | 542 | drivers/net/ppp.c | tty_write_flush (tty); |
tty | 589 | drivers/net/ppp.c | if (ppp->tty == NULL) { |
tty | 607 | drivers/net/ppp.c | if (ppp->tty == NULL) { |
tty | 685 | drivers/net/ppp.c | answer = tty_write_data (ppp->tty, |
tty | 709 | drivers/net/ppp.c | actual = ppp->tty->driver.write(ppp->tty, 0, ppp->xbuff, count); |
tty | 715 | drivers/net/ppp.c | ppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 719 | drivers/net/ppp.c | static void ppp_write_wakeup(struct tty_struct *tty) |
tty | 722 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 744 | drivers/net/ppp.c | actual = tty->driver.write(tty, 0, ppp->xtail, count); |
tty | 748 | drivers/net/ppp.c | tty->flags &= ~TTY_DO_WRITE_WAKEUP; |
tty | 793 | drivers/net/ppp.c | ppp_dump_inqueue(struct tty_struct *tty) |
tty | 795 | drivers/net/ppp.c | int head = tty->read_q.head, |
tty | 796 | drivers/net/ppp.c | tail = tty->read_q.tail, |
tty | 801 | drivers/net/ppp.c | (unsigned int) tty->termios->c_iflag)) |
tty | 807 | drivers/net/ppp.c | buffer [count] = tty->read_q.buf[i]; |
tty | 820 | drivers/net/ppp.c | void ppp_tty_input_ready(struct tty_struct *tty) |
tty | 822 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 837 | drivers/net/ppp.c | ppp_dump_inqueue(ppp->tty); |
tty | 840 | drivers/net/ppp.c | n = tty_read_raw_data(tty, buff, 128); |
tty | 915 | drivers/net/ppp.c | static int ppp_receive_room(struct tty_struct *tty) |
tty | 921 | drivers/net/ppp.c | static void ppp_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
tty | 924 | drivers/net/ppp.c | register struct ppp *ppp = ppp_find (tty); |
tty | 1206 | drivers/net/ppp.c | kill_fasync(ppp->tty->fasync, SIGIO); |
tty | 1241 | drivers/net/ppp.c | ppp_read(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr) |
tty | 1243 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 1320 | drivers/net/ppp.c | ppp = ppp_find(tty); |
tty | 1353 | drivers/net/ppp.c | ppp_write(struct tty_struct *tty, struct file *file, const unsigned char *buf, unsigned int nr) |
tty | 1355 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 1390 | drivers/net/ppp.c | ppp = ppp_find(tty); |
tty | 1438 | drivers/net/ppp.c | ppp_ioctl(struct tty_struct *tty, struct file *file, unsigned int i, |
tty | 1441 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
tty | 1637 | drivers/net/ppp.c | error = n_tty_ioctl(tty, file, i, l); |
tty | 1660 | drivers/net/ppp.c | ppp_select (struct tty_struct *tty, struct inode * inode, |
tty | 1663 | drivers/net/ppp.c | struct ppp *ppp = ppp_find (tty); |
tty | 1687 | drivers/net/ppp.c | if (tty->packet && tty->link->ctrl_status) |
tty | 1691 | drivers/net/ppp.c | if (tty->flags & (1 << TTY_SLAVE_CLOSED)) |
tty | 1726 | drivers/net/ppp.c | struct tty_struct *tty; |
tty | 1740 | drivers/net/ppp.c | tty = ppp->tty; |
tty | 1755 | drivers/net/ppp.c | if (tty == NULL) { |
tty | 1938 | drivers/net/ppp.c | ppp_find(struct tty_struct *tty) |
tty | 1942 | drivers/net/ppp.c | if (ppp_ctrl[i].inuse && (ppp_ctrl[i].tty == tty)) return &ppp_ctrl[i]; |
tty | 143 | drivers/net/slip.c | slp->ctrl.tty = NULL; |
tty | 441 | drivers/net/slip.c | sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
tty | 442 | drivers/net/slip.c | actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count); |
tty | 454 | drivers/net/slip.c | static void slip_write_wakeup(struct tty_struct *tty) |
tty | 457 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 468 | drivers/net/slip.c | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 474 | drivers/net/slip.c | actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft); |
tty | 509 | drivers/net/slip.c | (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ? |
tty | 512 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 574 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 657 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 660 | drivers/net/slip.c | sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); |
tty | 670 | drivers/net/slip.c | slip_receive_room(struct tty_struct *tty) |
tty | 682 | drivers/net/slip.c | slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) |
tty | 684 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 727 | drivers/net/slip.c | slip_open(struct tty_struct *tty) |
tty | 729 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 742 | drivers/net/slip.c | sl->tty = tty; |
tty | 743 | drivers/net/slip.c | tty->disc_data = sl; |
tty | 744 | drivers/net/slip.c | if (tty->driver.flush_buffer) { |
tty | 745 | drivers/net/slip.c | tty->driver.flush_buffer(tty); |
tty | 747 | drivers/net/slip.c | if (tty->ldisc.flush_buffer) { |
tty | 748 | drivers/net/slip.c | tty->ldisc.flush_buffer(tty); |
tty | 780 | drivers/net/slip.c | slip_close(struct tty_struct *tty) |
tty | 782 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 791 | drivers/net/slip.c | tty->disc_data = 0; |
tty | 792 | drivers/net/slip.c | sl->tty = NULL; |
tty | 1016 | drivers/net/slip.c | slip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) |
tty | 1018 | drivers/net/slip.c | struct slip *sl = (struct slip *) tty->disc_data; |
tty | 1098 | drivers/net/slip.c | return n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg); |
tty | 1108 | drivers/net/slip.c | if(sl->tty==NULL) |
tty | 50 | drivers/net/slip.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 589 | fs/open.c | if (current->tty) |
tty | 590 | fs/open.c | tty_vhangup(current->tty); |
tty | 436 | fs/proc/array.c | if (tsk->tty) |
tty | 437 | fs/proc/array.c | tty_pgrp = tsk->tty->pgrp; |
tty | 449 | fs/proc/array.c | tsk->tty ? tsk->tty->device : 0, |
tty | 56 | include/linux/cyclades.h | struct tty_struct *tty; |
tty | 193 | include/linux/if_ppp.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 229 | include/linux/scc.h | struct tty_struct *tty; /* link to tty control structure */ |
tty | 202 | include/linux/sched.h | struct tty_struct *tty; /* NULL if no tty */ |
tty | 118 | 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 | 291 | include/linux/tty.h | extern int tty_paranoia_check(struct tty_struct *tty, dev_t device, |
tty | 293 | include/linux/tty.h | extern char *_tty_name(struct tty_struct *tty, char *buf); |
tty | 294 | include/linux/tty.h | extern char *tty_name(struct tty_struct *tty); |
tty | 295 | include/linux/tty.h | extern void tty_wait_until_sent(struct tty_struct * tty, int timeout); |
tty | 296 | include/linux/tty.h | extern int tty_check_change(struct tty_struct * tty); |
tty | 297 | include/linux/tty.h | extern void stop_tty(struct tty_struct * tty); |
tty | 298 | include/linux/tty.h | extern void start_tty(struct tty_struct * tty); |
tty | 302 | include/linux/tty.h | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
tty | 307 | include/linux/tty.h | extern int tty_signal(int sig, struct tty_struct *tty); |
tty | 308 | include/linux/tty.h | extern void tty_hangup(struct tty_struct * tty); |
tty | 309 | include/linux/tty.h | extern void tty_vhangup(struct tty_struct * tty); |
tty | 312 | include/linux/tty.h | extern void do_SAK(struct tty_struct *tty); |
tty | 319 | include/linux/tty.h | extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, |
tty | 324 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
tty | 328 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
tty | 332 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
tty | 337 | 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 | 536 | kernel/sys.c | current->tty = NULL; |