tag | line | file | source code |
tty | 61 | drivers/char/console.c | int paste_selection(struct tty_struct *tty); |
tty | 666 | drivers/char/console.c | static void respond_string(char * p, int currcons, struct tty_struct * tty) |
tty | 669 | drivers/char/console.c | put_tty_queue(*p, &tty->read_q); |
tty | 672 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 675 | drivers/char/console.c | static void respond_num(unsigned int n, int currcons, struct tty_struct * tty) |
tty | 685 | drivers/char/console.c | put_tty_queue(buff[i], &tty->read_q); |
tty | 690 | drivers/char/console.c | static void cursor_report(int currcons, struct tty_struct * tty) |
tty | 692 | drivers/char/console.c | put_tty_queue('\033', &tty->read_q); |
tty | 693 | drivers/char/console.c | put_tty_queue('[', &tty->read_q); |
tty | 694 | drivers/char/console.c | respond_num(y + (decom ? top+1 : 1), currcons, tty); |
tty | 695 | drivers/char/console.c | put_tty_queue(';', &tty->read_q); |
tty | 696 | drivers/char/console.c | respond_num(x+1, currcons, tty); |
tty | 697 | drivers/char/console.c | put_tty_queue('R', &tty->read_q); |
tty | 698 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 701 | drivers/char/console.c | static inline void status_report(int currcons, struct tty_struct * tty) |
tty | 703 | drivers/char/console.c | respond_string("\033[0n", currcons, tty); /* Terminal ok */ |
tty | 706 | drivers/char/console.c | static inline void respond_ID(int currcons, struct tty_struct * tty) |
tty | 708 | drivers/char/console.c | respond_string(VT102ID, currcons, tty); |
tty | 960 | drivers/char/console.c | void con_write(struct tty_struct * tty) |
tty | 965 | drivers/char/console.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 966 | drivers/char/console.c | currcons = tty->line - 1; |
tty | 974 | drivers/char/console.c | if (!EMPTY(&tty->write_q) && currcons == sel_cons) |
tty | 978 | drivers/char/console.c | while (!tty->stopped && (c = get_tty_queue(&tty->write_q)) >= 0) { |
tty | 1066 | drivers/char/console.c | respond_ID(currcons,tty); |
tty | 1127 | drivers/char/console.c | status_report(currcons,tty); |
tty | 1129 | drivers/char/console.c | cursor_report(currcons,tty); |
tty | 1191 | drivers/char/console.c | respond_ID(currcons,tty); |
tty | 1548 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
tty | 1550 | drivers/char/console.c | tty->write = con_write; |
tty | 1551 | drivers/char/console.c | tty->ioctl = vt_ioctl; |
tty | 1552 | drivers/char/console.c | if (tty->line > NR_CONSOLES) |
tty | 1731 | drivers/char/console.c | int paste_selection(struct tty_struct *tty) |
tty | 1740 | drivers/char/console.c | put_tty_queue(*bp, &tty->read_q); |
tty | 1743 | drivers/char/console.c | TTY_READ_FLUSH(tty); |
tty | 80 | drivers/char/keyboard.c | static struct tty_struct * tty = NULL; |
tty | 162 | drivers/char/keyboard.c | tty = TTY_TABLE(0); |
tty | 272 | drivers/char/keyboard.c | (vc_kbd_flag(kbd,VC_REPEAT) && tty && |
tty | 273 | drivers/char/keyboard.c | (L_ECHO(tty) || (EMPTY(&tty->secondary) && EMPTY(&tty->read_q))))) |
tty | 287 | drivers/char/keyboard.c | if (!tty) |
tty | 289 | drivers/char/keyboard.c | qp = &tty->read_q; |
tty | 305 | drivers/char/keyboard.c | if (!tty) |
tty | 307 | drivers/char/keyboard.c | qp = &tty->read_q; |
tty | 368 | drivers/char/keyboard.c | if (rep || !tty) |
tty | 372 | drivers/char/keyboard.c | put_queue(START_CHAR(tty)); |
tty | 375 | drivers/char/keyboard.c | put_queue(STOP_CHAR(tty)); |
tty | 404 | drivers/char/keyboard.c | if (tty) |
tty | 405 | drivers/char/keyboard.c | put_queue(INTR_CHAR(tty)); |
tty | 24 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
tty | 26 | drivers/char/pty.c | if (!tty) |
tty | 28 | drivers/char/pty.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 29 | drivers/char/pty.c | if (tty->count > 1) |
tty | 32 | drivers/char/pty.c | if (tty->count > 2) |
tty | 35 | drivers/char/pty.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 36 | drivers/char/pty.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 37 | drivers/char/pty.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 38 | drivers/char/pty.c | if (!tty->link) |
tty | 40 | drivers/char/pty.c | wake_up_interruptible(&tty->link->secondary.proc_list); |
tty | 41 | drivers/char/pty.c | wake_up_interruptible(&tty->link->read_q.proc_list); |
tty | 42 | drivers/char/pty.c | wake_up_interruptible(&tty->link->write_q.proc_list); |
tty | 43 | drivers/char/pty.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 44 | drivers/char/pty.c | tty_hangup(tty->link); |
tty | 45 | drivers/char/pty.c | flush_input(tty); |
tty | 46 | drivers/char/pty.c | flush_output(tty); |
tty | 80 | drivers/char/pty.c | static void pty_write(struct tty_struct * tty) |
tty | 82 | drivers/char/pty.c | if (tty->link) |
tty | 83 | drivers/char/pty.c | pty_copy(tty,tty->link); |
tty | 86 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
tty | 88 | drivers/char/pty.c | if (!tty || !tty->link) |
tty | 90 | drivers/char/pty.c | if (IS_A_PTY_MASTER(tty->line)) |
tty | 91 | drivers/char/pty.c | clear_bit(TTY_SLAVE_OPENED, &tty->flags); |
tty | 93 | drivers/char/pty.c | set_bit(TTY_SLAVE_OPENED, &tty->link->flags); |
tty | 94 | drivers/char/pty.c | tty->write = tty->link->write = pty_write; |
tty | 95 | drivers/char/pty.c | tty->close = tty->link->close = pty_close; |
tty | 96 | drivers/char/pty.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 99 | drivers/char/pty.c | while (!tty->link->count && !(current->signal & ~current->blocked)) |
tty | 100 | drivers/char/pty.c | interruptible_sleep_on(&tty->link->read_q.proc_list); |
tty | 101 | drivers/char/pty.c | if (!tty->link->count) |
tty | 205 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty, int status); |
tty | 252 | drivers/char/serial.c | static void rs_stop(struct tty_struct *tty) |
tty | 256 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 264 | drivers/char/serial.c | static void rs_start(struct tty_struct *tty) |
tty | 268 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 333 | drivers/char/serial.c | queue = &info->tty->read_q; |
tty | 345 | drivers/char/serial.c | set_bit(head, &info->tty->readq_flags); |
tty | 360 | drivers/char/serial.c | &info->tty->flags)) |
tty | 361 | drivers/char/serial.c | rs_throttle(info->tty, TTY_THROTTLE_RQ_FULL); |
tty | 373 | drivers/char/serial.c | queue = &info->tty->write_q; |
tty | 396 | drivers/char/serial.c | if (info->tty->write_data_cnt) { |
tty | 397 | drivers/char/serial.c | set_bit(info->tty->line, &tty_check_write); |
tty | 413 | drivers/char/serial.c | if ((status & UART_MSR_DDCD) && !C_LOCAL(info->tty)) { |
tty | 423 | drivers/char/serial.c | if (C_RTSCTS(info->tty)) { |
tty | 424 | drivers/char/serial.c | if (info->tty->stopped) { |
tty | 429 | drivers/char/serial.c | info->tty->stopped = 0; |
tty | 430 | drivers/char/serial.c | rs_start(info->tty); |
tty | 438 | drivers/char/serial.c | info->tty->stopped = 1; |
tty | 439 | drivers/char/serial.c | rs_stop(info->tty); |
tty | 481 | drivers/char/serial.c | if (info->tty && |
tty | 493 | drivers/char/serial.c | !info->tty->stopped) { |
tty | 547 | drivers/char/serial.c | do_SAK(info->tty); |
tty | 549 | drivers/char/serial.c | if (I_BRKINT(info->tty)) { |
tty | 550 | drivers/char/serial.c | flush_input(info->tty); |
tty | 551 | drivers/char/serial.c | flush_output(info->tty); |
tty | 552 | drivers/char/serial.c | if (info->tty->pgrp > 0) |
tty | 553 | drivers/char/serial.c | kill_pg(info->tty->pgrp, SIGINT,1); |
tty | 573 | drivers/char/serial.c | if (!info->tty) |
tty | 576 | drivers/char/serial.c | TTY_READ_FLUSH(info->tty); |
tty | 579 | drivers/char/serial.c | wake_up_interruptible(&info->tty->write_q.proc_list); |
tty | 582 | drivers/char/serial.c | tty_hangup(info->tty); |
tty | 795 | drivers/char/serial.c | if (info->tty) |
tty | 796 | drivers/char/serial.c | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 800 | drivers/char/serial.c | if (info->tty && info->tty->termios && I_INPCK(info->tty)) |
tty | 824 | drivers/char/serial.c | if (info->tty && !(info->tty->termios->c_cflag & HUPCL)) |
tty | 832 | drivers/char/serial.c | if (info->tty) |
tty | 833 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &info->tty->flags); |
tty | 852 | drivers/char/serial.c | if (!info->tty || !info->tty->termios) |
tty | 854 | drivers/char/serial.c | cflag = info->tty->termios->c_cflag; |
tty | 930 | drivers/char/serial.c | queue = &info->tty->write_q; |
tty | 949 | drivers/char/serial.c | void rs_write(struct tty_struct * tty) |
tty | 953 | drivers/char/serial.c | if (!tty || tty->stopped) |
tty | 955 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 977 | drivers/char/serial.c | static void rs_throttle(struct tty_struct * tty, int status) |
tty | 985 | drivers/char/serial.c | printk("throttle tty%d: %d (%d, %d)....\n", DEV_TO_SL(tty->line), |
tty | 986 | drivers/char/serial.c | status, LEFT(&tty->read_q), LEFT(&tty->secondary)); |
tty | 990 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 991 | drivers/char/serial.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 992 | drivers/char/serial.c | info->x_char = STOP_CHAR(tty); |
tty | 1000 | drivers/char/serial.c | info = rs_table + DEV_TO_SL(tty->line); |
tty | 1001 | drivers/char/serial.c | if (tty->termios->c_iflag & IXOFF) { |
tty | 1005 | drivers/char/serial.c | info->x_char = START_CHAR(tty); |
tty | 1311 | drivers/char/serial.c | static int rs_ioctl(struct tty_struct *tty, struct file * file, |
tty | 1317 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1334 | drivers/char/serial.c | put_fs_long(C_LOCAL(tty) ? 1 : 0, |
tty | 1339 | drivers/char/serial.c | tty->termios->c_cflag = |
tty | 1340 | drivers/char/serial.c | ((tty->termios->c_cflag & ~CLOCAL) | |
tty | 1388 | drivers/char/serial.c | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) |
tty | 1392 | drivers/char/serial.c | if (tty->termios->c_cflag == old_termios->c_cflag) |
tty | 1395 | drivers/char/serial.c | info = &rs_table[DEV_TO_SL(tty->line)]; |
tty | 1397 | drivers/char/serial.c | change_speed(DEV_TO_SL(tty->line)); |
tty | 1400 | drivers/char/serial.c | !(tty->termios->c_cflag & CRTSCTS)) { |
tty | 1401 | drivers/char/serial.c | tty->stopped = 0; |
tty | 1402 | drivers/char/serial.c | rs_write(tty); |
tty | 1406 | drivers/char/serial.c | (tty->termios->c_cflag & CLOCAL)) |
tty | 1409 | drivers/char/serial.c | if (I_INPCK(tty)) |
tty | 1427 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
tty | 1432 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1441 | drivers/char/serial.c | tty->stopped = 0; /* Force flush to succeed */ |
tty | 1442 | drivers/char/serial.c | rs_start(tty); |
tty | 1443 | drivers/char/serial.c | wait_until_sent(tty); |
tty | 1450 | drivers/char/serial.c | tty->count++; /* avoid race condition */ |
tty | 1454 | drivers/char/serial.c | tty->count--; |
tty | 1458 | drivers/char/serial.c | if (tty->termios->c_cflag & CLOCAL) |
tty | 1469 | drivers/char/serial.c | info->tty = 0; |
tty | 1477 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
tty | 1482 | drivers/char/serial.c | int do_clocal = C_LOCAL(tty); |
tty | 1484 | drivers/char/serial.c | int tty_line = tty->line; |
tty | 1585 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
tty | 1591 | drivers/char/serial.c | line = DEV_TO_SL(tty->line); |
tty | 1599 | drivers/char/serial.c | info->tty = tty; |
tty | 1601 | drivers/char/serial.c | tty->write = rs_write; |
tty | 1602 | drivers/char/serial.c | tty->close = rs_close; |
tty | 1603 | drivers/char/serial.c | tty->ioctl = rs_ioctl; |
tty | 1604 | drivers/char/serial.c | tty->throttle = rs_throttle; |
tty | 1605 | drivers/char/serial.c | tty->set_termios = rs_set_termios; |
tty | 1606 | drivers/char/serial.c | tty->stop = rs_stop; |
tty | 1607 | drivers/char/serial.c | tty->start = rs_start; |
tty | 1611 | drivers/char/serial.c | set_bit(TTY_IO_ERROR, &tty->flags); |
tty | 1637 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
tty | 1900 | drivers/char/serial.c | info->tty = 0; |
tty | 76 | drivers/char/tty_io.c | static void initialize_tty_struct(int line, struct tty_struct *tty); |
tty | 137 | drivers/char/tty_io.c | int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen) |
tty | 147 | drivers/char/tty_io.c | tail = tty->read_q.tail; |
tty | 148 | drivers/char/tty_io.c | head = tty->read_q.head; |
tty | 150 | drivers/char/tty_io.c | ok = !clear_bit (tail, &tty->readq_flags); |
tty | 151 | drivers/char/tty_io.c | *p++ = tty->read_q.buf[tail++]; |
tty | 155 | drivers/char/tty_io.c | tty->read_q.tail = tail; |
tty | 161 | drivers/char/tty_io.c | void tty_write_flush(struct tty_struct * tty) |
tty | 163 | drivers/char/tty_io.c | if (!tty->write || EMPTY(&tty->write_q)) |
tty | 165 | drivers/char/tty_io.c | if (set_bit(TTY_WRITE_BUSY,&tty->flags)) |
tty | 167 | drivers/char/tty_io.c | tty->write(tty); |
tty | 168 | drivers/char/tty_io.c | if (!clear_bit(TTY_WRITE_BUSY,&tty->flags)) |
tty | 172 | drivers/char/tty_io.c | void tty_read_flush(struct tty_struct * tty) |
tty | 174 | drivers/char/tty_io.c | if (!tty || EMPTY(&tty->read_q)) |
tty | 176 | drivers/char/tty_io.c | if (set_bit(TTY_READ_BUSY, &tty->flags)) |
tty | 178 | drivers/char/tty_io.c | ldiscs[tty->disc].handler(tty); |
tty | 179 | drivers/char/tty_io.c | if (!clear_bit(TTY_READ_BUSY, &tty->flags)) |
tty | 245 | drivers/char/tty_io.c | void do_tty_hangup(struct tty_struct * tty, struct file_operations *fops) |
tty | 252 | drivers/char/tty_io.c | if (!tty) |
tty | 254 | drivers/char/tty_io.c | dev = 0x0400 + tty->line; |
tty | 266 | drivers/char/tty_io.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 267 | drivers/char/tty_io.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 268 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 269 | drivers/char/tty_io.c | if (tty->session > 0) |
tty | 270 | drivers/char/tty_io.c | kill_sl(tty->session,SIGHUP,1); |
tty | 271 | drivers/char/tty_io.c | tty->session = 0; |
tty | 272 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 274 | drivers/char/tty_io.c | if ((*p) && (*p)->tty == tty->line) |
tty | 275 | drivers/char/tty_io.c | (*p)->tty = -1; |
tty | 279 | drivers/char/tty_io.c | void tty_hangup(struct tty_struct * tty) |
tty | 281 | drivers/char/tty_io.c | do_tty_hangup(tty, &hung_up_tty_fops); |
tty | 284 | drivers/char/tty_io.c | void tty_vhangup(struct tty_struct * tty) |
tty | 286 | drivers/char/tty_io.c | do_tty_hangup(tty, &vhung_up_tty_fops); |
tty | 479 | drivers/char/tty_io.c | void copy_to_cooked(struct tty_struct * tty) |
tty | 484 | drivers/char/tty_io.c | if (!tty) { |
tty | 488 | drivers/char/tty_io.c | if (!tty->write) { |
tty | 490 | drivers/char/tty_io.c | tty->line); |
tty | 498 | drivers/char/tty_io.c | c = LEFT(&tty->secondary); |
tty | 499 | drivers/char/tty_io.c | if (tty->throttle && (c < SQ_THRESHOLD_LW) |
tty | 500 | drivers/char/tty_io.c | && !set_bit(TTY_SQ_THROTTLED, &tty->flags)) |
tty | 501 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_SQ_FULL); |
tty | 505 | drivers/char/tty_io.c | if (tty->read_q.tail != tty->read_q.head) { |
tty | 506 | drivers/char/tty_io.c | c = 0xff & tty->read_q.buf[tty->read_q.tail]; |
tty | 507 | drivers/char/tty_io.c | special_flag = clear_bit(tty->read_q.tail, |
tty | 508 | drivers/char/tty_io.c | &tty->readq_flags); |
tty | 509 | drivers/char/tty_io.c | tty->read_q.tail = (tty->read_q.tail + 1) & |
tty | 517 | drivers/char/tty_io.c | tty->char_error = c & 3; |
tty | 520 | drivers/char/tty_io.c | if (tty->char_error) { |
tty | 521 | drivers/char/tty_io.c | if (tty->char_error == TTY_BREAK) { |
tty | 522 | drivers/char/tty_io.c | tty->char_error = 0; |
tty | 523 | drivers/char/tty_io.c | if (I_IGNBRK(tty)) |
tty | 525 | drivers/char/tty_io.c | if (I_PARMRK(tty)) { |
tty | 526 | drivers/char/tty_io.c | put_tty_queue('\377', &tty->secondary); |
tty | 527 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 529 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 533 | drivers/char/tty_io.c | tty->char_error = 0; |
tty | 534 | drivers/char/tty_io.c | if (I_IGNPAR(tty)) { |
tty | 537 | drivers/char/tty_io.c | if (I_PARMRK(tty)) { |
tty | 538 | drivers/char/tty_io.c | put_tty_queue('\377', &tty->secondary); |
tty | 539 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 540 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 542 | drivers/char/tty_io.c | put_tty_queue('\0', &tty->secondary); |
tty | 545 | drivers/char/tty_io.c | if (I_STRP(tty)) |
tty | 547 | drivers/char/tty_io.c | else if (I_PARMRK(tty) && (c == '\377')) |
tty | 548 | drivers/char/tty_io.c | put_tty_queue('\377', &tty->secondary); |
tty | 550 | drivers/char/tty_io.c | if (I_CRNL(tty)) |
tty | 552 | drivers/char/tty_io.c | else if (I_NOCR(tty)) |
tty | 554 | drivers/char/tty_io.c | } else if (c==10 && I_NLCR(tty)) |
tty | 556 | drivers/char/tty_io.c | if (I_UCLC(tty)) |
tty | 559 | drivers/char/tty_io.c | tty->lnext = 1; |
tty | 560 | drivers/char/tty_io.c | if (L_CANON(tty) && !tty->lnext) { |
tty | 561 | drivers/char/tty_io.c | if (c == KILL_CHAR(tty) || c == WERASE_CHAR(tty)) { |
tty | 563 | drivers/char/tty_io.c | (c == WERASE_CHAR(tty)) ? 0 : -1; |
tty | 566 | drivers/char/tty_io.c | while(!(EMPTY(&tty->secondary) || |
tty | 567 | drivers/char/tty_io.c | (c=LAST(&tty->secondary))==10 || |
tty | 568 | drivers/char/tty_io.c | ((EOF_CHAR(tty) != __DISABLED_CHAR) && |
tty | 569 | drivers/char/tty_io.c | (c==EOF_CHAR(tty))))) { |
tty | 579 | drivers/char/tty_io.c | if (L_ECHO(tty)) { |
tty | 581 | drivers/char/tty_io.c | put_tty_queue('\b', &tty->write_q); |
tty | 582 | drivers/char/tty_io.c | put_tty_queue(' ', &tty->write_q); |
tty | 583 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 585 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 586 | drivers/char/tty_io.c | put_tty_queue(' ',&tty->write_q); |
tty | 587 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 589 | drivers/char/tty_io.c | DEC(tty->secondary.head); |
tty | 593 | drivers/char/tty_io.c | if (c == ERASE_CHAR(tty)) { |
tty | 594 | drivers/char/tty_io.c | if (EMPTY(&tty->secondary) || |
tty | 595 | drivers/char/tty_io.c | (c=LAST(&tty->secondary))==10 || |
tty | 596 | drivers/char/tty_io.c | ((EOF_CHAR(tty) != __DISABLED_CHAR) && |
tty | 597 | drivers/char/tty_io.c | (c==EOF_CHAR(tty)))) |
tty | 599 | drivers/char/tty_io.c | if (L_ECHO(tty)) { |
tty | 601 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 602 | drivers/char/tty_io.c | put_tty_queue(' ',&tty->write_q); |
tty | 603 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 605 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 606 | drivers/char/tty_io.c | put_tty_queue(' ',&tty->write_q); |
tty | 607 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 609 | drivers/char/tty_io.c | DEC(tty->secondary.head); |
tty | 612 | drivers/char/tty_io.c | if (c == LNEXT_CHAR(tty)) { |
tty | 613 | drivers/char/tty_io.c | tty->lnext = 1; |
tty | 614 | drivers/char/tty_io.c | if (L_ECHO(tty)) { |
tty | 615 | drivers/char/tty_io.c | put_tty_queue('^',&tty->write_q); |
tty | 616 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 621 | drivers/char/tty_io.c | if (I_IXON(tty) && !tty->lnext) { |
tty | 622 | drivers/char/tty_io.c | if (c == STOP_CHAR(tty)) { |
tty | 623 | drivers/char/tty_io.c | tty->ctrl_status &= ~(TIOCPKT_START); |
tty | 624 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_STOP; |
tty | 625 | drivers/char/tty_io.c | if (tty->link) |
tty | 626 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->except_q); |
tty | 627 | drivers/char/tty_io.c | tty->stopped=1; |
tty | 628 | drivers/char/tty_io.c | if (tty->stop) |
tty | 629 | drivers/char/tty_io.c | (tty->stop)(tty); |
tty | 630 | drivers/char/tty_io.c | if (IS_A_CONSOLE(tty->line)) { |
tty | 636 | drivers/char/tty_io.c | if (((I_IXANY(tty)) && tty->stopped) || |
tty | 637 | drivers/char/tty_io.c | (c == START_CHAR(tty))) { |
tty | 638 | drivers/char/tty_io.c | tty->ctrl_status &= ~(TIOCPKT_STOP); |
tty | 639 | drivers/char/tty_io.c | tty->ctrl_status |= TIOCPKT_START; |
tty | 640 | drivers/char/tty_io.c | tty->stopped=0; |
tty | 641 | drivers/char/tty_io.c | if (tty->link) |
tty | 642 | drivers/char/tty_io.c | wake_up_interruptible(&tty->link->except_q); |
tty | 643 | drivers/char/tty_io.c | if (tty->start) |
tty | 644 | drivers/char/tty_io.c | (tty->start)(tty); |
tty | 645 | drivers/char/tty_io.c | if (IS_A_CONSOLE(tty->line)) { |
tty | 652 | drivers/char/tty_io.c | if (L_ISIG(tty) && !tty->lnext) { |
tty | 653 | drivers/char/tty_io.c | if (c == INTR_CHAR(tty)) { |
tty | 654 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGINT, 1); |
tty | 655 | drivers/char/tty_io.c | if (! _L_FLAG(tty, NOFLSH)) { |
tty | 656 | drivers/char/tty_io.c | flush_input(tty); |
tty | 657 | drivers/char/tty_io.c | flush_output(tty); |
tty | 661 | drivers/char/tty_io.c | if (c == QUIT_CHAR(tty)) { |
tty | 662 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGQUIT, 1); |
tty | 663 | drivers/char/tty_io.c | if (! _L_FLAG(tty, NOFLSH)) { |
tty | 664 | drivers/char/tty_io.c | flush_input(tty); |
tty | 665 | drivers/char/tty_io.c | flush_output(tty); |
tty | 669 | drivers/char/tty_io.c | if (c == SUSPEND_CHAR(tty)) { |
tty | 670 | drivers/char/tty_io.c | if (!is_orphaned_pgrp(tty->pgrp)) { |
tty | 671 | drivers/char/tty_io.c | kill_pg(tty->pgrp, SIGTSTP, 1); |
tty | 672 | drivers/char/tty_io.c | if (! _L_FLAG(tty, NOFLSH)) { |
tty | 673 | drivers/char/tty_io.c | flush_input(tty); |
tty | 674 | drivers/char/tty_io.c | flush_output(tty); |
tty | 680 | drivers/char/tty_io.c | if (c==10 || (EOF_CHAR(tty) != __DISABLED_CHAR && |
tty | 681 | drivers/char/tty_io.c | c==EOF_CHAR(tty))) |
tty | 682 | drivers/char/tty_io.c | tty->secondary.data++; |
tty | 683 | drivers/char/tty_io.c | if ((c==10) && (L_ECHO(tty) || (L_CANON(tty) && L_ECHONL(tty)))) { |
tty | 684 | drivers/char/tty_io.c | put_tty_queue('\n',&tty->write_q); |
tty | 685 | drivers/char/tty_io.c | put_tty_queue('\r',&tty->write_q); |
tty | 686 | drivers/char/tty_io.c | } else if (L_ECHO(tty)) { |
tty | 687 | drivers/char/tty_io.c | if (c<32 && L_ECHOCTL(tty)) { |
tty | 688 | drivers/char/tty_io.c | put_tty_queue('^',&tty->write_q); |
tty | 689 | drivers/char/tty_io.c | put_tty_queue(c+'A'-1, &tty->write_q); |
tty | 690 | drivers/char/tty_io.c | if (EOF_CHAR(tty) != __DISABLED_CHAR && |
tty | 691 | drivers/char/tty_io.c | c==EOF_CHAR(tty) && !tty->lnext) { |
tty | 692 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 693 | drivers/char/tty_io.c | put_tty_queue('\b',&tty->write_q); |
tty | 696 | drivers/char/tty_io.c | put_tty_queue(c, &tty->write_q); |
tty | 698 | drivers/char/tty_io.c | tty->lnext = 0; |
tty | 699 | drivers/char/tty_io.c | put_tty_queue(c, &tty->secondary); |
tty | 701 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 702 | drivers/char/tty_io.c | if (!EMPTY(&tty->secondary)) |
tty | 703 | drivers/char/tty_io.c | wake_up_interruptible(&tty->secondary.proc_list); |
tty | 704 | drivers/char/tty_io.c | if (tty->write_q.proc_list && LEFT(&tty->write_q) > TTY_BUF_SIZE/2) |
tty | 705 | drivers/char/tty_io.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 706 | drivers/char/tty_io.c | if (tty->throttle && (LEFT(&tty->read_q) >= RQ_THRESHOLD_HW) |
tty | 707 | drivers/char/tty_io.c | && clear_bit(TTY_RQ_THROTTLED, &tty->flags)) |
tty | 708 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_RQ_AVAIL); |
tty | 709 | drivers/char/tty_io.c | if (tty->throttle && (LEFT(&tty->secondary) >= SQ_THRESHOLD_HW) |
tty | 710 | drivers/char/tty_io.c | && clear_bit(TTY_SQ_THROTTLED, &tty->flags)) |
tty | 711 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_SQ_AVAIL); |
tty | 723 | drivers/char/tty_io.c | static void wait_for_canon_input(struct file * file, struct tty_struct * tty) |
tty | 725 | drivers/char/tty_io.c | if (!available_canon_input(tty)) { |
tty | 728 | drivers/char/tty_io.c | __wait_for_canon_input(file, tty); |
tty | 732 | drivers/char/tty_io.c | static int read_chan(struct tty_struct * tty, struct file * file, char * buf, int nr) |
tty | 739 | drivers/char/tty_io.c | if (L_CANON(tty)) |
tty | 742 | drivers/char/tty_io.c | time = 10L*tty->termios->c_cc[VTIME]; |
tty | 743 | drivers/char/tty_io.c | minimum = tty->termios->c_cc[VMIN]; |
tty | 757 | drivers/char/tty_io.c | if (L_CANON(tty) && !available_canon_input(tty)) |
tty | 759 | drivers/char/tty_io.c | } else if (L_CANON(tty)) { |
tty | 760 | drivers/char/tty_io.c | wait_for_canon_input(file, tty); |
tty | 768 | drivers/char/tty_io.c | if (tty->packet && tty->link && tty->link->ctrl_status) { |
tty | 769 | drivers/char/tty_io.c | put_fs_byte (tty->link->ctrl_status, b); |
tty | 770 | drivers/char/tty_io.c | tty->link->ctrl_status = 0; |
tty | 775 | drivers/char/tty_io.c | if (tty->packet) { |
tty | 783 | drivers/char/tty_io.c | add_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 789 | drivers/char/tty_io.c | TTY_READ_FLUSH(tty); |
tty | 790 | drivers/char/tty_io.c | if (tty->link) |
tty | 791 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty->link); |
tty | 792 | drivers/char/tty_io.c | while (nr > 0 && ((c = get_tty_queue(&tty->secondary)) >= 0)) { |
tty | 793 | drivers/char/tty_io.c | if ((EOF_CHAR(tty) != __DISABLED_CHAR && |
tty | 794 | drivers/char/tty_io.c | c==EOF_CHAR(tty)) || c==10) |
tty | 795 | drivers/char/tty_io.c | tty->secondary.data--; |
tty | 796 | drivers/char/tty_io.c | if ((EOF_CHAR(tty) != __DISABLED_CHAR && |
tty | 797 | drivers/char/tty_io.c | c==EOF_CHAR(tty)) && L_CANON(tty)) |
tty | 803 | drivers/char/tty_io.c | if (c==10 && L_CANON(tty)) |
tty | 806 | drivers/char/tty_io.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 811 | drivers/char/tty_io.c | if (tty->throttle && (LEFT(&tty->secondary) >= SQ_THRESHOLD_HW) |
tty | 812 | drivers/char/tty_io.c | && clear_bit(TTY_SQ_THROTTLED, &tty->flags)) |
tty | 813 | drivers/char/tty_io.c | tty->throttle(tty, TTY_THROTTLE_SQ_AVAIL); |
tty | 814 | drivers/char/tty_io.c | if (tty->link) { |
tty | 815 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 816 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_SLAVE_OPENED)) |
tty | 817 | drivers/char/tty_io.c | && tty->link->count <= 1) { |
tty | 821 | drivers/char/tty_io.c | } else if (!tty->link->count) { |
tty | 830 | drivers/char/tty_io.c | TTY_READ_FLUSH(tty); |
tty | 831 | drivers/char/tty_io.c | if (tty->link) |
tty | 832 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty->link); |
tty | 833 | drivers/char/tty_io.c | if (!EMPTY(&tty->secondary)) |
tty | 836 | drivers/char/tty_io.c | if (EMPTY(&tty->secondary)) |
tty | 840 | drivers/char/tty_io.c | remove_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 841 | drivers/char/tty_io.c | TTY_READ_FLUSH(tty); |
tty | 842 | drivers/char/tty_io.c | if (tty->link && tty->link->write) |
tty | 843 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty->link); |
tty | 848 | drivers/char/tty_io.c | if (tty->packet) { |
tty | 860 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(tty->line)) |
tty | 865 | drivers/char/tty_io.c | static void __wait_for_canon_input(struct file * file, struct tty_struct * tty) |
tty | 869 | drivers/char/tty_io.c | add_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 872 | drivers/char/tty_io.c | if (available_canon_input(tty)) |
tty | 881 | drivers/char/tty_io.c | remove_wait_queue(&tty->secondary.proc_list, &wait); |
tty | 884 | drivers/char/tty_io.c | static int available_canon_input(struct tty_struct * tty) |
tty | 886 | drivers/char/tty_io.c | TTY_READ_FLUSH(tty); |
tty | 887 | drivers/char/tty_io.c | if (tty->link) |
tty | 888 | drivers/char/tty_io.c | if (tty->link->count) |
tty | 889 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty->link); |
tty | 892 | drivers/char/tty_io.c | if (FULL(&tty->read_q)) |
tty | 894 | drivers/char/tty_io.c | if (tty->secondary.data) |
tty | 899 | drivers/char/tty_io.c | static int write_chan(struct tty_struct * tty, struct file * file, char * buf, int nr) |
tty | 908 | drivers/char/tty_io.c | add_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 914 | drivers/char/tty_io.c | if (tty->link && !tty->link->count) { |
tty | 919 | drivers/char/tty_io.c | if (FULL(&tty->write_q)) { |
tty | 920 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 921 | drivers/char/tty_io.c | if (FULL(&tty->write_q)) |
tty | 927 | drivers/char/tty_io.c | while (nr>0 && !FULL(&tty->write_q)) { |
tty | 929 | drivers/char/tty_io.c | if (O_POST(tty)) { |
tty | 932 | drivers/char/tty_io.c | if (O_NLRET(tty)) { |
tty | 933 | drivers/char/tty_io.c | tty->column = 0; |
tty | 935 | drivers/char/tty_io.c | if (O_NLCR(tty)) { |
tty | 936 | drivers/char/tty_io.c | if (!set_bit(TTY_CR_PENDING,&tty->flags)) { |
tty | 938 | drivers/char/tty_io.c | tty->column = 0; |
tty | 941 | drivers/char/tty_io.c | clear_bit(TTY_CR_PENDING,&tty->flags); |
tty | 946 | drivers/char/tty_io.c | if (O_NOCR(tty) && tty->column == 0) { |
tty | 950 | drivers/char/tty_io.c | if (O_CRNL(tty)) { |
tty | 952 | drivers/char/tty_io.c | if (O_NLRET(tty)) |
tty | 953 | drivers/char/tty_io.c | tty->column = 0; |
tty | 956 | drivers/char/tty_io.c | tty->column = 0; |
tty | 959 | drivers/char/tty_io.c | if (O_TABDLY(tty) == XTABS) { |
tty | 961 | drivers/char/tty_io.c | tty->column++; |
tty | 962 | drivers/char/tty_io.c | if (tty->column % 8 != 0) { |
tty | 968 | drivers/char/tty_io.c | tty->column--; |
tty | 971 | drivers/char/tty_io.c | if (O_LCUC(tty)) |
tty | 973 | drivers/char/tty_io.c | tty->column++; |
tty | 978 | drivers/char/tty_io.c | put_tty_queue(c,&tty->write_q); |
tty | 983 | drivers/char/tty_io.c | remove_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 984 | drivers/char/tty_io.c | TTY_WRITE_FLUSH(tty); |
tty | 987 | drivers/char/tty_io.c | if (tty->link && !tty->link->count) |
tty | 997 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1005 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1006 | drivers/char/tty_io.c | if (!tty || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 1009 | drivers/char/tty_io.c | (tty->pgrp > 0) && |
tty | 1010 | drivers/char/tty_io.c | (current->tty == dev) && |
tty | 1011 | drivers/char/tty_io.c | (tty->pgrp != current->pgrp)) |
tty | 1018 | drivers/char/tty_io.c | if (ldiscs[tty->disc].read) |
tty | 1019 | drivers/char/tty_io.c | i = (ldiscs[tty->disc].read)(tty,file,buf,count); |
tty | 1030 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1040 | drivers/char/tty_io.c | tty = redirect; |
tty | 1042 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1043 | drivers/char/tty_io.c | if (!tty || !tty->write || (tty->flags & (1 << TTY_IO_ERROR))) |
tty | 1045 | drivers/char/tty_io.c | if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) && |
tty | 1046 | drivers/char/tty_io.c | (current->tty == dev) && (tty->pgrp != current->pgrp)) { |
tty | 1054 | drivers/char/tty_io.c | if (ldiscs[tty->disc].write) |
tty | 1055 | drivers/char/tty_io.c | i = (ldiscs[tty->disc].write)(tty,file,buf,count); |
tty | 1070 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 1076 | drivers/char/tty_io.c | tty = o_tty = NULL; |
tty | 1084 | drivers/char/tty_io.c | if (!tty_table[dev] && !tty) { |
tty | 1085 | drivers/char/tty_io.c | if (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL))) |
tty | 1087 | drivers/char/tty_io.c | initialize_tty_struct(dev, tty); |
tty | 1139 | drivers/char/tty_io.c | tty->termios = tty_termios[dev]; |
tty | 1140 | drivers/char/tty_io.c | tty_table[dev] = tty; |
tty | 1141 | drivers/char/tty_io.c | tty = NULL; |
tty | 1169 | drivers/char/tty_io.c | if (tty) |
tty | 1170 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1191 | drivers/char/tty_io.c | struct tty_struct *tty, *o_tty; |
tty | 1195 | drivers/char/tty_io.c | tty = tty_table[dev]; |
tty | 1199 | drivers/char/tty_io.c | if (!tty) { |
tty | 1218 | drivers/char/tty_io.c | if (tty->link != o_tty || o_tty->link != tty) { |
tty | 1223 | drivers/char/tty_io.c | tty->write_data_cnt = 0; /* Clear out pending trash */ |
tty | 1224 | drivers/char/tty_io.c | if (tty->close) |
tty | 1225 | drivers/char/tty_io.c | tty->close(tty, filp); |
tty | 1227 | drivers/char/tty_io.c | if (--tty->link->count < 0) { |
tty | 1229 | drivers/char/tty_io.c | dev, tty->count); |
tty | 1230 | drivers/char/tty_io.c | tty->link->count = 0; |
tty | 1233 | drivers/char/tty_io.c | if (--tty->count < 0) { |
tty | 1235 | drivers/char/tty_io.c | dev, tty->count); |
tty | 1236 | drivers/char/tty_io.c | tty->count = 0; |
tty | 1238 | drivers/char/tty_io.c | if (tty->count) |
tty | 1246 | drivers/char/tty_io.c | if ((*p) && (*p)->tty == tty->line) |
tty | 1247 | drivers/char/tty_io.c | (*p)->tty = -1; |
tty | 1250 | drivers/char/tty_io.c | if (ldiscs[tty->disc].close != NULL) |
tty | 1251 | drivers/char/tty_io.c | ldiscs[tty->disc].close(tty); |
tty | 1266 | drivers/char/tty_io.c | if (tty == redirect || o_tty == redirect) |
tty | 1268 | drivers/char/tty_io.c | free_page((unsigned long) tty); |
tty | 1289 | drivers/char/tty_io.c | struct tty_struct *tty; |
tty | 1299 | drivers/char/tty_io.c | minor = current->tty; |
tty | 1319 | drivers/char/tty_io.c | tty = tty_table[minor]; |
tty | 1331 | drivers/char/tty_io.c | tty->ctrl_status = 0; |
tty | 1332 | drivers/char/tty_io.c | tty->packet = 0; |
tty | 1334 | drivers/char/tty_io.c | if (tty->open) { |
tty | 1335 | drivers/char/tty_io.c | retval = tty->open(tty, filp); |
tty | 1345 | drivers/char/tty_io.c | current->tty<0 && |
tty | 1346 | drivers/char/tty_io.c | tty->session==0) { |
tty | 1347 | drivers/char/tty_io.c | current->tty = minor; |
tty | 1348 | drivers/char/tty_io.c | tty->session = current->session; |
tty | 1349 | drivers/char/tty_io.c | tty->pgrp = current->pgrp; |
tty | 1380 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1388 | drivers/char/tty_io.c | tty = TTY_TABLE(dev); |
tty | 1389 | drivers/char/tty_io.c | if (!tty) { |
tty | 1395 | drivers/char/tty_io.c | if (L_CANON(tty)) { |
tty | 1396 | drivers/char/tty_io.c | if (available_canon_input(tty)) |
tty | 1398 | drivers/char/tty_io.c | } else if (!EMPTY(&tty->secondary)) |
tty | 1400 | drivers/char/tty_io.c | if (tty->link) { |
tty | 1401 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 1402 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_SLAVE_OPENED)) |
tty | 1403 | drivers/char/tty_io.c | && tty->link->count <= 1) |
tty | 1406 | drivers/char/tty_io.c | if (!tty->link->count) |
tty | 1412 | drivers/char/tty_io.c | if (tty->packet && tty->link && tty->link->ctrl_status) |
tty | 1415 | drivers/char/tty_io.c | select_wait(&tty->secondary.proc_list, wait); |
tty | 1418 | drivers/char/tty_io.c | if (!FULL(&tty->write_q)) |
tty | 1420 | drivers/char/tty_io.c | select_wait(&tty->write_q.proc_list, wait); |
tty | 1423 | drivers/char/tty_io.c | if (tty->link) { |
tty | 1424 | drivers/char/tty_io.c | if (IS_A_PTY_MASTER(tty->line)) { |
tty | 1425 | drivers/char/tty_io.c | if ((tty->flags & (1 << TTY_SLAVE_OPENED)) |
tty | 1426 | drivers/char/tty_io.c | && tty->link->count <= 1) |
tty | 1428 | drivers/char/tty_io.c | if (tty->packet |
tty | 1429 | drivers/char/tty_io.c | && tty->link->ctrl_status) |
tty | 1432 | drivers/char/tty_io.c | if (!tty->link->count) |
tty | 1436 | drivers/char/tty_io.c | select_wait(&tty->except_q, wait); |
tty | 1454 | drivers/char/tty_io.c | void do_SAK( struct tty_struct *tty) |
tty | 1457 | drivers/char/tty_io.c | int line = tty->line; |
tty | 1458 | drivers/char/tty_io.c | int session = tty->session; |
tty | 1462 | drivers/char/tty_io.c | flush_input(tty); |
tty | 1463 | drivers/char/tty_io.c | flush_output(tty); |
tty | 1467 | drivers/char/tty_io.c | if (((*p)->tty == line) || |
tty | 1498 | drivers/char/tty_io.c | int tty_write_data(struct tty_struct *tty, char *bufp, int buflen, |
tty | 1509 | drivers/char/tty_io.c | if (tty->write_data_cnt) { |
tty | 1514 | drivers/char/tty_io.c | head = tty->write_q.head; |
tty | 1515 | drivers/char/tty_io.c | tail = tty->write_q.tail; |
tty | 1520 | drivers/char/tty_io.c | tty->write_q.buf[head++] = *p++; |
tty | 1524 | drivers/char/tty_io.c | tty->write_q.head = head; |
tty | 1526 | drivers/char/tty_io.c | tty->write_data_cnt = count; |
tty | 1527 | drivers/char/tty_io.c | tty->write_data_ptr = (unsigned char *) p; |
tty | 1528 | drivers/char/tty_io.c | tty->write_data_callback = callback; |
tty | 1529 | drivers/char/tty_io.c | tty->write_data_arg = callarg; |
tty | 1532 | drivers/char/tty_io.c | tty->write(tty); |
tty | 1549 | drivers/char/tty_io.c | struct tty_struct * tty; |
tty | 1558 | drivers/char/tty_io.c | tty = tty_table[line]; |
tty | 1559 | drivers/char/tty_io.c | if (!tty || !tty->write_data_cnt) |
tty | 1562 | drivers/char/tty_io.c | head = tty->write_q.head; |
tty | 1563 | drivers/char/tty_io.c | tail = tty->write_q.tail; |
tty | 1564 | drivers/char/tty_io.c | count = tty->write_data_cnt; |
tty | 1565 | drivers/char/tty_io.c | p = tty->write_data_ptr; |
tty | 1568 | drivers/char/tty_io.c | tty->write_q.buf[head++] = *p++; |
tty | 1572 | drivers/char/tty_io.c | tty->write_q.head = head; |
tty | 1573 | drivers/char/tty_io.c | tty->write_data_ptr = p; |
tty | 1574 | drivers/char/tty_io.c | tty->write_data_cnt = count; |
tty | 1577 | drivers/char/tty_io.c | (tty->write_data_callback) |
tty | 1578 | drivers/char/tty_io.c | (tty->write_data_arg); |
tty | 1589 | drivers/char/tty_io.c | static void initialize_tty_struct(int line, struct tty_struct *tty) |
tty | 1591 | drivers/char/tty_io.c | memset(tty, 0, sizeof(struct tty_struct)); |
tty | 1592 | drivers/char/tty_io.c | tty->line = line; |
tty | 1593 | drivers/char/tty_io.c | tty->disc = N_TTY; |
tty | 1594 | drivers/char/tty_io.c | tty->pgrp = -1; |
tty | 1595 | drivers/char/tty_io.c | tty->winsize.ws_row = 0; |
tty | 1596 | drivers/char/tty_io.c | tty->winsize.ws_col = 0; |
tty | 1598 | drivers/char/tty_io.c | tty->open = con_open; |
tty | 1599 | drivers/char/tty_io.c | tty->winsize.ws_row = video_num_lines; |
tty | 1600 | drivers/char/tty_io.c | tty->winsize.ws_col = video_num_columns; |
tty | 1602 | drivers/char/tty_io.c | tty->open = rs_open; |
tty | 1604 | drivers/char/tty_io.c | tty->open = pty_open; |
tty | 1606 | drivers/char/tty_io.c | tty->except_q = NULL; |
tty | 38 | drivers/char/tty_ioctl.c | extern int paste_selection(struct tty_struct *tty); |
tty | 41 | drivers/char/tty_ioctl.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc); |
tty | 53 | drivers/char/tty_ioctl.c | void flush_input(struct tty_struct * tty) |
tty | 55 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_FLUSHREAD; |
tty | 56 | drivers/char/tty_ioctl.c | if (tty->link) |
tty | 57 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->except_q); |
tty | 58 | drivers/char/tty_ioctl.c | flush(&tty->read_q); |
tty | 59 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 60 | drivers/char/tty_ioctl.c | flush(&tty->secondary); |
tty | 61 | drivers/char/tty_ioctl.c | tty->secondary.data = 0; |
tty | 63 | drivers/char/tty_ioctl.c | if ((tty = tty->link) != NULL) { |
tty | 64 | drivers/char/tty_ioctl.c | flush(&tty->write_q); |
tty | 65 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 69 | drivers/char/tty_ioctl.c | void flush_output(struct tty_struct * tty) |
tty | 71 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_FLUSHWRITE; |
tty | 72 | drivers/char/tty_ioctl.c | if (tty->link) |
tty | 73 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->except_q); |
tty | 74 | drivers/char/tty_ioctl.c | flush(&tty->write_q); |
tty | 75 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->write_q.proc_list); |
tty | 76 | drivers/char/tty_ioctl.c | if ((tty = tty->link) != NULL) { |
tty | 77 | drivers/char/tty_ioctl.c | flush(&tty->read_q); |
tty | 78 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->read_q.proc_list); |
tty | 79 | drivers/char/tty_ioctl.c | flush(&tty->secondary); |
tty | 80 | drivers/char/tty_ioctl.c | tty->secondary.data = 0; |
tty | 84 | drivers/char/tty_ioctl.c | void wait_until_sent(struct tty_struct * tty) |
tty | 88 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 89 | drivers/char/tty_ioctl.c | if (EMPTY(&tty->write_q)) |
tty | 91 | drivers/char/tty_ioctl.c | add_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 97 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 98 | drivers/char/tty_ioctl.c | if (EMPTY(&tty->write_q)) |
tty | 103 | drivers/char/tty_ioctl.c | remove_wait_queue(&tty->write_q.proc_list, &wait); |
tty | 158 | drivers/char/tty_ioctl.c | static int get_termios(struct tty_struct * tty, struct termios * termios) |
tty | 166 | drivers/char/tty_ioctl.c | put_fs_byte( ((char *)tty->termios)[i] , i+(char *)termios ); |
tty | 170 | drivers/char/tty_ioctl.c | static int check_change(struct tty_struct * tty, int channel) |
tty | 175 | drivers/char/tty_ioctl.c | if (current->tty != channel) |
tty | 177 | drivers/char/tty_ioctl.c | if (tty->pgrp <= 0 || tty->pgrp == current->pgrp) |
tty | 187 | drivers/char/tty_ioctl.c | static int set_termios(struct tty_struct * tty, struct termios * termios, |
tty | 191 | drivers/char/tty_ioctl.c | struct termios old_termios = *tty->termios; |
tty | 193 | drivers/char/tty_ioctl.c | i = check_change(tty, channel); |
tty | 197 | drivers/char/tty_ioctl.c | ((char *)tty->termios)[i]=get_fs_byte(i+(char *)termios); |
tty | 205 | drivers/char/tty_ioctl.c | new_flow = (tty->termios->c_iflag & IXON) && |
tty | 206 | drivers/char/tty_ioctl.c | (tty->termios->c_cc[VSTOP] == '\023') && |
tty | 207 | drivers/char/tty_ioctl.c | (tty->termios->c_cc[VSTART] == '\021'); |
tty | 210 | drivers/char/tty_ioctl.c | tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP); |
tty | 212 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_DOSTOP; |
tty | 214 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_NOSTOP; |
tty | 215 | drivers/char/tty_ioctl.c | if (tty->link) |
tty | 216 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->except_q); |
tty | 225 | drivers/char/tty_ioctl.c | if (IS_A_PTY_MASTER(channel)) tty->termios->c_lflag &= ~ECHO; |
tty | 228 | drivers/char/tty_ioctl.c | unset_locked_termios(tty->termios, &old_termios, |
tty | 229 | drivers/char/tty_ioctl.c | termios_locked[tty->line]); |
tty | 232 | drivers/char/tty_ioctl.c | retval = tty_set_ldisc(tty, tty->termios->c_line); |
tty | 237 | drivers/char/tty_ioctl.c | if (tty->set_termios) |
tty | 238 | drivers/char/tty_ioctl.c | (*tty->set_termios)(tty, &old_termios); |
tty | 243 | drivers/char/tty_ioctl.c | static int get_termio(struct tty_struct * tty, struct termio * termio) |
tty | 251 | drivers/char/tty_ioctl.c | tmp_termio.c_iflag = tty->termios->c_iflag; |
tty | 252 | drivers/char/tty_ioctl.c | tmp_termio.c_oflag = tty->termios->c_oflag; |
tty | 253 | drivers/char/tty_ioctl.c | tmp_termio.c_cflag = tty->termios->c_cflag; |
tty | 254 | drivers/char/tty_ioctl.c | tmp_termio.c_lflag = tty->termios->c_lflag; |
tty | 255 | drivers/char/tty_ioctl.c | tmp_termio.c_line = tty->termios->c_line; |
tty | 257 | drivers/char/tty_ioctl.c | tmp_termio.c_cc[i] = tty->termios->c_cc[i]; |
tty | 263 | drivers/char/tty_ioctl.c | static int set_termio(struct tty_struct * tty, struct termio * termio, |
tty | 268 | drivers/char/tty_ioctl.c | struct termios old_termios = *tty->termios; |
tty | 272 | drivers/char/tty_ioctl.c | i = check_change(tty, channel); |
tty | 277 | drivers/char/tty_ioctl.c | SET_LOW_BITS(tty->termios->c_iflag, tmp_termio.c_iflag); |
tty | 278 | drivers/char/tty_ioctl.c | SET_LOW_BITS(tty->termios->c_oflag, tmp_termio.c_oflag); |
tty | 279 | drivers/char/tty_ioctl.c | SET_LOW_BITS(tty->termios->c_cflag, tmp_termio.c_cflag); |
tty | 280 | drivers/char/tty_ioctl.c | SET_LOW_BITS(tty->termios->c_lflag, tmp_termio.c_lflag); |
tty | 281 | drivers/char/tty_ioctl.c | memcpy(tty->termios->c_cc, tmp_termio.c_cc, NCC); |
tty | 289 | drivers/char/tty_ioctl.c | new_flow = (tty->termios->c_iflag & IXON) && |
tty | 290 | drivers/char/tty_ioctl.c | (tty->termios->c_cc[VSTOP] == '\023') && |
tty | 291 | drivers/char/tty_ioctl.c | (tty->termios->c_cc[VSTART] == '\021'); |
tty | 294 | drivers/char/tty_ioctl.c | tty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP); |
tty | 296 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_DOSTOP; |
tty | 298 | drivers/char/tty_ioctl.c | tty->ctrl_status |= TIOCPKT_NOSTOP; |
tty | 299 | drivers/char/tty_ioctl.c | if (tty->link) |
tty | 300 | drivers/char/tty_ioctl.c | wake_up_interruptible(&tty->link->except_q); |
tty | 303 | drivers/char/tty_ioctl.c | unset_locked_termios(tty->termios, &old_termios, |
tty | 304 | drivers/char/tty_ioctl.c | termios_locked[tty->line]); |
tty | 307 | drivers/char/tty_ioctl.c | retval = tty_set_ldisc(tty, tmp_termio.c_line); |
tty | 312 | drivers/char/tty_ioctl.c | if (tty->set_termios) |
tty | 313 | drivers/char/tty_ioctl.c | (*tty->set_termios)(tty, &old_termios); |
tty | 318 | drivers/char/tty_ioctl.c | static int get_lcktrmios(struct tty_struct * tty, struct termios * termios, |
tty | 332 | drivers/char/tty_ioctl.c | static int set_lcktrmios(struct tty_struct * tty, struct termios * termios, |
tty | 346 | drivers/char/tty_ioctl.c | static int set_window_size(struct tty_struct * tty, struct winsize * ws) |
tty | 353 | drivers/char/tty_ioctl.c | tmp = (char *) &tty->winsize; |
tty | 363 | drivers/char/tty_ioctl.c | kill_pg(tty->pgrp, SIGWINCH, 1); |
tty | 367 | drivers/char/tty_ioctl.c | static int get_window_size(struct tty_struct * tty, struct winsize * ws) |
tty | 379 | drivers/char/tty_ioctl.c | put_fs_byte(((char *) &tty->winsize)[i], tmp); |
tty | 384 | drivers/char/tty_ioctl.c | static int tty_set_ldisc(struct tty_struct *tty, int ldisc) |
tty | 390 | drivers/char/tty_ioctl.c | if (tty->disc == ldisc) |
tty | 394 | drivers/char/tty_ioctl.c | wait_until_sent(tty); |
tty | 395 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 396 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].close) |
tty | 397 | drivers/char/tty_ioctl.c | ldiscs[tty->disc].close(tty); |
tty | 400 | drivers/char/tty_ioctl.c | tty->disc = ldisc; |
tty | 401 | drivers/char/tty_ioctl.c | tty->termios->c_line = ldisc; |
tty | 402 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].open) |
tty | 403 | drivers/char/tty_ioctl.c | return(ldiscs[tty->disc].open(tty)); |
tty | 412 | drivers/char/tty_ioctl.c | struct tty_struct * tty; |
tty | 425 | drivers/char/tty_ioctl.c | tty = TTY_TABLE(dev); |
tty | 426 | drivers/char/tty_ioctl.c | if (!tty) |
tty | 432 | drivers/char/tty_ioctl.c | termios_tty = tty; |
tty | 442 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 445 | drivers/char/tty_ioctl.c | wait_until_sent(tty); |
tty | 452 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 455 | drivers/char/tty_ioctl.c | wait_until_sent(tty); /* fallthrough */ |
tty | 461 | drivers/char/tty_ioctl.c | tty->stopped = 1; |
tty | 462 | drivers/char/tty_ioctl.c | if (tty->stop) |
tty | 463 | drivers/char/tty_ioctl.c | (tty->stop)(tty); |
tty | 464 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 467 | drivers/char/tty_ioctl.c | tty->stopped = 0; |
tty | 468 | drivers/char/tty_ioctl.c | if (tty->start) |
tty | 469 | drivers/char/tty_ioctl.c | (tty->start)(tty); |
tty | 470 | drivers/char/tty_ioctl.c | TTY_WRITE_FLUSH(tty); |
tty | 473 | drivers/char/tty_ioctl.c | if (STOP_CHAR(tty)) |
tty | 474 | drivers/char/tty_ioctl.c | put_tty_queue(STOP_CHAR(tty), |
tty | 475 | drivers/char/tty_ioctl.c | &tty->write_q); |
tty | 478 | drivers/char/tty_ioctl.c | if (START_CHAR(tty)) |
tty | 479 | drivers/char/tty_ioctl.c | put_tty_queue(START_CHAR(tty), |
tty | 480 | drivers/char/tty_ioctl.c | &tty->write_q); |
tty | 486 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 488 | drivers/char/tty_ioctl.c | flush_output(tty); |
tty | 490 | drivers/char/tty_ioctl.c | flush_input(tty); |
tty | 491 | drivers/char/tty_ioctl.c | flush_output(tty); |
tty | 500 | drivers/char/tty_ioctl.c | if ((current->leader && current->tty < 0 && |
tty | 501 | drivers/char/tty_ioctl.c | tty->session == 0) || |
tty | 503 | drivers/char/tty_ioctl.c | current->tty = dev; |
tty | 504 | drivers/char/tty_ioctl.c | tty->session = current->session; |
tty | 505 | drivers/char/tty_ioctl.c | tty->pgrp = current->pgrp; |
tty | 515 | drivers/char/tty_ioctl.c | if ((current->tty < 0) || |
tty | 516 | drivers/char/tty_ioctl.c | (current->tty != termios_dev) || |
tty | 529 | drivers/char/tty_ioctl.c | put_fs_long(CHARS(&tty->write_q), |
tty | 536 | drivers/char/tty_ioctl.c | if (L_CANON(tty) && !tty->secondary.data) |
tty | 539 | drivers/char/tty_ioctl.c | put_fs_long(CHARS(&tty->secondary), |
tty | 545 | drivers/char/tty_ioctl.c | return get_window_size(tty,(struct winsize *) arg); |
tty | 549 | drivers/char/tty_ioctl.c | return set_window_size(tty,(struct winsize *) arg); |
tty | 565 | drivers/char/tty_ioctl.c | return paste_selection(tty); |
tty | 584 | drivers/char/tty_ioctl.c | redirect = tty; |
tty | 596 | drivers/char/tty_ioctl.c | if (MINOR(file->f_rdev) != current->tty) |
tty | 598 | drivers/char/tty_ioctl.c | current->tty = -1; |
tty | 600 | drivers/char/tty_ioctl.c | if (tty->pgrp > 0) |
tty | 601 | drivers/char/tty_ioctl.c | kill_pg(tty->pgrp, SIGHUP, 0); |
tty | 602 | drivers/char/tty_ioctl.c | tty->pgrp = -1; |
tty | 603 | drivers/char/tty_ioctl.c | tty->session = 0; |
tty | 609 | drivers/char/tty_ioctl.c | put_fs_long(tty->disc, (unsigned long *) arg); |
tty | 613 | drivers/char/tty_ioctl.c | return tty_set_ldisc(tty, arg); |
tty | 616 | drivers/char/tty_ioctl.c | return get_lcktrmios(tty, (struct termios *) arg, |
tty | 620 | drivers/char/tty_ioctl.c | return set_lcktrmios(tty, (struct termios *) arg, |
tty | 629 | drivers/char/tty_ioctl.c | tty->packet = (get_fs_long ((unsigned long *)arg) != 0); |
tty | 632 | drivers/char/tty_ioctl.c | wait_until_sent(tty); |
tty | 633 | drivers/char/tty_ioctl.c | if (!tty->ioctl) |
tty | 635 | drivers/char/tty_ioctl.c | tty->ioctl(tty, file, cmd, arg); |
tty | 638 | drivers/char/tty_ioctl.c | if (tty->ioctl) { |
tty | 639 | drivers/char/tty_ioctl.c | retval = (tty->ioctl)(tty, file, cmd, arg); |
tty | 643 | drivers/char/tty_ioctl.c | if (ldiscs[tty->disc].ioctl) { |
tty | 644 | drivers/char/tty_ioctl.c | retval = (ldiscs[tty->disc].ioctl) |
tty | 645 | drivers/char/tty_ioctl.c | (tty, file, cmd, arg); |
tty | 105 | drivers/char/vt.c | int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 112 | drivers/char/vt.c | console = tty->line - 1; |
tty | 220 | drivers/char/vt.c | flush_input(tty); |
tty | 145 | drivers/net/slip.c | sl->tty = NULL; |
tty | 165 | drivers/net/slip.c | sl_find(struct tty_struct *tty) |
tty | 170 | drivers/net/slip.c | if (tty == NULL) return(NULL); |
tty | 173 | drivers/net/slip.c | if (sl->tty == tty) return(sl); |
tty | 193 | drivers/net/slip.c | sl->tty = NULL; |
tty | 213 | drivers/net/slip.c | sl->tty = NULL; |
tty | 481 | drivers/net/slip.c | if (tty_write_data(sl->tty, (char *) bp, count, |
tty | 493 | drivers/net/slip.c | struct tty_struct *tty; |
tty | 498 | drivers/net/slip.c | tty = sl->tty; |
tty | 660 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 731 | drivers/net/slip.c | if (sl->tty == NULL) { |
tty | 757 | drivers/net/slip.c | slip_recv(struct tty_struct *tty) |
tty | 764 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: slip_recv(%d) called\n", tty->line)); |
tty | 765 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) return; /* not connected */ |
tty | 772 | drivers/net/slip.c | count = tty_read_raw_data(tty, buff, 128); |
tty | 821 | drivers/net/slip.c | slip_open(struct tty_struct *tty) |
tty | 826 | drivers/net/slip.c | if ((sl = sl_find(tty)) != NULL) { |
tty | 828 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 835 | drivers/net/slip.c | tty->line)); |
tty | 838 | drivers/net/slip.c | sl->tty = tty; |
tty | 839 | drivers/net/slip.c | tty_read_flush(tty); |
tty | 840 | drivers/net/slip.c | tty_write_flush(tty); |
tty | 845 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 859 | drivers/net/slip.c | slip_close(struct tty_struct *tty) |
tty | 864 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) { |
tty | 865 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: TTY %d not connected !\n", tty->line)); |
tty | 871 | drivers/net/slip.c | tty->line, sl->dev->name)); |
tty | 1059 | drivers/net/slip.c | slip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg) |
tty | 1065 | drivers/net/slip.c | if ((sl = sl_find(tty)) == NULL) { |
tty | 1066 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: ioctl: TTY %d not connected !\n", tty->line)); |
tty | 1070 | drivers/net/slip.c | DPRINTF((DBG_SLIP, "SLIP: ioctl(%d, 0x%X, 0x%X)\n", tty->line, cmd, arg)); |
tty | 38 | drivers/net/slip.h | struct tty_struct *tty; /* ptr to TTY structure */ |
tty | 461 | fs/open.c | struct tty_struct *tty; |
tty | 466 | fs/open.c | if (current->tty < 0) |
tty | 468 | fs/open.c | tty = TTY_TABLE(MINOR(current->tty)); |
tty | 469 | fs/open.c | tty_vhangup(tty); |
tty | 258 | fs/proc/array.c | tty_pgrp = (*p)->tty; |
tty | 272 | fs/proc/array.c | (*p)->tty, |
tty | 202 | include/linux/sched.h | int tty; /* -1 if no tty, so it must be signed */ |
tty | 28 | include/linux/serial.h | struct tty_struct *tty; |
tty | 147 | include/linux/tty.h | #define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) |
tty | 148 | include/linux/tty.h | #define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) |
tty | 149 | include/linux/tty.h | #define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) |
tty | 150 | include/linux/tty.h | #define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) |
tty | 151 | include/linux/tty.h | #define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) |
tty | 152 | include/linux/tty.h | #define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) |
tty | 153 | include/linux/tty.h | #define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) |
tty | 154 | include/linux/tty.h | #define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) |
tty | 155 | include/linux/tty.h | #define SUSPEND_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) |
tty | 156 | include/linux/tty.h | #define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) |
tty | 158 | include/linux/tty.h | #define _L_FLAG(tty,f) ((tty)->termios->c_lflag & f) |
tty | 159 | include/linux/tty.h | #define _I_FLAG(tty,f) ((tty)->termios->c_iflag & f) |
tty | 160 | include/linux/tty.h | #define _O_FLAG(tty,f) ((tty)->termios->c_oflag & f) |
tty | 161 | include/linux/tty.h | #define _C_FLAG(tty,f) ((tty)->termios->c_cflag & f) |
tty | 163 | include/linux/tty.h | #define L_CANON(tty) _L_FLAG((tty),ICANON) |
tty | 164 | include/linux/tty.h | #define L_ISIG(tty) _L_FLAG((tty),ISIG) |
tty | 165 | include/linux/tty.h | #define L_ECHO(tty) _L_FLAG((tty),ECHO) |
tty | 166 | include/linux/tty.h | #define L_ECHOE(tty) _L_FLAG((tty),ECHOE) |
tty | 167 | include/linux/tty.h | #define L_ECHOK(tty) _L_FLAG((tty),ECHOK) |
tty | 168 | include/linux/tty.h | #define L_ECHONL(tty) _L_FLAG((tty),ECHONL) |
tty | 169 | include/linux/tty.h | #define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL) |
tty | 170 | include/linux/tty.h | #define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE) |
tty | 171 | include/linux/tty.h | #define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP) |
tty | 173 | include/linux/tty.h | #define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK) |
tty | 174 | include/linux/tty.h | #define I_BRKINT(tty) _I_FLAG((tty),BRKINT) |
tty | 175 | include/linux/tty.h | #define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR) |
tty | 176 | include/linux/tty.h | #define I_PARMRK(tty) _I_FLAG((tty),PARMRK) |
tty | 177 | include/linux/tty.h | #define I_INPCK(tty) _I_FLAG((tty),INPCK) |
tty | 178 | include/linux/tty.h | #define I_UCLC(tty) _I_FLAG((tty),IUCLC) |
tty | 179 | include/linux/tty.h | #define I_NLCR(tty) _I_FLAG((tty),INLCR) |
tty | 180 | include/linux/tty.h | #define I_CRNL(tty) _I_FLAG((tty),ICRNL) |
tty | 181 | include/linux/tty.h | #define I_NOCR(tty) _I_FLAG((tty),IGNCR) |
tty | 182 | include/linux/tty.h | #define I_IXON(tty) _I_FLAG((tty),IXON) |
tty | 183 | include/linux/tty.h | #define I_IXANY(tty) _I_FLAG((tty),IXANY) |
tty | 184 | include/linux/tty.h | #define I_STRP(tty) _I_FLAG((tty),ISTRIP) |
tty | 186 | include/linux/tty.h | #define O_POST(tty) _O_FLAG((tty),OPOST) |
tty | 187 | include/linux/tty.h | #define O_LCUC(tty) _O_FLAG((tty),OLCUC) |
tty | 188 | include/linux/tty.h | #define O_NLCR(tty) _O_FLAG((tty),ONLCR) |
tty | 189 | include/linux/tty.h | #define O_CRNL(tty) _O_FLAG((tty),OCRNL) |
tty | 190 | include/linux/tty.h | #define O_NOCR(tty) _O_FLAG((tty),ONOCR) |
tty | 191 | include/linux/tty.h | #define O_NLRET(tty) _O_FLAG((tty),ONLRET) |
tty | 192 | include/linux/tty.h | #define O_TABDLY(tty) _O_FLAG((tty),TABDLY) |
tty | 194 | include/linux/tty.h | #define C_LOCAL(tty) _C_FLAG((tty),CLOCAL) |
tty | 195 | include/linux/tty.h | #define C_RTSCTS(tty) _C_FLAG((tty),CRTSCTS) |
tty | 196 | include/linux/tty.h | #define C_SPEED(tty) ((tty)->termios->c_cflag & CBAUD) |
tty | 197 | include/linux/tty.h | #define C_HUP(tty) (C_SPEED((tty)) == B0) |
tty | 226 | include/linux/tty.h | int (*open)(struct tty_struct * tty, struct file * filp); |
tty | 227 | include/linux/tty.h | void (*close)(struct tty_struct * tty, struct file * filp); |
tty | 228 | include/linux/tty.h | void (*write)(struct tty_struct * tty); |
tty | 229 | include/linux/tty.h | int (*ioctl)(struct tty_struct *tty, struct file * file, |
tty | 231 | include/linux/tty.h | void (*throttle)(struct tty_struct * tty, int status); |
tty | 232 | include/linux/tty.h | void (*set_termios)(struct tty_struct *tty, struct termios * old); |
tty | 233 | include/linux/tty.h | void (*stop)(struct tty_struct *tty); |
tty | 234 | include/linux/tty.h | void (*start)(struct tty_struct *tty); |
tty | 255 | include/linux/tty.h | int (*read)(struct tty_struct * tty, struct file * file, |
tty | 257 | include/linux/tty.h | int (*write)(struct tty_struct * tty, struct file * file, |
tty | 259 | include/linux/tty.h | int (*ioctl)(struct tty_struct * tty, struct file * file, |
tty | 325 | include/linux/tty.h | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
tty | 326 | include/linux/tty.h | #define TTY_READ_FLUSH(tty) tty_read_flush((tty)) |
tty | 358 | include/linux/tty.h | extern void flush_input(struct tty_struct * tty); |
tty | 359 | include/linux/tty.h | extern void flush_output(struct tty_struct * tty); |
tty | 360 | include/linux/tty.h | extern void wait_until_sent(struct tty_struct * tty); |
tty | 361 | include/linux/tty.h | extern void copy_to_cooked(struct tty_struct * tty); |
tty | 363 | include/linux/tty.h | extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, |
tty | 365 | include/linux/tty.h | extern int tty_write_data(struct tty_struct *tty, char *bufp, int buflen, |
tty | 371 | include/linux/tty.h | extern int tty_signal(int sig, struct tty_struct *tty); |
tty | 372 | include/linux/tty.h | extern void tty_hangup(struct tty_struct * tty); |
tty | 373 | include/linux/tty.h | extern void tty_vhangup(struct tty_struct * tty); |
tty | 376 | include/linux/tty.h | extern void do_SAK(struct tty_struct *tty); |
tty | 380 | include/linux/tty.h | extern void rs_write(struct tty_struct * tty); |
tty | 381 | include/linux/tty.h | extern void con_write(struct tty_struct * tty); |
tty | 385 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
tty | 389 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
tty | 393 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
tty | 400 | include/linux/tty.h | extern int vt_ioctl(struct tty_struct *tty, struct file * file, |
tty | 457 | kernel/exit.c | struct tty_struct *tty; |
tty | 459 | kernel/exit.c | if (current->tty >= 0) { |
tty | 460 | kernel/exit.c | tty = TTY_TABLE(current->tty); |
tty | 461 | kernel/exit.c | if (tty) { |
tty | 462 | kernel/exit.c | if (tty->pgrp > 0) |
tty | 463 | kernel/exit.c | kill_pg(tty->pgrp, SIGHUP, 1); |
tty | 464 | kernel/exit.c | tty->pgrp = -1; |
tty | 465 | kernel/exit.c | tty->session = 0; |
tty | 470 | kernel/exit.c | p->tty = -1; |
tty | 504 | kernel/sys.c | current->tty = -1; |