taglinefilesource code
tty86drivers/char/console.cint set_selection(const int arg, struct tty_struct *tty);
tty87drivers/char/console.cint paste_selection(struct tty_struct *tty);
tty787drivers/char/console.cstatic void respond_string(char * p, struct tty_struct * tty)
tty790drivers/char/console.ctty_insert_flip_char(tty, *p, 0);
tty793drivers/char/console.ctty_schedule_flip(tty);
tty796drivers/char/console.cstatic void cursor_report(int currcons, struct tty_struct * tty)
tty801drivers/char/console.crespond_string(buf, tty);
tty805drivers/char/console.cstatic void mouse_report(int currcons, struct tty_struct * tty,
tty812drivers/char/console.crespond_string(buf, tty);
tty816drivers/char/console.cstatic inline void status_report(int currcons, struct tty_struct * tty)
tty818drivers/char/console.crespond_string("\033[0n", tty);  /* Terminal ok */
tty821drivers/char/console.cstatic inline void respond_ID(int currcons, struct tty_struct * tty)
tty823drivers/char/console.crespond_string(VT102ID, tty);
tty1086drivers/char/console.cstatic void con_stop(struct tty_struct *tty)
tty1095drivers/char/console.cstatic void con_start(struct tty_struct *tty)
tty1101drivers/char/console.cstatic int con_write(struct tty_struct * tty, int from_user,
tty1106drivers/char/console.cstruct vt_struct *vt = (struct vt_struct *)tty->driver_data;
tty1119drivers/char/console.cwhile (!tty->stopped &&  count) {
tty1213drivers/char/console.crespond_ID(currcons,tty);
tty1274drivers/char/console.cstatus_report(currcons,tty);
tty1276drivers/char/console.ccursor_report(currcons,tty);
tty1338drivers/char/console.crespond_ID(currcons,tty);
tty1434drivers/char/console.cstatic int con_write_room(struct tty_struct *tty)
tty1436drivers/char/console.cif (tty->stopped)
tty1441drivers/char/console.cstatic int con_chars_in_buffer(struct tty_struct *tty)
tty1512drivers/char/console.cstatic void con_throttle(struct tty_struct *tty)
tty1516drivers/char/console.cstatic void con_unthrottle(struct tty_struct *tty)
tty1518drivers/char/console.cstruct vt_struct *vt = (struct vt_struct *) tty->driver_data;
tty1794drivers/char/console.cint con_open(struct tty_struct *tty, struct file * filp)
tty1798drivers/char/console.cidx = MINOR(tty->device) - tty->driver.minor_start;
tty1803drivers/char/console.ctty->driver_data = &vt_cons[idx];
tty1805drivers/char/console.cif (!tty->winsize.ws_row && !tty->winsize.ws_col) {
tty1806drivers/char/console.ctty->winsize.ws_row = video_num_lines;
tty1807drivers/char/console.ctty->winsize.ws_col = video_num_columns;
tty1898drivers/char/console.cint set_selection(const int arg, struct tty_struct *tty)
tty1923drivers/char/console.cmouse_report(currcons, tty, sel_mode & 15, xs, ys);
tty2050drivers/char/console.cint paste_selection(struct tty_struct *tty)
tty2055drivers/char/console.cstruct vt_struct *vt = (struct vt_struct *) tty->driver_data;
tty2064drivers/char/console.cif (test_bit(TTY_THROTTLED, &tty->flags)) {
tty2068drivers/char/console.cl = MIN(c, tty->ldisc.receive_room(tty));
tty2069drivers/char/console.ctty->ldisc.receive_buf(tty, bp, 0, l);
tty101drivers/char/keyboard.cstatic struct tty_struct * tty = NULL;
tty234drivers/char/keyboard.ctty = ttytab[fg_console];
tty341drivers/char/keyboard.c(vc_kbd_mode(kbd,VC_REPEAT) && tty &&
tty342drivers/char/keyboard.c(L_ECHO(tty) || (tty->driver.chars_in_buffer(tty) == 0)))) {
tty367drivers/char/keyboard.cif (tty) {
tty368drivers/char/keyboard.ctty_insert_flip_char(tty, ch, 0);
tty369drivers/char/keyboard.ctty_schedule_flip(tty);
tty376drivers/char/keyboard.cif (!tty)
tty380drivers/char/keyboard.ctty_insert_flip_char(tty, *cp, 0);
tty383drivers/char/keyboard.ctty_schedule_flip(tty);
tty436drivers/char/keyboard.cif (rep || !tty)
tty444drivers/char/keyboard.cif (tty->stopped)
tty445drivers/char/keyboard.cstart_tty(tty);
tty447drivers/char/keyboard.cstop_tty(tty);
tty476drivers/char/keyboard.cif (!tty || (tty->termios && I_IGNBRK(tty)))
tty478drivers/char/keyboard.ctty_insert_flip_char(tty, 0, TTY_BREAK);
tty503drivers/char/keyboard.cdo_SAK(tty);
tty58drivers/char/n_tty.cstatic inline void put_tty_queue(unsigned char c, struct tty_struct *tty)
tty60drivers/char/n_tty.cif (tty->read_cnt < N_TTY_BUF_SIZE) {
tty61drivers/char/n_tty.ctty->read_buf[tty->read_head] = c;
tty62drivers/char/n_tty.ctty->read_head = (tty->read_head + 1) & (N_TTY_BUF_SIZE-1);
tty63drivers/char/n_tty.ctty->read_cnt++;
tty70drivers/char/n_tty.cvoid n_tty_flush_buffer(struct tty_struct * tty)
tty72drivers/char/n_tty.ctty->read_head = tty->read_tail = tty->read_cnt = 0;
tty73drivers/char/n_tty.ctty->canon_head = tty->canon_data = tty->erasing = 0;
tty74drivers/char/n_tty.cmemset(&tty->read_flags, 0, sizeof tty->read_flags);
tty76drivers/char/n_tty.cif (!tty->link)
tty79drivers/char/n_tty.cif (tty->driver.unthrottle)
tty80drivers/char/n_tty.c(tty->driver.unthrottle)(tty);
tty81drivers/char/n_tty.cif (tty->link->packet) {
tty82drivers/char/n_tty.ctty->ctrl_status |= TIOCPKT_FLUSHREAD;
tty83drivers/char/n_tty.cwake_up_interruptible(&tty->link->read_wait);
tty90drivers/char/n_tty.cint n_tty_chars_in_buffer(struct tty_struct *tty)
tty92drivers/char/n_tty.creturn tty->read_cnt;
tty99drivers/char/n_tty.cstatic int opost(unsigned char c, struct tty_struct *tty)
tty103drivers/char/n_tty.cspace = tty->driver.write_room(tty);
tty107drivers/char/n_tty.cif (O_OPOST(tty)) {
tty110drivers/char/n_tty.cif (O_ONLRET(tty))
tty111drivers/char/n_tty.ctty->column = 0;
tty112drivers/char/n_tty.cif (O_ONLCR(tty)) {
tty115drivers/char/n_tty.ctty->driver.put_char(tty, '\r');
tty116drivers/char/n_tty.ctty->column = 0;
tty118drivers/char/n_tty.ctty->canon_column = tty->column;
tty121drivers/char/n_tty.cif (O_ONOCR(tty) && tty->column == 0)
tty123drivers/char/n_tty.cif (O_OCRNL(tty)) {
tty125drivers/char/n_tty.cif (O_ONLRET(tty))
tty126drivers/char/n_tty.ctty->canon_column = tty->column = 0;
tty129drivers/char/n_tty.ctty->canon_column = tty->column = 0;
tty132drivers/char/n_tty.cspaces = 8 - (tty->column & 7);
tty133drivers/char/n_tty.cif (O_TABDLY(tty) == XTABS) {
tty136drivers/char/n_tty.ctty->column += spaces;
tty137drivers/char/n_tty.ctty->driver.write(tty, 0, "        ", spaces);
tty140drivers/char/n_tty.ctty->column += spaces;
tty143drivers/char/n_tty.cif (tty->column > 0)
tty144drivers/char/n_tty.ctty->column--;
tty147drivers/char/n_tty.cif (O_OLCUC(tty))
tty150drivers/char/n_tty.ctty->column++;
tty154drivers/char/n_tty.ctty->driver.put_char(tty, c);
tty158drivers/char/n_tty.cstatic inline void put_char(unsigned char c, struct tty_struct *tty)
tty160drivers/char/n_tty.ctty->driver.put_char(tty, c);
tty165drivers/char/n_tty.cstatic void echo_char(unsigned char c, struct tty_struct *tty)
tty167drivers/char/n_tty.cif (L_ECHOCTL(tty) && iscntrl(c) && c != '\t') {
tty168drivers/char/n_tty.cput_char('^', tty);
tty169drivers/char/n_tty.cput_char(c ^ 0100, tty);
tty170drivers/char/n_tty.ctty->column += 2;
tty172drivers/char/n_tty.copost(c, tty);
tty175drivers/char/n_tty.cstatic inline void finish_erasing(struct tty_struct *tty)
tty177drivers/char/n_tty.cif (tty->erasing) {
tty178drivers/char/n_tty.cput_char('/', tty);
tty179drivers/char/n_tty.ctty->column += 2;
tty180drivers/char/n_tty.ctty->erasing = 0;
tty184drivers/char/n_tty.cstatic void eraser(unsigned char c, struct tty_struct *tty)
tty189drivers/char/n_tty.cif (tty->read_head == tty->canon_head) {
tty193drivers/char/n_tty.cif (c == ERASE_CHAR(tty))
tty195drivers/char/n_tty.celse if (c == WERASE_CHAR(tty))
tty198drivers/char/n_tty.cif (!L_ECHO(tty)) {
tty199drivers/char/n_tty.ctty->read_cnt -= ((tty->read_head - tty->canon_head) &
tty201drivers/char/n_tty.ctty->read_head = tty->canon_head;
tty204drivers/char/n_tty.cif (!L_ECHOK(tty) || !L_ECHOKE(tty)) {
tty205drivers/char/n_tty.ctty->read_cnt -= ((tty->read_head - tty->canon_head) &
tty207drivers/char/n_tty.ctty->read_head = tty->canon_head;
tty208drivers/char/n_tty.cfinish_erasing(tty);
tty209drivers/char/n_tty.cecho_char(KILL_CHAR(tty), tty);
tty211drivers/char/n_tty.cif (L_ECHOK(tty))
tty212drivers/char/n_tty.copost('\n', tty);
tty219drivers/char/n_tty.cwhile (tty->read_head != tty->canon_head) {
tty220drivers/char/n_tty.chead = (tty->read_head - 1) & (N_TTY_BUF_SIZE-1);
tty221drivers/char/n_tty.cc = tty->read_buf[head];
tty229drivers/char/n_tty.ctty->read_head = head;
tty230drivers/char/n_tty.ctty->read_cnt--;
tty231drivers/char/n_tty.cif (L_ECHO(tty)) {
tty232drivers/char/n_tty.cif (L_ECHOPRT(tty)) {
tty233drivers/char/n_tty.cif (!tty->erasing) {
tty234drivers/char/n_tty.cput_char('\\', tty);
tty235drivers/char/n_tty.ctty->column++;
tty236drivers/char/n_tty.ctty->erasing = 1;
tty238drivers/char/n_tty.cecho_char(c, tty);
tty239drivers/char/n_tty.c} else if (!L_ECHOE(tty)) {
tty240drivers/char/n_tty.cecho_char(ERASE_CHAR(tty), tty);
tty242drivers/char/n_tty.cunsigned int col = tty->canon_column;
tty243drivers/char/n_tty.cunsigned long tail = tty->canon_head;
tty246drivers/char/n_tty.cwhile (tail != tty->read_head) {
tty247drivers/char/n_tty.cc = tty->read_buf[tail];
tty251drivers/char/n_tty.cif (L_ECHOCTL(tty))
tty259drivers/char/n_tty.cwhile (tty->column > col) {
tty261drivers/char/n_tty.cput_char('\b', tty);
tty262drivers/char/n_tty.ctty->column--;
tty265drivers/char/n_tty.cif (iscntrl(c) && L_ECHOCTL(tty)) {
tty266drivers/char/n_tty.cput_char('\b', tty);
tty267drivers/char/n_tty.cput_char(' ', tty);
tty268drivers/char/n_tty.cput_char('\b', tty);
tty269drivers/char/n_tty.ctty->column--;
tty271drivers/char/n_tty.cif (!iscntrl(c) || L_ECHOCTL(tty)) {
tty272drivers/char/n_tty.cput_char('\b', tty);
tty273drivers/char/n_tty.cput_char(' ', tty);
tty274drivers/char/n_tty.cput_char('\b', tty);
tty275drivers/char/n_tty.ctty->column--;
tty282drivers/char/n_tty.cif (tty->read_head == tty->canon_head)
tty283drivers/char/n_tty.cfinish_erasing(tty);
tty286drivers/char/n_tty.cstatic void isig(int sig, struct tty_struct *tty)
tty288drivers/char/n_tty.cif (tty->pgrp > 0)
tty289drivers/char/n_tty.ckill_pg(tty->pgrp, sig, 1);
tty290drivers/char/n_tty.cif (!L_NOFLSH(tty)) {
tty291drivers/char/n_tty.cn_tty_flush_buffer(tty);
tty292drivers/char/n_tty.cif (tty->driver.flush_buffer)
tty293drivers/char/n_tty.ctty->driver.flush_buffer(tty);
tty297drivers/char/n_tty.cstatic inline void n_tty_receive_break(struct tty_struct *tty)
tty299drivers/char/n_tty.cif (I_IGNBRK(tty))
tty301drivers/char/n_tty.cif (I_BRKINT(tty)) {
tty302drivers/char/n_tty.cisig(SIGINT, tty);
tty305drivers/char/n_tty.cif (I_PARMRK(tty)) {
tty306drivers/char/n_tty.cput_tty_queue('\377', tty);
tty307drivers/char/n_tty.cput_tty_queue('\0', tty);
tty309drivers/char/n_tty.cput_tty_queue('\0', tty);
tty310drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty313drivers/char/n_tty.cstatic inline void n_tty_receive_overrun(struct tty_struct *tty)
tty317drivers/char/n_tty.ctty->num_overrun++;
tty318drivers/char/n_tty.cif (tty->overrun_time < (jiffies - HZ)) {
tty319drivers/char/n_tty.cprintk("%s: %d input overrun(s)\n", _tty_name(tty, buf),
tty320drivers/char/n_tty.ctty->num_overrun);
tty321drivers/char/n_tty.ctty->overrun_time = jiffies;
tty322drivers/char/n_tty.ctty->num_overrun = 0;
tty326drivers/char/n_tty.cstatic inline void n_tty_receive_parity_error(struct tty_struct *tty,
tty329drivers/char/n_tty.cif (I_IGNPAR(tty)) {
tty332drivers/char/n_tty.cif (I_PARMRK(tty)) {
tty333drivers/char/n_tty.cput_tty_queue('\377', tty);
tty334drivers/char/n_tty.cput_tty_queue('\0', tty);
tty335drivers/char/n_tty.cput_tty_queue(c, tty);
tty337drivers/char/n_tty.cput_tty_queue('\0', tty);
tty338drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty341drivers/char/n_tty.cstatic inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
tty343drivers/char/n_tty.cif (tty->raw) {
tty344drivers/char/n_tty.cput_tty_queue(c, tty);
tty348drivers/char/n_tty.cif (tty->stopped && I_IXON(tty) && I_IXANY(tty) && L_IEXTEN(tty)) {
tty349drivers/char/n_tty.cstart_tty(tty);
tty353drivers/char/n_tty.cif (I_ISTRIP(tty))
tty355drivers/char/n_tty.cif (I_IUCLC(tty) && L_IEXTEN(tty))
tty364drivers/char/n_tty.cif (!test_bit(c, &tty->process_char_map) || tty->lnext) {
tty365drivers/char/n_tty.cfinish_erasing(tty);
tty366drivers/char/n_tty.ctty->lnext = 0;
tty367drivers/char/n_tty.cif (L_ECHO(tty)) {
tty368drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty369drivers/char/n_tty.cput_char('\a', tty); /* beep if no space */
tty373drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty374drivers/char/n_tty.ctty->canon_column = tty->column;
tty375drivers/char/n_tty.cecho_char(c, tty);
tty377drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty378drivers/char/n_tty.cput_tty_queue(c, tty);
tty379drivers/char/n_tty.cput_tty_queue(c, tty);
tty384drivers/char/n_tty.cif (I_IGNCR(tty))
tty386drivers/char/n_tty.cif (I_ICRNL(tty))
tty388drivers/char/n_tty.c} else if (c == '\n' && I_INLCR(tty))
tty390drivers/char/n_tty.cif (I_IXON(tty)) {
tty391drivers/char/n_tty.cif (c == START_CHAR(tty)) {
tty392drivers/char/n_tty.cstart_tty(tty);
tty395drivers/char/n_tty.cif (c == STOP_CHAR(tty)) {
tty396drivers/char/n_tty.cstop_tty(tty);
tty400drivers/char/n_tty.cif (L_ISIG(tty)) {
tty401drivers/char/n_tty.cif (c == INTR_CHAR(tty)) {
tty402drivers/char/n_tty.cisig(SIGINT, tty);
tty405drivers/char/n_tty.cif (c == QUIT_CHAR(tty)) {
tty406drivers/char/n_tty.cisig(SIGQUIT, tty);
tty409drivers/char/n_tty.cif (c == SUSP_CHAR(tty)) {
tty410drivers/char/n_tty.cif (!is_orphaned_pgrp(tty->pgrp))
tty411drivers/char/n_tty.cisig(SIGTSTP, tty);
tty415drivers/char/n_tty.cif (L_ICANON(tty)) {
tty416drivers/char/n_tty.cif (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) ||
tty417drivers/char/n_tty.c(c == WERASE_CHAR(tty) && L_IEXTEN(tty))) {
tty418drivers/char/n_tty.ceraser(c, tty);
tty421drivers/char/n_tty.cif (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) {
tty422drivers/char/n_tty.ctty->lnext = 1;
tty423drivers/char/n_tty.cif (L_ECHO(tty)) {
tty424drivers/char/n_tty.cfinish_erasing(tty);
tty425drivers/char/n_tty.cif (L_ECHOCTL(tty)) {
tty426drivers/char/n_tty.cput_char('^', tty);
tty427drivers/char/n_tty.cput_char('\b', tty);
tty432drivers/char/n_tty.cif (c == REPRINT_CHAR(tty) && L_ECHO(tty) &&
tty433drivers/char/n_tty.cL_IEXTEN(tty)) {
tty434drivers/char/n_tty.cunsigned long tail = tty->canon_head;
tty436drivers/char/n_tty.cfinish_erasing(tty);
tty437drivers/char/n_tty.cecho_char(c, tty);
tty438drivers/char/n_tty.copost('\n', tty);
tty439drivers/char/n_tty.cwhile (tail != tty->read_head) {
tty440drivers/char/n_tty.cecho_char(tty->read_buf[tail], tty);
tty446drivers/char/n_tty.cif (L_ECHO(tty) || L_ECHONL(tty)) {
tty447drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty448drivers/char/n_tty.cput_char('\a', tty);
tty451drivers/char/n_tty.copost('\n', tty);
tty455drivers/char/n_tty.cif (c == EOF_CHAR(tty)) {
tty459drivers/char/n_tty.cif ((c == EOL_CHAR(tty)) ||
tty460drivers/char/n_tty.c(c == EOL2_CHAR(tty) && L_IEXTEN(tty))) {
tty464drivers/char/n_tty.cif (L_ECHO(tty)) {
tty465drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty466drivers/char/n_tty.cput_char('\a', tty);
tty470drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty471drivers/char/n_tty.ctty->canon_column = tty->column;
tty472drivers/char/n_tty.cecho_char(c, tty);
tty478drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty479drivers/char/n_tty.cput_tty_queue(c, tty);
tty482drivers/char/n_tty.cset_bit(tty->read_head, &tty->read_flags);
tty483drivers/char/n_tty.cput_tty_queue(c, tty);
tty484drivers/char/n_tty.ctty->canon_head = tty->read_head;
tty485drivers/char/n_tty.ctty->canon_data++;
tty486drivers/char/n_tty.cif (tty->fasync)
tty487drivers/char/n_tty.ckill_fasync(tty->fasync, SIGIO);
tty488drivers/char/n_tty.cif (tty->read_wait)
tty489drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty494drivers/char/n_tty.cfinish_erasing(tty);
tty495drivers/char/n_tty.cif (L_ECHO(tty)) {
tty496drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty497drivers/char/n_tty.cput_char('\a', tty); /* beep if no space */
tty501drivers/char/n_tty.copost('\n', tty);
tty504drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty505drivers/char/n_tty.ctty->canon_column = tty->column;
tty506drivers/char/n_tty.cecho_char(c, tty);
tty510drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty511drivers/char/n_tty.cput_tty_queue(c, tty);
tty513drivers/char/n_tty.cput_tty_queue(c, tty);
tty516drivers/char/n_tty.cstatic void n_tty_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty523drivers/char/n_tty.cif (!tty->read_buf)
tty526drivers/char/n_tty.cif (tty->real_raw) {
tty527drivers/char/n_tty.ci = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt,
tty528drivers/char/n_tty.cN_TTY_BUF_SIZE - tty->read_head));
tty529drivers/char/n_tty.cmemcpy(tty->read_buf + tty->read_head, cp, i);
tty530drivers/char/n_tty.ctty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty531drivers/char/n_tty.ctty->read_cnt += i;
tty535drivers/char/n_tty.ci = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt,
tty536drivers/char/n_tty.cN_TTY_BUF_SIZE - tty->read_head));
tty537drivers/char/n_tty.cmemcpy(tty->read_buf + tty->read_head, cp, i);
tty538drivers/char/n_tty.ctty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty539drivers/char/n_tty.ctty->read_cnt += i;
tty546drivers/char/n_tty.cn_tty_receive_char(tty, *p);
tty549drivers/char/n_tty.cn_tty_receive_break(tty);
tty553drivers/char/n_tty.cn_tty_receive_parity_error(tty, *p);
tty556drivers/char/n_tty.cn_tty_receive_overrun(tty);
tty559drivers/char/n_tty.cprintk("%s: unknown flag %d\n", tty_name(tty),
tty564drivers/char/n_tty.cif (tty->driver.flush_chars)
tty565drivers/char/n_tty.ctty->driver.flush_chars(tty);
tty568drivers/char/n_tty.cif (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
tty569drivers/char/n_tty.cif (tty->fasync)
tty570drivers/char/n_tty.ckill_fasync(tty->fasync, SIGIO);
tty571drivers/char/n_tty.cif (tty->read_wait)
tty572drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty575drivers/char/n_tty.cif ((tty->read_cnt >= TTY_THRESHOLD_THROTTLE) &&
tty576drivers/char/n_tty.ctty->driver.throttle &&
tty577drivers/char/n_tty.c!set_bit(TTY_THROTTLED, &tty->flags))
tty578drivers/char/n_tty.ctty->driver.throttle(tty);
tty581drivers/char/n_tty.cstatic int n_tty_receive_room(struct tty_struct *tty)
tty583drivers/char/n_tty.cint  left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
tty596drivers/char/n_tty.cstatic void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
tty598drivers/char/n_tty.cif (!tty)
tty601drivers/char/n_tty.ctty->icanon = (L_ICANON(tty) != 0);
tty602drivers/char/n_tty.cif (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) ||
tty603drivers/char/n_tty.cI_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) ||
tty604drivers/char/n_tty.cI_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) ||
tty605drivers/char/n_tty.cI_PARMRK(tty)) {
tty607drivers/char/n_tty.cmemset(tty->process_char_map, 0, 256/32);
tty609drivers/char/n_tty.cif (I_IGNCR(tty) || I_ICRNL(tty))
tty610drivers/char/n_tty.cset_bit('\r', &tty->process_char_map);
tty611drivers/char/n_tty.cif (I_INLCR(tty))
tty612drivers/char/n_tty.cset_bit('\n', &tty->process_char_map);
tty614drivers/char/n_tty.cif (L_ICANON(tty)) {
tty615drivers/char/n_tty.cset_bit(ERASE_CHAR(tty), &tty->process_char_map);
tty616drivers/char/n_tty.cset_bit(KILL_CHAR(tty), &tty->process_char_map);
tty617drivers/char/n_tty.cset_bit(EOF_CHAR(tty), &tty->process_char_map);
tty618drivers/char/n_tty.cset_bit('\n', &tty->process_char_map);
tty619drivers/char/n_tty.cset_bit(EOL_CHAR(tty), &tty->process_char_map);
tty620drivers/char/n_tty.cif (L_IEXTEN(tty)) {
tty621drivers/char/n_tty.cset_bit(WERASE_CHAR(tty),
tty622drivers/char/n_tty.c&tty->process_char_map);
tty623drivers/char/n_tty.cset_bit(LNEXT_CHAR(tty),
tty624drivers/char/n_tty.c&tty->process_char_map);
tty625drivers/char/n_tty.cset_bit(EOL2_CHAR(tty),
tty626drivers/char/n_tty.c&tty->process_char_map);
tty627drivers/char/n_tty.cif (L_ECHO(tty))
tty628drivers/char/n_tty.cset_bit(REPRINT_CHAR(tty),
tty629drivers/char/n_tty.c&tty->process_char_map);
tty632drivers/char/n_tty.cif (I_IXON(tty)) {
tty633drivers/char/n_tty.cset_bit(START_CHAR(tty), &tty->process_char_map);
tty634drivers/char/n_tty.cset_bit(STOP_CHAR(tty), &tty->process_char_map);
tty636drivers/char/n_tty.cif (L_ISIG(tty)) {
tty637drivers/char/n_tty.cset_bit(INTR_CHAR(tty), &tty->process_char_map);
tty638drivers/char/n_tty.cset_bit(QUIT_CHAR(tty), &tty->process_char_map);
tty639drivers/char/n_tty.cset_bit(SUSP_CHAR(tty), &tty->process_char_map);
tty641drivers/char/n_tty.cclear_bit(__DISABLED_CHAR, &tty->process_char_map);
tty643drivers/char/n_tty.ctty->raw = 0;
tty644drivers/char/n_tty.ctty->real_raw = 0;
tty646drivers/char/n_tty.ctty->raw = 1;
tty647drivers/char/n_tty.cif ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) &&
tty648drivers/char/n_tty.c(I_IGNPAR(tty) || !I_INPCK(tty)) &&
tty649drivers/char/n_tty.c(tty->driver.flags & TTY_DRIVER_REAL_RAW))
tty650drivers/char/n_tty.ctty->real_raw = 1;
tty652drivers/char/n_tty.ctty->real_raw = 0;
tty656drivers/char/n_tty.cstatic void n_tty_close(struct tty_struct *tty)
tty658drivers/char/n_tty.cwait_until_sent(tty, 0);
tty659drivers/char/n_tty.cn_tty_flush_buffer(tty);
tty660drivers/char/n_tty.cif (tty->read_buf) {
tty661drivers/char/n_tty.cfree_page((unsigned long) tty->read_buf);
tty662drivers/char/n_tty.ctty->read_buf = 0;
tty666drivers/char/n_tty.cstatic int n_tty_open(struct tty_struct *tty)
tty668drivers/char/n_tty.cif (!tty)
tty671drivers/char/n_tty.cif (!tty->read_buf) {
tty672drivers/char/n_tty.ctty->read_buf = (unsigned char *)
tty674drivers/char/n_tty.cif (!tty->read_buf)
tty677drivers/char/n_tty.cmemset(tty->read_buf, 0, N_TTY_BUF_SIZE);
tty678drivers/char/n_tty.ctty->read_head = tty->read_tail = tty->read_cnt = 0;
tty679drivers/char/n_tty.cmemset(tty->read_flags, 0, sizeof(tty->read_flags));
tty680drivers/char/n_tty.cn_tty_set_termios(tty, 0);
tty681drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty685drivers/char/n_tty.cstatic inline int input_available_p(struct tty_struct *tty, int amt)
tty687drivers/char/n_tty.cif (L_ICANON(tty)) {
tty688drivers/char/n_tty.cif (tty->canon_data)
tty690drivers/char/n_tty.c} else if (tty->read_cnt >= (amt ? amt : 1))
tty704drivers/char/n_tty.cstatic inline void copy_from_read_buf(struct tty_struct *tty,
tty711drivers/char/n_tty.cn = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail));
tty714drivers/char/n_tty.cmemcpy_tofs(*b, &tty->read_buf[tty->read_tail], n);
tty715drivers/char/n_tty.ctty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1);
tty716drivers/char/n_tty.ctty->read_cnt -= n;
tty727drivers/char/n_tty.cstatic inline void gobble_eof(struct tty_struct *tty)
tty730drivers/char/n_tty.cif ((tty->read_cnt) &&
tty731drivers/char/n_tty.c(tty->read_buf[tty->read_tail] == __DISABLED_CHAR) &&
tty732drivers/char/n_tty.cclear_bit(tty->read_tail, &tty->read_flags)) {
tty733drivers/char/n_tty.ctty->read_tail = (tty->read_tail+1) & (N_TTY_BUF_SIZE-1);
tty734drivers/char/n_tty.ctty->read_cnt--;
tty739drivers/char/n_tty.cstatic int read_chan(struct tty_struct *tty, struct file *file,
tty748drivers/char/n_tty.cif (!tty->read_buf) {
tty759drivers/char/n_tty.ccurrent->tty == tty) {
tty760drivers/char/n_tty.cif (tty->pgrp <= 0)
tty762drivers/char/n_tty.celse if (current->pgrp != tty->pgrp) {
tty771drivers/char/n_tty.cif (L_ICANON(tty)) {
tty775drivers/char/n_tty.ctime = (HZ / 10) * TIME_CHAR(tty);
tty776drivers/char/n_tty.cminimum = MIN_CHAR(tty);
tty780drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty781drivers/char/n_tty.celse if (!tty->read_wait ||
tty782drivers/char/n_tty.c(tty->minimum_to_wake > minimum))
tty783drivers/char/n_tty.ctty->minimum_to_wake = minimum;
tty790drivers/char/n_tty.ctty->minimum_to_wake = minimum = 1;
tty794drivers/char/n_tty.cadd_wait_queue(&tty->read_wait, &wait);
tty797drivers/char/n_tty.cif (tty->packet && tty->link->ctrl_status) {
tty800drivers/char/n_tty.cput_fs_byte(tty->link->ctrl_status, b++);
tty801drivers/char/n_tty.ctty->link->ctrl_status = 0;
tty809drivers/char/n_tty.cif (((minimum - (b - buf)) < tty->minimum_to_wake) &&
tty811drivers/char/n_tty.ctty->minimum_to_wake = (minimum - (b - buf));
tty813drivers/char/n_tty.cif (!input_available_p(tty, 0)) {
tty814drivers/char/n_tty.cif (tty->flags & (1 << TTY_SLAVE_CLOSED)) {
tty836drivers/char/n_tty.cif (tty->packet && b == buf) {
tty841drivers/char/n_tty.cif (L_ICANON(tty)) {
tty846drivers/char/n_tty.cif (!tty->read_cnt) {
tty850drivers/char/n_tty.ceol = clear_bit(tty->read_tail,
tty851drivers/char/n_tty.c&tty->read_flags);
tty852drivers/char/n_tty.cc = tty->read_buf[tty->read_tail];
tty853drivers/char/n_tty.ctty->read_tail = ((tty->read_tail+1) &
tty855drivers/char/n_tty.ctty->read_cnt--;
tty861drivers/char/n_tty.cgobble_eof(tty);
tty864drivers/char/n_tty.cif (--tty->canon_data < 0) {
tty865drivers/char/n_tty.ctty->canon_data = 0;
tty875drivers/char/n_tty.ccopy_from_read_buf(tty, &b, &nr);
tty876drivers/char/n_tty.ccopy_from_read_buf(tty, &b, &nr);
tty882drivers/char/n_tty.cif (tty->driver.unthrottle &&
tty883drivers/char/n_tty.c(tty->read_cnt <= TTY_THRESHOLD_UNTHROTTLE)
tty884drivers/char/n_tty.c&& clear_bit(TTY_THROTTLED, &tty->flags))
tty885drivers/char/n_tty.ctty->driver.unthrottle(tty);
tty892drivers/char/n_tty.cremove_wait_queue(&tty->read_wait, &wait);
tty894drivers/char/n_tty.cif (!tty->read_wait)
tty895drivers/char/n_tty.ctty->minimum_to_wake = minimum;
tty902drivers/char/n_tty.cstatic int write_chan(struct tty_struct * tty, struct file * file,
tty911drivers/char/n_tty.cif (L_TOSTOP(tty) && file->f_inode->i_rdev != CONSOLE_DEV) {
tty912drivers/char/n_tty.cretval = tty_check_change(tty);
tty917drivers/char/n_tty.cadd_wait_queue(&tty->write_wait, &wait);
tty924drivers/char/n_tty.cif (tty_hung_up_p(file) || (tty->link && !tty->link->count)) {
tty928drivers/char/n_tty.cif (O_OPOST(tty)) {
tty931drivers/char/n_tty.cif (opost(c, tty) < 0)
tty935drivers/char/n_tty.cif (tty->driver.flush_chars)
tty936drivers/char/n_tty.ctty->driver.flush_chars(tty);
tty938drivers/char/n_tty.cc = tty->driver.write(tty, 1, b, nr);
tty951drivers/char/n_tty.cremove_wait_queue(&tty->write_wait, &wait);
tty955drivers/char/n_tty.cstatic int normal_select(struct tty_struct * tty, struct inode * inode,
tty960drivers/char/n_tty.cif (input_available_p(tty, TIME_CHAR(tty) ? 0 :
tty961drivers/char/n_tty.cMIN_CHAR(tty)))
tty965drivers/char/n_tty.cif (tty->packet && tty->link->ctrl_status)
tty967drivers/char/n_tty.cif (tty->flags & (1 << TTY_SLAVE_CLOSED))
tty971drivers/char/n_tty.cif (!tty->read_wait) {
tty972drivers/char/n_tty.cif (MIN_CHAR(tty) && !TIME_CHAR(tty))
tty973drivers/char/n_tty.ctty->minimum_to_wake = MIN_CHAR(tty);
tty975drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty977drivers/char/n_tty.cselect_wait(&tty->read_wait, wait);
tty980drivers/char/n_tty.cif (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
tty982drivers/char/n_tty.cselect_wait(&tty->write_wait, wait);
tty63drivers/char/pty.cstatic void pty_close(struct tty_struct * tty, struct file * filp)
tty65drivers/char/pty.cif (!tty)
tty67drivers/char/pty.cif (tty->driver.subtype == PTY_TYPE_MASTER) {
tty68drivers/char/pty.cif (tty->count > 1)
tty69drivers/char/pty.cprintk("master pty_close: count = %d!!\n", tty->count);
tty71drivers/char/pty.cif (tty->count > 2)
tty74drivers/char/pty.cwake_up_interruptible(&tty->read_wait);
tty75drivers/char/pty.cwake_up_interruptible(&tty->write_wait);
tty76drivers/char/pty.cif (!tty->link)
tty78drivers/char/pty.cwake_up_interruptible(&tty->link->read_wait);
tty79drivers/char/pty.cwake_up_interruptible(&tty->link->write_wait);
tty80drivers/char/pty.cif (tty->driver.subtype == PTY_TYPE_MASTER)
tty81drivers/char/pty.ctty_hangup(tty->link);
tty83drivers/char/pty.cstart_tty(tty);
tty84drivers/char/pty.cset_bit(TTY_SLAVE_CLOSED, &tty->link->flags);
tty98drivers/char/pty.cstatic void pty_unthrottle(struct tty_struct * tty)
tty100drivers/char/pty.cstruct tty_struct *o_tty = tty->link;
tty109drivers/char/pty.cset_bit(TTY_THROTTLED, &tty->flags);
tty112drivers/char/pty.cstatic int pty_write(struct tty_struct * tty, int from_user,
tty115drivers/char/pty.cstruct tty_struct *to = tty->link;
tty119drivers/char/pty.cif (!to || tty->stopped)
tty125drivers/char/pty.c((tty->driver.subtype-1) * PTY_BUF_SIZE);
tty146drivers/char/pty.cstatic int pty_write_room(struct tty_struct *tty)
tty148drivers/char/pty.cstruct tty_struct *to = tty->link;
tty150drivers/char/pty.cif (!to || tty->stopped)
tty156drivers/char/pty.cstatic int pty_chars_in_buffer(struct tty_struct *tty)
tty158drivers/char/pty.cstruct tty_struct *to = tty->link;
tty166drivers/char/pty.cstatic void pty_flush_buffer(struct tty_struct *tty)
tty168drivers/char/pty.cstruct tty_struct *to = tty->link;
tty177drivers/char/pty.ctty->ctrl_status |= TIOCPKT_FLUSHWRITE;
tty182drivers/char/pty.cint pty_open(struct tty_struct *tty, struct file * filp)
tty187drivers/char/pty.cif (!tty || !tty->link)
tty189drivers/char/pty.cline = MINOR(tty->device) - tty->driver.minor_start;
tty193drivers/char/pty.ctty->driver_data = pty;
tty201drivers/char/pty.cif (tty->driver.subtype == PTY_TYPE_SLAVE)
tty202drivers/char/pty.cclear_bit(TTY_SLAVE_CLOSED, &tty->link->flags);
tty204drivers/char/pty.cset_bit(TTY_THROTTLED, &tty->flags);
tty207drivers/char/pty.cwhile (!tty->link->count && !(current->signal & ~current->blocked))
tty209drivers/char/pty.cif (!tty->link->count)
tty291drivers/char/serial.cstatic void rs_stop(struct tty_struct *tty)
tty293drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty296drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_stop"))
tty307drivers/char/serial.cstatic void rs_start(struct tty_struct *tty)
tty309drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty312drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_start"))
tty371drivers/char/serial.cstruct tty_struct *tty = info->tty;
tty378drivers/char/serial.cif (tty->flip.count >= TTY_FLIPBUF_SIZE)
tty380drivers/char/serial.ctty->flip.count++;
tty383drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_BREAK;
tty385drivers/char/serial.cdo_SAK(tty);
tty387drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_PARITY;
tty389drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_FRAME;
tty391drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
tty393drivers/char/serial.c*tty->flip.flag_buf_ptr++ = 0;
tty395drivers/char/serial.c*tty->flip.flag_buf_ptr++ = 0;
tty396drivers/char/serial.c*tty->flip.char_buf_ptr++ = ch;
tty398drivers/char/serial.cqueue_task_irq_off(&tty->flip.tqueue, &tq_timer);
tty415drivers/char/serial.cif ((info->xmit_cnt <= 0) || info->tty->stopped ||
tty416drivers/char/serial.cinfo->tty->hw_stopped) {
tty471drivers/char/serial.cif (info->tty->hw_stopped) {
tty476drivers/char/serial.cinfo->tty->hw_stopped = 0;
tty489drivers/char/serial.cinfo->tty->hw_stopped = 1;
tty519drivers/char/serial.cif (!info->tty ||
tty565drivers/char/serial.cif (!info || !info->tty)
tty606drivers/char/serial.cif (!info->tty)
tty658drivers/char/serial.cif (!info || !info->tty)
tty700drivers/char/serial.cstruct tty_struct  *tty;
tty702drivers/char/serial.ctty = info->tty;
tty703drivers/char/serial.cif (!tty)
tty707drivers/char/serial.ctty_hangup(tty);
tty713drivers/char/serial.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty714drivers/char/serial.ctty->ldisc.write_wakeup)
tty715drivers/char/serial.c(tty->ldisc.write_wakeup)(tty);
tty716drivers/char/serial.cwake_up_interruptible(&tty->write_wait);
tty842drivers/char/serial.cif (info->tty)
tty843drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty878drivers/char/serial.cif (info->tty)
tty879drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty900drivers/char/serial.cif (info->tty)
tty902drivers/char/serial.c&info->tty->flags);
tty953drivers/char/serial.cif (info->tty)
tty954drivers/char/serial.cclear_bit(TTY_IO_ERROR, &info->tty->flags);
tty1060drivers/char/serial.cif (!info->tty || (info->tty->termios->c_cflag & HUPCL)) {
tty1071drivers/char/serial.cif (info->tty)
tty1072drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty1089drivers/char/serial.cif (!info->tty || !info->tty->termios)
tty1091drivers/char/serial.ccflag = info->tty->termios->c_cflag;
tty1159drivers/char/serial.cif (I_INPCK(info->tty))
tty1161drivers/char/serial.cif (I_BRKINT(info->tty) || I_PARMRK(info->tty))
tty1165drivers/char/serial.cif (I_IGNPAR(info->tty))
tty1167drivers/char/serial.cif (I_IGNBRK(info->tty)) {
tty1173drivers/char/serial.cif (I_IGNPAR(info->tty))
tty1186drivers/char/serial.cstatic void rs_put_char(struct tty_struct *tty, unsigned char ch)
tty1188drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1191drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_put_char"))
tty1194drivers/char/serial.cif (!tty || !info->xmit_buf)
tty1209drivers/char/serial.cstatic void rs_flush_chars(struct tty_struct *tty)
tty1211drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1214drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
tty1217drivers/char/serial.cif (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
tty1227drivers/char/serial.cstatic int rs_write(struct tty_struct * tty, int from_user,
tty1231drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1234drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_write"))
tty1237drivers/char/serial.cif (!tty || !info->xmit_buf || !tmp_buf)
tty1264drivers/char/serial.cif (info->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
tty1273drivers/char/serial.cstatic int rs_write_room(struct tty_struct *tty)
tty1275drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1278drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_write_room"))
tty1286drivers/char/serial.cstatic int rs_chars_in_buffer(struct tty_struct *tty)
tty1288drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1290drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
tty1295drivers/char/serial.cstatic void rs_flush_buffer(struct tty_struct *tty)
tty1297drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1299drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
tty1304drivers/char/serial.cwake_up_interruptible(&tty->write_wait);
tty1305drivers/char/serial.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty1306drivers/char/serial.ctty->ldisc.write_wakeup)
tty1307drivers/char/serial.c(tty->ldisc.write_wakeup)(tty);
tty1318drivers/char/serial.cstatic void rs_throttle(struct tty_struct * tty)
tty1320drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1324drivers/char/serial.cprintk("throttle %s: %d....\n", _tty_name(tty, buf),
tty1325drivers/char/serial.ctty->ldisc.chars_in_buffer(tty));
tty1328drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_throttle"))
tty1331drivers/char/serial.cif (I_IXOFF(tty))
tty1332drivers/char/serial.cinfo->x_char = STOP_CHAR(tty);
tty1341drivers/char/serial.cstatic void rs_unthrottle(struct tty_struct * tty)
tty1343drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1347drivers/char/serial.cprintk("unthrottle %s: %d....\n", _tty_name(tty, buf),
tty1348drivers/char/serial.ctty->ldisc.chars_in_buffer(tty));
tty1351drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
tty1354drivers/char/serial.cif (I_IXOFF(tty)) {
tty1358drivers/char/serial.cinfo->x_char = START_CHAR(tty);
tty1626drivers/char/serial.cstatic int rs_ioctl(struct tty_struct *tty, struct file * file,
tty1630drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty1633drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_ioctl"))
tty1638drivers/char/serial.cretval = tty_check_change(tty);
tty1641drivers/char/serial.cwait_until_sent(tty, 0);
tty1646drivers/char/serial.cretval = tty_check_change(tty);
tty1649drivers/char/serial.cwait_until_sent(tty, 0);
tty1656drivers/char/serial.cput_fs_long(C_CLOCAL(tty) ? 1 : 0,
tty1661drivers/char/serial.ctty->termios->c_cflag =
tty1662drivers/char/serial.c((tty->termios->c_cflag & ~CLOCAL) |
tty1719drivers/char/serial.cstatic void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
tty1721drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1723drivers/char/serial.cif (tty->termios->c_cflag == old_termios->c_cflag)
tty1729drivers/char/serial.c!(tty->termios->c_cflag & CRTSCTS)) {
tty1730drivers/char/serial.ctty->hw_stopped = 0;
tty1731drivers/char/serial.crs_start(tty);
tty1735drivers/char/serial.c(tty->termios->c_cflag & CLOCAL))
tty1749drivers/char/serial.cstatic void rs_close(struct tty_struct *tty, struct file * filp)
tty1751drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty1753drivers/char/serial.cif (!info || serial_paranoia_check(info, tty->device, "rs_close"))
tty1762drivers/char/serial.cif ((tty->count == 1) && (info->count != 1)) {
tty1787drivers/char/serial.cinfo->normal_termios = *tty->termios;
tty1789drivers/char/serial.cinfo->callout_termios = *tty->termios;
tty1791drivers/char/serial.cwait_until_sent(tty, 3000); /* 30 seconds timeout */
tty1793drivers/char/serial.cif (tty->driver.flush_buffer)
tty1794drivers/char/serial.ctty->driver.flush_buffer(tty);
tty1795drivers/char/serial.cif (tty->ldisc.flush_buffer)
tty1796drivers/char/serial.ctty->ldisc.flush_buffer(tty);
tty1798drivers/char/serial.cinfo->tty = 0;
tty1799drivers/char/serial.cif (tty->ldisc.num != ldiscs[N_TTY].num) {
tty1800drivers/char/serial.cif (tty->ldisc.close)
tty1801drivers/char/serial.c(tty->ldisc.close)(tty);
tty1802drivers/char/serial.ctty->ldisc = ldiscs[N_TTY];
tty1803drivers/char/serial.ctty->termios->c_line = N_TTY;
tty1804drivers/char/serial.cif (tty->ldisc.open)
tty1805drivers/char/serial.c(tty->ldisc.open)(tty);
tty1823drivers/char/serial.cvoid rs_hangup(struct tty_struct *tty)
tty1825drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty1827drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_hangup"))
tty1834drivers/char/serial.cinfo->tty = 0;
tty1843drivers/char/serial.cstatic int block_til_ready(struct tty_struct *tty, struct file * filp,
tty1848drivers/char/serial.cint    do_clocal = C_CLOCAL(tty);
tty1870drivers/char/serial.cif (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
tty1967drivers/char/serial.cint rs_open(struct tty_struct *tty, struct file * filp)
tty1972drivers/char/serial.cline = MINOR(tty->device) - tty->driver.minor_start;
tty1976drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_open"))
tty1980drivers/char/serial.cprintk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
tty1984drivers/char/serial.ctty->driver_data = info;
tty1985drivers/char/serial.cinfo->tty = tty;
tty1994drivers/char/serial.cif (tty->driver.subtype == SERIAL_TYPE_NORMAL)
tty1995drivers/char/serial.c*tty->termios = info->normal_termios;
tty1997drivers/char/serial.c*tty->termios = info->callout_termios;
tty2006drivers/char/serial.cretval = block_til_ready(tty, filp, info);
tty2328drivers/char/serial.cinfo->tty = 0;
tty2441drivers/char/serial.cif (info->tty)
tty2442drivers/char/serial.ctty_hangup(info->tty);
tty69drivers/char/tty_io.cextern int set_selection(const int arg, struct tty_struct *tty);
tty70drivers/char/tty_io.cextern int paste_selection(struct tty_struct *tty);
tty90drivers/char/tty_io.cstatic void initialize_tty_struct(struct tty_struct *tty);
tty110drivers/char/tty_io.cchar *_tty_name(struct tty_struct *tty, char *buf)
tty112drivers/char/tty_io.csprintf(buf, "%s%d", tty->driver.name,
tty113drivers/char/tty_io.cMINOR(tty->device) - tty->driver.minor_start +
tty114drivers/char/tty_io.ctty->driver.name_base);
tty118drivers/char/tty_io.cchar *tty_name(struct tty_struct *tty)
tty122drivers/char/tty_io.creturn(_tty_name(tty, buf));
tty127drivers/char/tty_io.cinline int tty_paranoia_check(struct tty_struct *tty, dev_t device,
tty136drivers/char/tty_io.cif (!tty) {
tty140drivers/char/tty_io.cif (tty->magic != TTY_MAGIC) {
tty164drivers/char/tty_io.cstatic int tty_set_ldisc(struct tty_struct *tty, int ldisc)
tty173drivers/char/tty_io.cif (tty->ldisc.num == ldisc)
tty175drivers/char/tty_io.co_ldisc = tty->ldisc;
tty178drivers/char/tty_io.cif (tty->ldisc.close)
tty179drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty182drivers/char/tty_io.ctty->ldisc = ldiscs[ldisc];
tty183drivers/char/tty_io.ctty->termios->c_line = ldisc;
tty184drivers/char/tty_io.cif (tty->ldisc.open)
tty185drivers/char/tty_io.cretval = (tty->ldisc.open)(tty);
tty187drivers/char/tty_io.ctty->ldisc = o_ldisc;
tty188drivers/char/tty_io.ctty->termios->c_line = tty->ldisc.num;
tty189drivers/char/tty_io.cif (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) {
tty190drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty191drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty192drivers/char/tty_io.cif (tty->ldisc.open) {
tty193drivers/char/tty_io.cint r = tty->ldisc.open(tty);
tty198drivers/char/tty_io.ctty_name(tty), r);
tty202drivers/char/tty_io.cif (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
tty203drivers/char/tty_io.ctty->driver.set_ldisc(tty);
tty235drivers/char/tty_io.cint tty_check_change(struct tty_struct * tty)
tty237drivers/char/tty_io.cif (current->tty != tty)
tty239drivers/char/tty_io.cif (tty->pgrp <= 0) {
tty243drivers/char/tty_io.cif (current->pgrp == tty->pgrp)
tty307drivers/char/tty_io.cvoid do_tty_hangup(struct tty_struct * tty, struct file_operations *fops)
tty313drivers/char/tty_io.cif (!tty)
tty318drivers/char/tty_io.cif (filp->private_data != tty)
tty328drivers/char/tty_io.cif (tty->ldisc.flush_buffer)
tty329drivers/char/tty_io.ctty->ldisc.flush_buffer(tty);
tty330drivers/char/tty_io.cif (tty->driver.flush_buffer)
tty331drivers/char/tty_io.ctty->driver.flush_buffer(tty);
tty332drivers/char/tty_io.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty333drivers/char/tty_io.ctty->ldisc.write_wakeup)
tty334drivers/char/tty_io.c(tty->ldisc.write_wakeup)(tty);
tty335drivers/char/tty_io.cwake_up_interruptible(&tty->write_wait);
tty336drivers/char/tty_io.cwake_up_interruptible(&tty->read_wait);
tty342drivers/char/tty_io.cif (tty->ldisc.num != ldiscs[N_TTY].num) {
tty343drivers/char/tty_io.cif (tty->ldisc.close)
tty344drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty345drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty346drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty347drivers/char/tty_io.cif (tty->ldisc.open) {
tty348drivers/char/tty_io.ci = (tty->ldisc.open)(tty);
tty355drivers/char/tty_io.cif (tty->session > 0) {
tty356drivers/char/tty_io.ckill_sl(tty->session,SIGHUP,1);
tty357drivers/char/tty_io.ckill_sl(tty->session,SIGCONT,1);
tty359drivers/char/tty_io.ctty->flags = 0;
tty360drivers/char/tty_io.ctty->session = 0;
tty361drivers/char/tty_io.ctty->pgrp = -1;
tty363drivers/char/tty_io.cif (p->tty == tty)
tty364drivers/char/tty_io.cp->tty = NULL;
tty366drivers/char/tty_io.cif (tty->driver.hangup)
tty367drivers/char/tty_io.c(tty->driver.hangup)(tty);
tty370drivers/char/tty_io.cvoid tty_hangup(struct tty_struct * tty)
tty373drivers/char/tty_io.cprintk("%s hangup...\n", tty_name(tty));
tty375drivers/char/tty_io.cdo_tty_hangup(tty, &hung_up_tty_fops);
tty378drivers/char/tty_io.cvoid tty_vhangup(struct tty_struct * tty)
tty381drivers/char/tty_io.cprintk("%s vhangup...\n", tty_name(tty));
tty383drivers/char/tty_io.cdo_tty_hangup(tty, &hung_up_tty_fops);
tty403drivers/char/tty_io.cstruct tty_struct *tty = current->tty;
tty406drivers/char/tty_io.cif (!tty)
tty409drivers/char/tty_io.cif (tty->pgrp > 0) {
tty410drivers/char/tty_io.ckill_pg(tty->pgrp, SIGHUP, priv);
tty411drivers/char/tty_io.ckill_pg(tty->pgrp, SIGCONT, priv);
tty413drivers/char/tty_io.ctty->session = 0;
tty414drivers/char/tty_io.ctty->pgrp = -1;
tty418drivers/char/tty_io.cp->tty = NULL;
tty600drivers/char/tty_io.cvoid stop_tty(struct tty_struct *tty)
tty602drivers/char/tty_io.cif (tty->stopped)
tty604drivers/char/tty_io.ctty->stopped = 1;
tty605drivers/char/tty_io.cif (tty->link && tty->link->packet) {
tty606drivers/char/tty_io.ctty->ctrl_status &= ~TIOCPKT_START;
tty607drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_STOP;
tty608drivers/char/tty_io.cwake_up_interruptible(&tty->link->read_wait);
tty610drivers/char/tty_io.cif (tty->driver.stop)
tty611drivers/char/tty_io.c(tty->driver.stop)(tty);
tty614drivers/char/tty_io.cvoid start_tty(struct tty_struct *tty)
tty616drivers/char/tty_io.cif (!tty->stopped)
tty618drivers/char/tty_io.ctty->stopped = 0;
tty619drivers/char/tty_io.cif (tty->link && tty->link->packet) {
tty620drivers/char/tty_io.ctty->ctrl_status &= ~TIOCPKT_STOP;
tty621drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_START;
tty622drivers/char/tty_io.cwake_up_interruptible(&tty->link->read_wait);
tty624drivers/char/tty_io.cif (tty->driver.start)
tty625drivers/char/tty_io.c(tty->driver.start)(tty);
tty626drivers/char/tty_io.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty627drivers/char/tty_io.ctty->ldisc.write_wakeup)
tty628drivers/char/tty_io.c(tty->ldisc.write_wakeup)(tty);
tty629drivers/char/tty_io.cwake_up_interruptible(&tty->write_wait);
tty635drivers/char/tty_io.cstruct tty_struct * tty;
tty637drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty638drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_read"))
tty640drivers/char/tty_io.cif (!tty || (tty->flags & (1 << TTY_IO_ERROR)))
tty649drivers/char/tty_io.c(tty->pgrp > 0) &&
tty650drivers/char/tty_io.c(current->tty == tty) &&
tty651drivers/char/tty_io.c(tty->pgrp != current->pgrp))
tty659drivers/char/tty_io.cif (tty->ldisc.read)
tty661drivers/char/tty_io.ci = (tty->ldisc.read)(tty,file,(unsigned char *)buf,(unsigned int)count);
tty672drivers/char/tty_io.cstruct tty_struct * tty;
tty677drivers/char/tty_io.ctty = redirect;
tty679drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty680drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_write"))
tty682drivers/char/tty_io.cif (!tty || !tty->driver.write || (tty->flags & (1 << TTY_IO_ERROR)))
tty685drivers/char/tty_io.cif (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) &&
tty686drivers/char/tty_io.c(current->tty == tty) && (tty->pgrp != current->pgrp)) {
tty695drivers/char/tty_io.cif (tty->ldisc.write)
tty697drivers/char/tty_io.ci = (tty->ldisc.write)(tty,file,(unsigned char *)buf,(unsigned int)count);
tty712drivers/char/tty_io.cstruct tty_struct *tty, **tty_loc, *o_tty, **o_tty_loc;
tty724drivers/char/tty_io.ctty = o_tty = NULL;
tty741drivers/char/tty_io.cif (!*tty_loc && !tty) {
tty742drivers/char/tty_io.cif (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL)))
tty744drivers/char/tty_io.cinitialize_tty_struct(tty);
tty745drivers/char/tty_io.ctty->device = device;
tty746drivers/char/tty_io.ctty->driver = *driver;
tty812drivers/char/tty_io.ctty->termios = *tp_loc;
tty813drivers/char/tty_io.ctty->termios_locked = *ltp_loc;
tty814drivers/char/tty_io.c*tty_loc = tty;
tty817drivers/char/tty_io.cif (tty->ldisc.open) {
tty818drivers/char/tty_io.cretval = (tty->ldisc.open)(tty);
tty821drivers/char/tty_io.ctty = NULL;
tty825drivers/char/tty_io.ctty = NULL;
tty861drivers/char/tty_io.cif (tty)
tty862drivers/char/tty_io.cfree_page((unsigned long) tty);
tty883drivers/char/tty_io.cstruct tty_struct *tty, *o_tty;
tty889drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty890drivers/char/tty_io.cif (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev"))
tty895drivers/char/tty_io.ctp = tty->termios;
tty896drivers/char/tty_io.cltp = tty->termios_locked;
tty898drivers/char/tty_io.cidx = MINOR(tty->device) - tty->driver.minor_start;
tty900drivers/char/tty_io.cif (idx < 0 || idx >= tty->driver.num) {
tty902drivers/char/tty_io.cMAJOR(tty->device), MINOR(tty->device));
tty905drivers/char/tty_io.cif (tty != tty->driver.table[idx]) {
tty907drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty910drivers/char/tty_io.cif (tp != tty->driver.termios[idx]) {
tty912drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty915drivers/char/tty_io.cif (ltp != tty->driver.termios_locked[idx]) {
tty917drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty923drivers/char/tty_io.cprintk("release_dev of %s (tty count=%d)...", tty_name(tty),
tty924drivers/char/tty_io.ctty->count);
tty927drivers/char/tty_io.co_tty = tty->link;
tty932drivers/char/tty_io.cif (tty->driver.other) {
tty933drivers/char/tty_io.cif (o_tty != tty->driver.other->table[idx]) {
tty935drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty938drivers/char/tty_io.cif (o_tp != tty->driver.other->termios[idx]) {
tty940drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty943drivers/char/tty_io.cif (o_ltp != tty->driver.other->termios_locked[idx]) {
tty945drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty949drivers/char/tty_io.cif (o_tty->link != tty) {
tty956drivers/char/tty_io.cif (tty->driver.close)
tty957drivers/char/tty_io.ctty->driver.close(tty, filp);
tty958drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty959drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER) {
tty960drivers/char/tty_io.cif (--tty->link->count < 0) {
tty962drivers/char/tty_io.ctty->count, tty_name(tty));
tty963drivers/char/tty_io.ctty->link->count = 0;
tty966drivers/char/tty_io.cif (--tty->count < 0) {
tty968drivers/char/tty_io.ctty->count, tty_name(tty));
tty969drivers/char/tty_io.ctty->count = 0;
tty971drivers/char/tty_io.cif (tty->count)
tty979drivers/char/tty_io.cif ((*p) && (*p)->tty == tty)
tty980drivers/char/tty_io.c(*p)->tty = NULL;
tty986drivers/char/tty_io.ctty->driver.other->table[idx] = NULL;
tty987drivers/char/tty_io.ctty->driver.other->termios[idx] = NULL;
tty988drivers/char/tty_io.ctty->driver.other->termios_locked[idx] = NULL;
tty999drivers/char/tty_io.cif (tty->ldisc.close)
tty1000drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty1001drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty1002drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty1004drivers/char/tty_io.ctty->driver.table[idx] = NULL;
tty1005drivers/char/tty_io.cif (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
tty1006drivers/char/tty_io.ctty->driver.termios[idx] = NULL;
tty1007drivers/char/tty_io.ctty->driver.termios_locked[idx] = NULL;
tty1011drivers/char/tty_io.cif (tty == redirect || o_tty == redirect)
tty1018drivers/char/tty_io.cif (tty->flip.tqueue.sync) {
tty1022drivers/char/tty_io.cif (tq == &tty->flip.tqueue) {
tty1032drivers/char/tty_io.ctty->magic = 0;
tty1033drivers/char/tty_io.c(*tty->driver.refcount)--;
tty1034drivers/char/tty_io.cfree_page((unsigned long) tty);
tty1060drivers/char/tty_io.cstruct tty_struct *tty;
tty1069drivers/char/tty_io.cif (!current->tty)
tty1071drivers/char/tty_io.cdevice = current->tty->device;
tty1080drivers/char/tty_io.cretval = init_dev(device, &tty);
tty1081drivers/char/tty_io.cfilp->private_data = tty;
tty1084drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty1085drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER)
tty1088drivers/char/tty_io.cprintk("opening %s...", tty_name(tty));
tty1090drivers/char/tty_io.cif (test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser())
tty1092drivers/char/tty_io.celse if (tty->driver.open)
tty1093drivers/char/tty_io.cretval = tty->driver.open(tty, filp);
tty1099drivers/char/tty_io.cprintk("error %d in opening %s...", retval, tty_name(tty));
tty1116drivers/char/tty_io.c!current->tty &&
tty1117drivers/char/tty_io.ctty->session == 0) {
tty1118drivers/char/tty_io.ccurrent->tty = tty;
tty1119drivers/char/tty_io.ctty->session = current->session;
tty1120drivers/char/tty_io.ctty->pgrp = current->pgrp;
tty1137drivers/char/tty_io.cstruct tty_struct * tty;
tty1139drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty1140drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_select"))
tty1143drivers/char/tty_io.cif (tty->ldisc.select)
tty1144drivers/char/tty_io.creturn (tty->ldisc.select)(tty, inode, filp, sel_type, wait);
tty1150drivers/char/tty_io.cstruct tty_struct * tty;
tty1153drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty1154drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync"))
tty1157drivers/char/tty_io.cfor (fa = tty->fasync, prev = 0; fa; prev= fa, fa = fa->fa_next) {
tty1170drivers/char/tty_io.cfa->fa_next = tty->fasync;
tty1171drivers/char/tty_io.ctty->fasync = fa;
tty1172drivers/char/tty_io.cif (!tty->read_wait)
tty1173drivers/char/tty_io.ctty->minimum_to_wake = 1;
tty1180drivers/char/tty_io.ctty->fasync = fa->fa_next;
tty1182drivers/char/tty_io.cif (!tty->fasync && !tty->read_wait)
tty1183drivers/char/tty_io.ctty->minimum_to_wake = N_TTY_BUF_SIZE;
tty1224drivers/char/tty_io.cstruct tty_struct * tty;
tty1231drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty1232drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
tty1235drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty1236drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER)
tty1237drivers/char/tty_io.creal_tty = tty->link;
tty1239drivers/char/tty_io.creal_tty = tty;
tty1243drivers/char/tty_io.cif ((current->tty != tty) && !suser())
tty1246drivers/char/tty_io.ctty->ldisc.receive_buf(tty, &ch, &mbz, 1);
tty1253drivers/char/tty_io.cmemcpy_tofs((struct winsize *) arg, &tty->winsize,
tty1259drivers/char/tty_io.cif (memcmp(&tmp_ws, &tty->winsize,
tty1261drivers/char/tty_io.cif (tty->pgrp > 0)
tty1262drivers/char/tty_io.ckill_pg(tty->pgrp, SIGWINCH, 1);
tty1263drivers/char/tty_io.cif ((real_tty->pgrp != tty->pgrp) &&
tty1267drivers/char/tty_io.ctty->winsize = tmp_ws;
tty1271drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
tty1289drivers/char/tty_io.cset_bit(TTY_EXCLUSIVE, &tty->flags);
tty1292drivers/char/tty_io.cclear_bit(TTY_EXCLUSIVE, &tty->flags);
tty1295drivers/char/tty_io.cif (current->tty != tty)
tty1299drivers/char/tty_io.ccurrent->tty = NULL;
tty1303drivers/char/tty_io.c(current->session == tty->session))
tty1309drivers/char/tty_io.cif (!current->leader || current->tty)
tty1311drivers/char/tty_io.cif (tty->session > 0) {
tty1323drivers/char/tty_io.cif (p->tty == tty)
tty1324drivers/char/tty_io.cp->tty = NULL;
tty1328drivers/char/tty_io.ccurrent->tty = tty;
tty1329drivers/char/tty_io.ctty->session = current->session;
tty1330drivers/char/tty_io.ctty->pgrp = current->pgrp;
tty1337drivers/char/tty_io.cif (tty == real_tty && current->tty != real_tty)
tty1349drivers/char/tty_io.cif (!current->tty ||
tty1350drivers/char/tty_io.c(current->tty != real_tty) ||
tty1365drivers/char/tty_io.cput_fs_long(tty->ldisc.num, (unsigned long *) arg);
tty1368drivers/char/tty_io.cretval = tty_check_change(tty);
tty1372drivers/char/tty_io.creturn tty_set_ldisc(tty, arg);
tty1383drivers/char/tty_io.creturn set_selection(arg, tty);
tty1385drivers/char/tty_io.creturn paste_selection(tty);
tty1402drivers/char/tty_io.cif (tty->driver.ioctl) {
tty1403drivers/char/tty_io.cretval = (tty->driver.ioctl)(tty, file,
tty1408drivers/char/tty_io.cif (tty->ldisc.ioctl) {
tty1409drivers/char/tty_io.cretval = (tty->ldisc.ioctl)(tty, file,
tty1431drivers/char/tty_io.cvoid do_SAK( struct tty_struct *tty)
tty1434drivers/char/tty_io.ctty_hangup(tty);
tty1437drivers/char/tty_io.cint session = tty->session;
tty1441drivers/char/tty_io.cif (tty->ldisc.flush_buffer)
tty1442drivers/char/tty_io.ctty->ldisc.flush_buffer(tty);
tty1443drivers/char/tty_io.cif (tty->driver.flush_buffer)
tty1444drivers/char/tty_io.ctty->driver.flush_buffer(tty);
tty1448drivers/char/tty_io.cif (((*p)->tty == tty) ||
tty1455drivers/char/tty_io.c(filp->private_data == tty)) {
tty1471drivers/char/tty_io.cstruct tty_struct *tty = (struct tty_struct *) private_;
tty1476drivers/char/tty_io.cif (tty->flip.buf_num) {
tty1477drivers/char/tty_io.ccp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
tty1478drivers/char/tty_io.cfp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
tty1479drivers/char/tty_io.ctty->flip.buf_num = 0;
tty1482drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf;
tty1483drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf;
tty1485drivers/char/tty_io.ccp = tty->flip.char_buf;
tty1486drivers/char/tty_io.cfp = tty->flip.flag_buf;
tty1487drivers/char/tty_io.ctty->flip.buf_num = 1;
tty1490drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
tty1491drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
tty1493drivers/char/tty_io.ccount = tty->flip.count;
tty1494drivers/char/tty_io.ctty->flip.count = 0;
tty1498drivers/char/tty_io.cif (count > tty->max_flip_cnt)
tty1499drivers/char/tty_io.ctty->max_flip_cnt = count;
tty1501drivers/char/tty_io.ctty->ldisc.receive_buf(tty, cp, fp, count);
tty1507drivers/char/tty_io.cstatic void initialize_tty_struct(struct tty_struct *tty)
tty1509drivers/char/tty_io.cmemset(tty, 0, sizeof(struct tty_struct));
tty1510drivers/char/tty_io.ctty->magic = TTY_MAGIC;
tty1511drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty1512drivers/char/tty_io.ctty->pgrp = -1;
tty1513drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf;
tty1514drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf;
tty1515drivers/char/tty_io.ctty->flip.tqueue.routine = flush_to_ldisc;
tty1516drivers/char/tty_io.ctty->flip.tqueue.data = tty;
tty1522drivers/char/tty_io.cvoid tty_default_put_char(struct tty_struct *tty, unsigned char ch)
tty1524drivers/char/tty_io.ctty->driver.write(tty, 0, &ch, 1);
tty41drivers/char/tty_ioctl.cvoid wait_until_sent(struct tty_struct * tty, int timeout)
tty45drivers/char/tty_ioctl.cif (!tty->driver.chars_in_buffer ||
tty46drivers/char/tty_ioctl.c!tty->driver.chars_in_buffer(tty))
tty48drivers/char/tty_ioctl.cadd_wait_queue(&tty->write_wait, &wait);
tty58drivers/char/tty_ioctl.cif (!tty->driver.chars_in_buffer(tty))
tty63drivers/char/tty_ioctl.cremove_wait_queue(&tty->write_wait, &wait);
tty89drivers/char/tty_ioctl.cstatic int set_termios(struct tty_struct * tty, unsigned long arg, int opt)
tty93drivers/char/tty_ioctl.cstruct termios old_termios = *tty->termios;
tty96drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty101drivers/char/tty_ioctl.ctmp_termios = *tty->termios;
tty116drivers/char/tty_ioctl.cif ((opt & TERMIOS_FLUSH) && tty->ldisc.flush_buffer)
tty117drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty120drivers/char/tty_ioctl.cwait_until_sent(tty, 0);
tty123drivers/char/tty_ioctl.c*tty->termios = tmp_termios;
tty124drivers/char/tty_ioctl.cunset_locked_termios(tty->termios, &old_termios, tty->termios_locked);
tty125drivers/char/tty_ioctl.ccanon_change = (old_termios.c_lflag ^ tty->termios->c_lflag) & ICANON;
tty127drivers/char/tty_ioctl.cmemset(&tty->read_flags, 0, sizeof tty->read_flags);
tty128drivers/char/tty_ioctl.ctty->canon_head = tty->read_tail;
tty129drivers/char/tty_ioctl.ctty->canon_data = 0;
tty130drivers/char/tty_ioctl.ctty->erasing = 0;
tty133drivers/char/tty_ioctl.cif (canon_change && !L_ICANON(tty) && tty->read_cnt)
tty135drivers/char/tty_ioctl.cwake_up_interruptible(&tty->read_wait);
tty139drivers/char/tty_ioctl.cif (tty->link && tty->link->packet) {
tty143drivers/char/tty_ioctl.cint new_flow = (I_IXON(tty) &&
tty144drivers/char/tty_ioctl.cSTOP_CHAR(tty) == '\023' &&
tty145drivers/char/tty_ioctl.cSTART_CHAR(tty) == '\021');
tty147drivers/char/tty_ioctl.ctty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP);
tty149drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_DOSTOP;
tty151drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_NOSTOP;
tty152drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->read_wait);
tty156drivers/char/tty_ioctl.cif (tty->driver.set_termios)
tty157drivers/char/tty_ioctl.c(*tty->driver.set_termios)(tty, &old_termios);
tty159drivers/char/tty_ioctl.cif (tty->ldisc.set_termios)
tty160drivers/char/tty_ioctl.c(*tty->ldisc.set_termios)(tty, &old_termios);
tty165drivers/char/tty_ioctl.cstatic int get_termio(struct tty_struct * tty, struct termio * termio)
tty173drivers/char/tty_ioctl.ctmp_termio.c_iflag = tty->termios->c_iflag;
tty174drivers/char/tty_ioctl.ctmp_termio.c_oflag = tty->termios->c_oflag;
tty175drivers/char/tty_ioctl.ctmp_termio.c_cflag = tty->termios->c_cflag;
tty176drivers/char/tty_ioctl.ctmp_termio.c_lflag = tty->termios->c_lflag;
tty177drivers/char/tty_ioctl.ctmp_termio.c_line = tty->termios->c_line;
tty179drivers/char/tty_ioctl.ctmp_termio.c_cc[i] = tty->termios->c_cc[i];
tty184drivers/char/tty_ioctl.cstatic unsigned long inq_canon(struct tty_struct * tty)
tty188drivers/char/tty_ioctl.cif (!tty->canon_data || !tty->read_buf)
tty190drivers/char/tty_ioctl.chead = tty->canon_head;
tty191drivers/char/tty_ioctl.ctail = tty->read_tail;
tty195drivers/char/tty_ioctl.cif (test_bit(tail, &tty->read_flags) &&
tty196drivers/char/tty_ioctl.ctty->read_buf[tail] == __DISABLED_CHAR)
tty203drivers/char/tty_ioctl.cint n_tty_ioctl(struct tty_struct * tty, struct file * file,
tty210drivers/char/tty_ioctl.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty211drivers/char/tty_ioctl.ctty->driver.subtype == PTY_TYPE_MASTER)
tty212drivers/char/tty_ioctl.creal_tty = tty->link;
tty214drivers/char/tty_ioctl.creal_tty = tty;
tty241drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty246drivers/char/tty_ioctl.cstop_tty(tty);
tty249drivers/char/tty_ioctl.cstart_tty(tty);
tty252drivers/char/tty_ioctl.cif (STOP_CHAR(tty) != __DISABLED_CHAR)
tty253drivers/char/tty_ioctl.ctty->driver.write(tty, 0,
tty254drivers/char/tty_ioctl.c&STOP_CHAR(tty), 1);
tty257drivers/char/tty_ioctl.cif (START_CHAR(tty) != __DISABLED_CHAR)
tty258drivers/char/tty_ioctl.ctty->driver.write(tty, 0,
tty259drivers/char/tty_ioctl.c&START_CHAR(tty), 1);
tty266drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty271drivers/char/tty_ioctl.cif (tty->ldisc.flush_buffer)
tty272drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty275drivers/char/tty_ioctl.cif (tty->ldisc.flush_buffer)
tty276drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty279drivers/char/tty_ioctl.cif (tty->driver.flush_buffer)
tty280drivers/char/tty_ioctl.ctty->driver.flush_buffer(tty);
tty291drivers/char/tty_ioctl.cif (tty->driver.chars_in_buffer)
tty292drivers/char/tty_ioctl.cput_fs_long(tty->driver.chars_in_buffer(tty),
tty302drivers/char/tty_ioctl.cif (L_ICANON(tty))
tty303drivers/char/tty_ioctl.cput_fs_long(inq_canon(tty),
tty306drivers/char/tty_ioctl.cput_fs_long(tty->read_cnt,
tty328drivers/char/tty_ioctl.cif (tty->driver.type != TTY_DRIVER_TYPE_PTY ||
tty329drivers/char/tty_ioctl.ctty->driver.subtype != PTY_TYPE_MASTER)
tty336drivers/char/tty_ioctl.cif (!tty->packet) {
tty337drivers/char/tty_ioctl.ctty->packet = 1;
tty338drivers/char/tty_ioctl.ctty->link->ctrl_status = 0;
tty341drivers/char/tty_ioctl.ctty->packet = 0;
tty346drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty349drivers/char/tty_ioctl.cwait_until_sent(tty, 0);
tty350drivers/char/tty_ioctl.cif (!tty->driver.ioctl)
tty352drivers/char/tty_ioctl.ctty->driver.ioctl(tty, file, cmd, arg);
tty118drivers/char/vt.cint vt_ioctl(struct tty_struct *tty, struct file * file,
tty124drivers/char/vt.cstruct vt_struct *vt = (struct vt_struct *)tty->driver_data;
tty240drivers/char/vt.cif (tty->ldisc.flush_buffer)
tty241drivers/char/vt.ctty->ldisc.flush_buffer(tty);
tty102drivers/net/ppp.c#define ppp_find(tty) ((struct ppp *) tty->disc_data)
tty143drivers/net/ppp.cstatic int ppp_select(struct tty_struct *tty, struct inode * inode,
tty149drivers/net/ppp.cstatic int ppp_receive_room(struct tty_struct *tty);
tty150drivers/net/ppp.cstatic void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty152drivers/net/ppp.cstatic void ppp_write_wakeup(struct tty_struct *tty);
tty260drivers/net/ppp.cppp->tty   = NULL;
tty462drivers/net/ppp.cif (ppp->tty != NULL && ppp->tty->disc_data == ppp)
tty463drivers/net/ppp.cppp->tty->disc_data = NULL; /* Break the tty->ppp link */
tty487drivers/net/ppp.cppp->tty   = NULL;
tty491drivers/net/ppp.cppp_close(struct tty_struct *tty)
tty493drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty507drivers/net/ppp.cppp_open(struct tty_struct *tty)
tty509drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty526drivers/net/ppp.cppp->tty = tty;
tty529drivers/net/ppp.ctty->disc_data = ppp;
tty530drivers/net/ppp.cif (tty->driver.flush_buffer)
tty531drivers/net/ppp.ctty->driver.flush_buffer(tty);
tty532drivers/net/ppp.cif (tty->ldisc.flush_buffer)
tty533drivers/net/ppp.ctty->ldisc.flush_buffer(tty);
tty535drivers/net/ppp.ctty_read_flush (tty);
tty536drivers/net/ppp.ctty_write_flush (tty);
tty579drivers/net/ppp.cif (ppp->tty == NULL) {
tty597drivers/net/ppp.cif (ppp->tty == NULL) {
tty675drivers/net/ppp.canswer = tty_write_data (ppp->tty,
tty699drivers/net/ppp.cactual = ppp->tty->driver.write(ppp->tty, 0, ppp->xbuff, count);
tty705drivers/net/ppp.cppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
tty709drivers/net/ppp.cstatic void ppp_write_wakeup(struct tty_struct *tty)
tty712drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty734drivers/net/ppp.cactual = tty->driver.write(tty, 0, ppp->xtail, count);
tty738drivers/net/ppp.ctty->flags &= ~TTY_DO_WRITE_WAKEUP;
tty783drivers/net/ppp.cppp_dump_inqueue(struct tty_struct *tty)
tty785drivers/net/ppp.cint  head = tty->read_q.head,
tty786drivers/net/ppp.ctail = tty->read_q.tail,
tty791drivers/net/ppp.c(unsigned int) tty->termios->c_iflag))
tty797drivers/net/ppp.cbuffer [count] = tty->read_q.buf[i];
tty810drivers/net/ppp.cvoid ppp_tty_input_ready(struct tty_struct *tty)
tty812drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty827drivers/net/ppp.cppp_dump_inqueue(ppp->tty);
tty830drivers/net/ppp.cn = tty_read_raw_data(tty, buff, 128);
tty905drivers/net/ppp.cstatic int ppp_receive_room(struct tty_struct *tty)
tty911drivers/net/ppp.cstatic void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty914drivers/net/ppp.cregister struct ppp *ppp = ppp_find (tty);
tty1179drivers/net/ppp.ckill_fasync(ppp->tty->fasync, SIGIO);
tty1214drivers/net/ppp.cppp_read(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr)
tty1216drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1315drivers/net/ppp.cppp_write(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr)
tty1317drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1390drivers/net/ppp.cppp_ioctl(struct tty_struct *tty, struct file *file, unsigned int i,
tty1393drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1590drivers/net/ppp.cerror = n_tty_ioctl(tty, file, i, l);
tty1613drivers/net/ppp.cppp_select (struct tty_struct *tty, struct inode * inode,
tty1616drivers/net/ppp.cstruct ppp *ppp = ppp_find (tty);
tty1640drivers/net/ppp.cif (tty->packet && tty->link->ctrl_status)
tty1644drivers/net/ppp.cif (tty->flags & (1 << TTY_SLAVE_CLOSED))
tty1679drivers/net/ppp.cstruct tty_struct *tty;
tty1693drivers/net/ppp.ctty   = ppp->tty;
tty1703drivers/net/ppp.cif (tty == NULL) {
tty1890drivers/net/ppp.cppp_find(struct tty_struct *tty)
tty1894drivers/net/ppp.cif (ppp_ctrl[i].inuse && (ppp_ctrl[i].tty == tty)) return &ppp_ctrl[i];
tty97drivers/net/slip.csl->tty    = NULL;
tty131drivers/net/slip.csl->tty = NULL;
tty151drivers/net/slip.csl->tty = NULL;
tty381drivers/net/slip.cactual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
tty388drivers/net/slip.csl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
tty396drivers/net/slip.cstatic void slip_write_wakeup(struct tty_struct *tty)
tty399drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty419drivers/net/slip.canswer = tty->driver.write(tty, 0, sl->xtail, count);
tty422drivers/net/slip.ctty->flags &= ~TTY_DO_WRITE_WAKEUP;
tty452drivers/net/slip.cstruct tty_struct *tty;
tty458drivers/net/slip.ctty = sl->tty;
tty538drivers/net/slip.cif (sl->tty == NULL) {
tty617drivers/net/slip.cif (sl->tty == NULL) {
tty620drivers/net/slip.csl->tty->disc_data = 0;
tty635drivers/net/slip.cstatic int slip_receive_room(struct tty_struct *tty)
tty646drivers/net/slip.cstatic void slip_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty649drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty683drivers/net/slip.cslip_open(struct tty_struct *tty)
tty685drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty696drivers/net/slip.csl->tty = tty;
tty697drivers/net/slip.ctty->disc_data = sl;
tty698drivers/net/slip.cif (tty->driver.flush_buffer)
tty699drivers/net/slip.ctty->driver.flush_buffer(tty);
tty700drivers/net/slip.cif (tty->ldisc.flush_buffer)
tty701drivers/net/slip.ctty->ldisc.flush_buffer(tty);
tty749drivers/net/slip.cslip_close(struct tty_struct *tty)
tty751drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty942drivers/net/slip.cslip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
tty944drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty989drivers/net/slip.creturn n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg);
tty44drivers/net/slip.hstruct tty_struct  *tty;    /* ptr to TTY structure    */
tty520fs/open.cif (current->tty)
tty521fs/open.ctty_vhangup(current->tty);
tty319fs/proc/array.cif ((*p)->tty)
tty320fs/proc/array.ctty_pgrp = (*p)->tty->pgrp;
tty332fs/proc/array.c(*p)->tty ? (*p)->tty->device : 0,
tty189include/linux/ppp.hstruct tty_struct  *tty;    /* ptr to TTY structure    */
tty290include/linux/sched.hstruct tty_struct *tty; /* NULL if no tty */
tty90include/linux/serial.hstruct tty_struct   *tty;
tty94include/linux/tty.h#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR])
tty95include/linux/tty.h#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT])
tty96include/linux/tty.h#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE])
tty97include/linux/tty.h#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL])
tty98include/linux/tty.h#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF])
tty99include/linux/tty.h#define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME])
tty100include/linux/tty.h#define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN])
tty101include/linux/tty.h#define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC])
tty102include/linux/tty.h#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART])
tty103include/linux/tty.h#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP])
tty104include/linux/tty.h#define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP])
tty105include/linux/tty.h#define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL])
tty106include/linux/tty.h#define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT])
tty107include/linux/tty.h#define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD])
tty108include/linux/tty.h#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE])
tty109include/linux/tty.h#define LNEXT_CHAR(tty)  ((tty)->termios->c_cc[VLNEXT])
tty110include/linux/tty.h#define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2])
tty112include/linux/tty.h#define _I_FLAG(tty,f)  ((tty)->termios->c_iflag & (f))
tty113include/linux/tty.h#define _O_FLAG(tty,f)  ((tty)->termios->c_oflag & (f))
tty114include/linux/tty.h#define _C_FLAG(tty,f)  ((tty)->termios->c_cflag & (f))
tty115include/linux/tty.h#define _L_FLAG(tty,f)  ((tty)->termios->c_lflag & (f))
tty117include/linux/tty.h#define I_IGNBRK(tty)  _I_FLAG((tty),IGNBRK)
tty118include/linux/tty.h#define I_BRKINT(tty)  _I_FLAG((tty),BRKINT)
tty119include/linux/tty.h#define I_IGNPAR(tty)  _I_FLAG((tty),IGNPAR)
tty120include/linux/tty.h#define I_PARMRK(tty)  _I_FLAG((tty),PARMRK)
tty121include/linux/tty.h#define I_INPCK(tty)  _I_FLAG((tty),INPCK)
tty122include/linux/tty.h#define I_ISTRIP(tty)  _I_FLAG((tty),ISTRIP)
tty123include/linux/tty.h#define I_INLCR(tty)  _I_FLAG((tty),INLCR)
tty124include/linux/tty.h#define I_IGNCR(tty)  _I_FLAG((tty),IGNCR)
tty125include/linux/tty.h#define I_ICRNL(tty)  _I_FLAG((tty),ICRNL)
tty126include/linux/tty.h#define I_IUCLC(tty)  _I_FLAG((tty),IUCLC)
tty127include/linux/tty.h#define I_IXON(tty)  _I_FLAG((tty),IXON)
tty128include/linux/tty.h#define I_IXANY(tty)  _I_FLAG((tty),IXANY)
tty129include/linux/tty.h#define I_IXOFF(tty)  _I_FLAG((tty),IXOFF)
tty130include/linux/tty.h#define I_IMAXBEL(tty)  _I_FLAG((tty),IMAXBEL)
tty132include/linux/tty.h#define O_OPOST(tty)  _O_FLAG((tty),OPOST)
tty133include/linux/tty.h#define O_OLCUC(tty)  _O_FLAG((tty),OLCUC)
tty134include/linux/tty.h#define O_ONLCR(tty)  _O_FLAG((tty),ONLCR)
tty135include/linux/tty.h#define O_OCRNL(tty)  _O_FLAG((tty),OCRNL)
tty136include/linux/tty.h#define O_ONOCR(tty)  _O_FLAG((tty),ONOCR)
tty137include/linux/tty.h#define O_ONLRET(tty)  _O_FLAG((tty),ONLRET)
tty138include/linux/tty.h#define O_OFILL(tty)  _O_FLAG((tty),OFILL)
tty139include/linux/tty.h#define O_OFDEL(tty)  _O_FLAG((tty),OFDEL)
tty140include/linux/tty.h#define O_NLDLY(tty)  _O_FLAG((tty),NLDLY)
tty141include/linux/tty.h#define O_CRDLY(tty)  _O_FLAG((tty),CRDLY)
tty142include/linux/tty.h#define O_TABDLY(tty)  _O_FLAG((tty),TABDLY)
tty143include/linux/tty.h#define O_BSDLY(tty)  _O_FLAG((tty),BSDLY)
tty144include/linux/tty.h#define O_VTDLY(tty)  _O_FLAG((tty),VTDLY)
tty145include/linux/tty.h#define O_FFDLY(tty)  _O_FLAG((tty),FFDLY)
tty147include/linux/tty.h#define C_BAUD(tty)  _C_FLAG((tty),CBAUD)
tty148include/linux/tty.h#define C_CSIZE(tty)  _C_FLAG((tty),CSIZE)
tty149include/linux/tty.h#define C_CSTOPB(tty)  _C_FLAG((tty),CSTOPB)
tty150include/linux/tty.h#define C_CREAD(tty)  _C_FLAG((tty),CREAD)
tty151include/linux/tty.h#define C_PARENB(tty)  _C_FLAG((tty),PARENB)
tty152include/linux/tty.h#define C_PARODD(tty)  _C_FLAG((tty),PARODD)
tty153include/linux/tty.h#define C_HUPCL(tty)  _C_FLAG((tty),HUPCL)
tty154include/linux/tty.h#define C_CLOCAL(tty)  _C_FLAG((tty),CLOCAL)
tty155include/linux/tty.h#define C_CIBAUD(tty)  _C_FLAG((tty),CIBAUD)
tty156include/linux/tty.h#define C_CRTSCTS(tty)  _C_FLAG((tty),CRTSCTS)
tty158include/linux/tty.h#define L_ISIG(tty)  _L_FLAG((tty),ISIG)
tty159include/linux/tty.h#define L_ICANON(tty)  _L_FLAG((tty),ICANON)
tty160include/linux/tty.h#define L_XCASE(tty)  _L_FLAG((tty),XCASE)
tty161include/linux/tty.h#define L_ECHO(tty)  _L_FLAG((tty),ECHO)
tty162include/linux/tty.h#define L_ECHOE(tty)  _L_FLAG((tty),ECHOE)
tty163include/linux/tty.h#define L_ECHOK(tty)  _L_FLAG((tty),ECHOK)
tty164include/linux/tty.h#define L_ECHONL(tty)  _L_FLAG((tty),ECHONL)
tty165include/linux/tty.h#define L_NOFLSH(tty)  _L_FLAG((tty),NOFLSH)
tty166include/linux/tty.h#define L_TOSTOP(tty)  _L_FLAG((tty),TOSTOP)
tty167include/linux/tty.h#define L_ECHOCTL(tty)  _L_FLAG((tty),ECHOCTL)
tty168include/linux/tty.h#define L_ECHOPRT(tty)  _L_FLAG((tty),ECHOPRT)
tty169include/linux/tty.h#define L_ECHOKE(tty)  _L_FLAG((tty),ECHOKE)
tty170include/linux/tty.h#define L_FLUSHO(tty)  _L_FLAG((tty),FLUSHO)
tty171include/linux/tty.h#define L_PENDIN(tty)  _L_FLAG((tty),PENDIN)
tty172include/linux/tty.h#define L_IEXTEN(tty)  _L_FLAG((tty),IEXTEN)
tty251include/linux/tty.h#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
tty277include/linux/tty.hextern int tty_paranoia_check(struct tty_struct *tty, dev_t device,
tty279include/linux/tty.hextern char *_tty_name(struct tty_struct *tty, char *buf);
tty280include/linux/tty.hextern char *tty_name(struct tty_struct *tty);
tty281include/linux/tty.hextern void wait_until_sent(struct tty_struct * tty, int timeout);
tty282include/linux/tty.hextern int tty_check_change(struct tty_struct * tty);
tty283include/linux/tty.hextern void stop_tty(struct tty_struct * tty);
tty284include/linux/tty.hextern void start_tty(struct tty_struct * tty);
tty287include/linux/tty.hextern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
tty292include/linux/tty.hextern int tty_signal(int sig, struct tty_struct *tty);
tty293include/linux/tty.hextern void tty_hangup(struct tty_struct * tty);
tty294include/linux/tty.hextern void tty_vhangup(struct tty_struct * tty);
tty297include/linux/tty.hextern void do_SAK(struct tty_struct *tty);
tty304include/linux/tty.hextern int n_tty_ioctl(struct tty_struct * tty, struct file * file,
tty309include/linux/tty.hextern int  rs_open(struct tty_struct * tty, struct file * filp);
tty313include/linux/tty.hextern int  pty_open(struct tty_struct * tty, struct file * filp);
tty317include/linux/tty.hextern int con_open(struct tty_struct * tty, struct file * filp);
tty324include/linux/tty.hextern int vt_ioctl(struct tty_struct *tty, struct file * file,
tty124include/linux/tty_driver.hint  (*open)(struct tty_struct * tty, struct file * filp);
tty125include/linux/tty_driver.hvoid (*close)(struct tty_struct * tty, struct file * filp);
tty126include/linux/tty_driver.hint  (*write)(struct tty_struct * tty, int from_user,
tty128include/linux/tty_driver.hvoid (*put_char)(struct tty_struct *tty, unsigned char ch);
tty129include/linux/tty_driver.hvoid (*flush_chars)(struct tty_struct *tty);
tty130include/linux/tty_driver.hint  (*write_room)(struct tty_struct *tty);
tty131include/linux/tty_driver.hint  (*chars_in_buffer)(struct tty_struct *tty);
tty132include/linux/tty_driver.hint  (*ioctl)(struct tty_struct *tty, struct file * file,
tty134include/linux/tty_driver.hvoid (*set_termios)(struct tty_struct *tty, struct termios * old);
tty135include/linux/tty_driver.hvoid (*throttle)(struct tty_struct * tty);
tty136include/linux/tty_driver.hvoid (*unthrottle)(struct tty_struct * tty);
tty137include/linux/tty_driver.hvoid (*stop)(struct tty_struct *tty);
tty138include/linux/tty_driver.hvoid (*start)(struct tty_struct *tty);
tty139include/linux/tty_driver.hvoid (*hangup)(struct tty_struct *tty);
tty140include/linux/tty_driver.hvoid (*flush_buffer)(struct tty_struct *tty);
tty141include/linux/tty_driver.hvoid (*set_ldisc)(struct tty_struct *tty);
tty10include/linux/tty_flip.h_INLINE_ void tty_insert_flip_char(struct tty_struct *tty,
tty13include/linux/tty_flip.hif (tty->flip.count++ >= TTY_FLIPBUF_SIZE)
tty15include/linux/tty_flip.h*tty->flip.flag_buf_ptr++ = flag;
tty16include/linux/tty_flip.h*tty->flip.char_buf_ptr++ = ch;
tty19include/linux/tty_flip.h_INLINE_ void tty_schedule_flip(struct tty_struct *tty)
tty21include/linux/tty_flip.hqueue_task(&tty->flip.tqueue, &tq_timer);
tty20include/linux/tty_ldisc.hvoid  (*flush_buffer)(struct tty_struct *tty);
tty21include/linux/tty_ldisc.hint  (*chars_in_buffer)(struct tty_struct *tty);
tty22include/linux/tty_ldisc.hint  (*read)(struct tty_struct * tty, struct file * file,
tty24include/linux/tty_ldisc.hint  (*write)(struct tty_struct * tty, struct file * file,
tty26include/linux/tty_ldisc.hint  (*ioctl)(struct tty_struct * tty, struct file * file,
tty28include/linux/tty_ldisc.hvoid  (*set_termios)(struct tty_struct *tty, struct termios * old);
tty29include/linux/tty_ldisc.hint  (*select)(struct tty_struct * tty, struct inode * inode,
tty529kernel/sys.ccurrent->tty = NULL;