taglinefilesource code
tty938drivers/char/console.cstatic void respond_string(char * p, struct tty_struct * tty)
tty941drivers/char/console.ctty_insert_flip_char(tty, *p, 0);
tty944drivers/char/console.ctty_schedule_flip(tty);
tty947drivers/char/console.cstatic void cursor_report(int currcons, struct tty_struct * tty)
tty952drivers/char/console.crespond_string(buf, tty);
tty955drivers/char/console.cstatic inline void status_report(struct tty_struct * tty)
tty957drivers/char/console.crespond_string("\033[0n", tty);  /* Terminal ok */
tty960drivers/char/console.cstatic inline void respond_ID(struct tty_struct * tty)
tty962drivers/char/console.crespond_string(VT102ID, tty);
tty965drivers/char/console.cvoid mouse_report(struct tty_struct * tty, int butt, int mrx, int mry)
tty971drivers/char/console.crespond_string(buf, tty);
tty1312drivers/char/console.cstatic void con_stop(struct tty_struct *tty)
tty1315drivers/char/console.cif (!tty)
tty1317drivers/char/console.cconsole_num = MINOR(tty->device) - (tty->driver.minor_start);
tty1327drivers/char/console.cstatic void con_start(struct tty_struct *tty)
tty1330drivers/char/console.cif (!tty)
tty1332drivers/char/console.cconsole_num = MINOR(tty->device) - (tty->driver.minor_start);
tty1339drivers/char/console.cstatic int con_write(struct tty_struct * tty, int from_user,
tty1344drivers/char/console.cstruct vt_struct *vt = (struct vt_struct *)tty->driver_data;
tty1361drivers/char/console.cwhile (!tty->stopped &&  count) {
tty1506drivers/char/console.crespond_ID(tty);
tty1567drivers/char/console.cstatus_report(tty);
tty1569drivers/char/console.ccursor_report(currcons,tty);
tty1631drivers/char/console.crespond_ID(tty);
tty1745drivers/char/console.cstatic int con_write_room(struct tty_struct *tty)
tty1747drivers/char/console.cif (tty->stopped)
tty1752drivers/char/console.cstatic int con_chars_in_buffer(struct tty_struct *tty)
tty1813drivers/char/console.cstatic void con_throttle(struct tty_struct *tty)
tty1817drivers/char/console.cstatic void con_unthrottle(struct tty_struct *tty)
tty1819drivers/char/console.cstruct vt_struct *vt = (struct vt_struct *) tty->driver_data;
tty2151drivers/char/console.cint con_open(struct tty_struct *tty, struct file * filp)
tty2156drivers/char/console.cidx = MINOR(tty->device) - tty->driver.minor_start;
tty2163drivers/char/console.ctty->driver_data = vt_cons[idx];
tty2165drivers/char/console.cif (!tty->winsize.ws_row && !tty->winsize.ws_col) {
tty2166drivers/char/console.ctty->winsize.ws_row = video_num_lines;
tty2167drivers/char/console.ctty->winsize.ws_col = video_num_columns;
tty487drivers/char/cyclades.ccy_stop(struct tty_struct *tty)
tty490drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty499drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_stop"))
tty518drivers/char/cyclades.ccy_start(struct tty_struct *tty)
tty521drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty530drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_start"))
tty584drivers/char/cyclades.cstruct tty_struct *tty;
tty638drivers/char/cyclades.cif(info->tty == 0){
tty649drivers/char/cyclades.ctty = info->tty;
tty656drivers/char/cyclades.cif (tty->flip.count < TTY_FLIPBUF_SIZE){
tty657drivers/char/cyclades.ctty->flip.count++;
tty660drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ =
tty662drivers/char/cyclades.c*tty->flip.char_buf_ptr++ =
tty665drivers/char/cyclades.cdo_SAK(tty);
tty668drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ =
tty670drivers/char/cyclades.c*tty->flip.char_buf_ptr++ =
tty673drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ =
tty675drivers/char/cyclades.c*tty->flip.char_buf_ptr++ =
tty678drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ =
tty680drivers/char/cyclades.c*tty->flip.char_buf_ptr++ = 0;
tty685drivers/char/cyclades.cif(tty->flip.count < TTY_FLIPBUF_SIZE){
tty686drivers/char/cyclades.ctty->flip.count++;
tty687drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ =
tty689drivers/char/cyclades.c*tty->flip.char_buf_ptr++ =
tty697drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ = 0;
tty698drivers/char/cyclades.c*tty->flip.char_buf_ptr++ = 0;
tty701drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ = 0;
tty702drivers/char/cyclades.c*tty->flip.char_buf_ptr++ = 0;
tty720drivers/char/cyclades.cif (tty->flip.count >= TTY_FLIPBUF_SIZE){
tty723drivers/char/cyclades.ctty->flip.count++;
tty725drivers/char/cyclades.c*tty->flip.flag_buf_ptr++ = TTY_NORMAL;
tty726drivers/char/cyclades.c*tty->flip.char_buf_ptr++ = data;
tty732drivers/char/cyclades.cqueue_task_irq_off(&tty->flip.tqueue, &tq_timer);
tty758drivers/char/cyclades.cif(info->tty == 0){
tty803drivers/char/cyclades.cif (info->tty->stopped || info->tty->hw_stopped){
tty861drivers/char/cyclades.cif(info->tty == 0){ /* nowhere to put the data, ignore it */
tty877drivers/char/cyclades.cif(info->tty->stopped){
tty880drivers/char/cyclades.cinfo->tty->stopped = 0;
tty887drivers/char/cyclades.cinfo->tty->stopped = 1;
tty943drivers/char/cyclades.cstruct tty_struct    *tty;
tty945drivers/char/cyclades.ctty = info->tty;
tty946drivers/char/cyclades.cif (!tty)
tty950drivers/char/cyclades.ctty_hangup(info->tty);
tty959drivers/char/cyclades.cif((tty->flags & (1<< TTY_DO_WRITE_WAKEUP))
tty960drivers/char/cyclades.c&& tty->ldisc.write_wakeup){
tty961drivers/char/cyclades.c(tty->ldisc.write_wakeup)(tty);
tty963drivers/char/cyclades.cwake_up_interruptible(&tty->write_wait);
tty1149drivers/char/cyclades.cif (info->tty){
tty1150drivers/char/cyclades.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty1197drivers/char/cyclades.cif (info->tty){
tty1198drivers/char/cyclades.cclear_bit(TTY_IO_ERROR, &info->tty->flags);
tty1270drivers/char/cyclades.cif (!info->tty || (info->tty->termios->c_cflag & HUPCL)) {
tty1283drivers/char/cyclades.cif (info->tty){
tty1284drivers/char/cyclades.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty1307drivers/char/cyclades.cif (!info->tty || !info->tty->termios){
tty1313drivers/char/cyclades.ccflag = info->tty->termios->c_cflag;
tty1336drivers/char/cyclades.cinfo->tty->termios->c_cflag &= ~CBAUDEX;
tty1438drivers/char/cyclades.cbase_addr[CySCHR1] = START_CHAR(info->tty);
tty1439drivers/char/cyclades.cbase_addr[CySCHR2] = STOP_CHAR(info->tty);
tty1454drivers/char/cyclades.cif (C_CLOCAL(info->tty)) {
tty1482drivers/char/cyclades.cif (info->tty){
tty1483drivers/char/cyclades.cclear_bit(TTY_IO_ERROR, &info->tty->flags);
tty1492drivers/char/cyclades.ccy_put_char(struct tty_struct *tty, unsigned char ch)
tty1494drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1501drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_put_char"))
tty1504drivers/char/cyclades.cif (!tty || !info->xmit_buf)
tty1521drivers/char/cyclades.ccy_flush_chars(struct tty_struct *tty)
tty1523drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1532drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_flush_chars"))
tty1535drivers/char/cyclades.cif (info->xmit_cnt <= 0 || tty->stopped
tty1536drivers/char/cyclades.c|| tty->hw_stopped || !info->xmit_buf)
tty1560drivers/char/cyclades.ccy_write(struct tty_struct * tty, int from_user,
tty1563drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1571drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_write")){
tty1575drivers/char/cyclades.cif (!tty || !info->xmit_buf || !tmp_buf){
tty1607drivers/char/cyclades.c&& !tty->stopped
tty1608drivers/char/cyclades.c&& !tty->hw_stopped ) {
tty1616drivers/char/cyclades.ccy_write_room(struct tty_struct *tty)
tty1618drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1625drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_write_room"))
tty1635drivers/char/cyclades.ccy_chars_in_buffer(struct tty_struct *tty)
tty1637drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1643drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_chars_in_buffer"))
tty1651drivers/char/cyclades.ccy_flush_buffer(struct tty_struct *tty)
tty1653drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1660drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_flush_buffer"))
tty1665drivers/char/cyclades.cwake_up_interruptible(&tty->write_wait);
tty1666drivers/char/cyclades.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
tty1667drivers/char/cyclades.c&& tty->ldisc.write_wakeup)
tty1668drivers/char/cyclades.c(tty->ldisc.write_wakeup)(tty);
tty1677drivers/char/cyclades.ccy_throttle(struct tty_struct * tty)
tty1679drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1687drivers/char/cyclades.cprintk("throttle %s: %d....\n", _tty_name(tty, buf),
tty1688drivers/char/cyclades.ctty->ldisc.chars_in_buffer(tty));
tty1692drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_nthrottle")){
tty1696drivers/char/cyclades.cif (I_IXOFF(tty)) {
tty1697drivers/char/cyclades.cinfo->x_char = STOP_CHAR(tty);
tty1718drivers/char/cyclades.ccy_unthrottle(struct tty_struct * tty)
tty1720drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty1728drivers/char/cyclades.cprintk("throttle %s: %d....\n", _tty_name(tty, buf),
tty1729drivers/char/cyclades.ctty->ldisc.chars_in_buffer(tty));
tty1733drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_nthrottle")){
tty1737drivers/char/cyclades.cif (I_IXOFF(tty)) {
tty1738drivers/char/cyclades.cinfo->x_char = START_CHAR(tty);
tty2077drivers/char/cyclades.ccy_ioctl(struct tty_struct *tty, struct file * file,
tty2081drivers/char/cyclades.cstruct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
tty2147drivers/char/cyclades.cret_val = tty_check_change(tty);
tty2150drivers/char/cyclades.ctty_wait_until_sent(tty,0);
tty2155drivers/char/cyclades.cret_val = tty_check_change(tty);
tty2158drivers/char/cyclades.ctty_wait_until_sent(tty,0);
tty2175drivers/char/cyclades.cput_fs_long(C_CLOCAL(tty) ? 1 : 0,
tty2180drivers/char/cyclades.ctty->termios->c_cflag =
tty2181drivers/char/cyclades.c((tty->termios->c_cflag & ~CLOCAL) |
tty2222drivers/char/cyclades.ccy_set_termios(struct tty_struct *tty, struct termios * old_termios)
tty2224drivers/char/cyclades.cstruct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
tty2230drivers/char/cyclades.cif (tty->termios->c_cflag == old_termios->c_cflag)
tty2235drivers/char/cyclades.c!(tty->termios->c_cflag & CRTSCTS)) {
tty2236drivers/char/cyclades.ctty->stopped = 0;
tty2237drivers/char/cyclades.ccy_start(tty);
tty2241drivers/char/cyclades.c(tty->termios->c_cflag & CLOCAL))
tty2250drivers/char/cyclades.ccy_close(struct tty_struct * tty, struct file * filp)
tty2252drivers/char/cyclades.cstruct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
tty2260drivers/char/cyclades.c|| serial_paranoia_check(info, tty->device, "cy_close")){
tty2267drivers/char/cyclades.cif ((tty->count == 1) && (info->count != 1)) {
tty2298drivers/char/cyclades.cinfo->normal_termios = *tty->termios;
tty2300drivers/char/cyclades.cinfo->callout_termios = *tty->termios;
tty2302drivers/char/cyclades.ctty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
tty2304drivers/char/cyclades.cif (tty->driver.flush_buffer)
tty2305drivers/char/cyclades.ctty->driver.flush_buffer(tty);
tty2306drivers/char/cyclades.cif (tty->ldisc.flush_buffer)
tty2307drivers/char/cyclades.ctty->ldisc.flush_buffer(tty);
tty2309drivers/char/cyclades.cinfo->tty = 0;
tty2310drivers/char/cyclades.cif (tty->ldisc.num != ldiscs[N_TTY].num) {
tty2311drivers/char/cyclades.cif (tty->ldisc.close)
tty2312drivers/char/cyclades.c(tty->ldisc.close)(tty);
tty2313drivers/char/cyclades.ctty->ldisc = ldiscs[N_TTY];
tty2314drivers/char/cyclades.ctty->termios->c_line = N_TTY;
tty2315drivers/char/cyclades.cif (tty->ldisc.open)
tty2316drivers/char/cyclades.c(tty->ldisc.open)(tty);
tty2341drivers/char/cyclades.ccy_hangup(struct tty_struct *tty)
tty2343drivers/char/cyclades.cstruct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
tty2349drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_hangup"))
tty2359drivers/char/cyclades.cinfo->tty = 0;
tty2374drivers/char/cyclades.cblock_til_ready(struct tty_struct *tty, struct file * filp,
tty2401drivers/char/cyclades.cif (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
tty2484drivers/char/cyclades.c&& (C_CLOCAL(tty)
tty2524drivers/char/cyclades.ccy_open(struct tty_struct *tty, struct file * filp)
tty2530drivers/char/cyclades.cline = MINOR(tty->device) - tty->driver.minor_start;
tty2541drivers/char/cyclades.cif (serial_paranoia_check(info, tty->device, "cy_open")){
tty2551drivers/char/cyclades.ctty->driver_data = info;
tty2552drivers/char/cyclades.cinfo->tty = tty;
tty2562drivers/char/cyclades.cif (tty->driver.subtype == SERIAL_TYPE_NORMAL)
tty2563drivers/char/cyclades.c*tty->termios = info->normal_termios;
tty2565drivers/char/cyclades.c*tty->termios = info->callout_termios;
tty2575drivers/char/cyclades.cretval = block_til_ready(tty, filp, info);
tty2793drivers/char/cyclades.cinfo->tty = 0;
tty2871drivers/char/cyclades.c(long)info->tty, info->read_status_mask,
tty113drivers/char/keyboard.cstatic struct tty_struct * tty = NULL;
tty375drivers/char/keyboard.ctty = ttytab[fg_console];
tty524drivers/char/keyboard.c(vc_kbd_mode(kbd,VC_REPEAT) && tty &&
tty525drivers/char/keyboard.c(L_ECHO(tty) || (tty->driver.chars_in_buffer(tty) == 0)))) {
tty574drivers/char/keyboard.cif (tty) {
tty575drivers/char/keyboard.ctty_insert_flip_char(tty, ch, 0);
tty576drivers/char/keyboard.ctty_schedule_flip(tty);
tty583drivers/char/keyboard.cif (!tty)
tty587drivers/char/keyboard.ctty_insert_flip_char(tty, *cp, 0);
tty590drivers/char/keyboard.ctty_schedule_flip(tty);
tty631drivers/char/keyboard.cif (rep || !tty)
tty639drivers/char/keyboard.cif (tty->stopped)
tty640drivers/char/keyboard.cstart_tty(tty);
tty642drivers/char/keyboard.cstop_tty(tty);
tty699drivers/char/keyboard.cif (!tty)
tty701drivers/char/keyboard.ctty_insert_flip_char(tty, 0, TTY_BREAK);
tty702drivers/char/keyboard.ctty_schedule_flip(tty);
tty736drivers/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)) {
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))
tty358drivers/char/n_tty.cif (tty->closing) {
tty359drivers/char/n_tty.cif (I_IXON(tty)) {
tty360drivers/char/n_tty.cif (c == START_CHAR(tty))
tty361drivers/char/n_tty.cstart_tty(tty);
tty362drivers/char/n_tty.celse if (c == STOP_CHAR(tty))
tty363drivers/char/n_tty.cstop_tty(tty);
tty374drivers/char/n_tty.cif (!test_bit(c, &tty->process_char_map) || tty->lnext) {
tty375drivers/char/n_tty.cfinish_erasing(tty);
tty376drivers/char/n_tty.ctty->lnext = 0;
tty377drivers/char/n_tty.cif (L_ECHO(tty)) {
tty378drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty379drivers/char/n_tty.cput_char('\a', tty); /* beep if no space */
tty383drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty384drivers/char/n_tty.ctty->canon_column = tty->column;
tty385drivers/char/n_tty.cecho_char(c, tty);
tty387drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty388drivers/char/n_tty.cput_tty_queue(c, tty);
tty389drivers/char/n_tty.cput_tty_queue(c, tty);
tty394drivers/char/n_tty.cif (I_IGNCR(tty))
tty396drivers/char/n_tty.cif (I_ICRNL(tty))
tty398drivers/char/n_tty.c} else if (c == '\n' && I_INLCR(tty))
tty400drivers/char/n_tty.cif (I_IXON(tty)) {
tty401drivers/char/n_tty.cif (c == START_CHAR(tty)) {
tty402drivers/char/n_tty.cstart_tty(tty);
tty405drivers/char/n_tty.cif (c == STOP_CHAR(tty)) {
tty406drivers/char/n_tty.cstop_tty(tty);
tty410drivers/char/n_tty.cif (L_ISIG(tty)) {
tty411drivers/char/n_tty.cif (c == INTR_CHAR(tty)) {
tty412drivers/char/n_tty.cisig(SIGINT, tty);
tty415drivers/char/n_tty.cif (c == QUIT_CHAR(tty)) {
tty416drivers/char/n_tty.cisig(SIGQUIT, tty);
tty419drivers/char/n_tty.cif (c == SUSP_CHAR(tty)) {
tty420drivers/char/n_tty.cif (!is_orphaned_pgrp(tty->pgrp))
tty421drivers/char/n_tty.cisig(SIGTSTP, tty);
tty425drivers/char/n_tty.cif (L_ICANON(tty)) {
tty426drivers/char/n_tty.cif (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) ||
tty427drivers/char/n_tty.c(c == WERASE_CHAR(tty) && L_IEXTEN(tty))) {
tty428drivers/char/n_tty.ceraser(c, tty);
tty431drivers/char/n_tty.cif (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) {
tty432drivers/char/n_tty.ctty->lnext = 1;
tty433drivers/char/n_tty.cif (L_ECHO(tty)) {
tty434drivers/char/n_tty.cfinish_erasing(tty);
tty435drivers/char/n_tty.cif (L_ECHOCTL(tty)) {
tty436drivers/char/n_tty.cput_char('^', tty);
tty437drivers/char/n_tty.cput_char('\b', tty);
tty442drivers/char/n_tty.cif (c == REPRINT_CHAR(tty) && L_ECHO(tty) &&
tty443drivers/char/n_tty.cL_IEXTEN(tty)) {
tty444drivers/char/n_tty.cunsigned long tail = tty->canon_head;
tty446drivers/char/n_tty.cfinish_erasing(tty);
tty447drivers/char/n_tty.cecho_char(c, tty);
tty448drivers/char/n_tty.copost('\n', tty);
tty449drivers/char/n_tty.cwhile (tail != tty->read_head) {
tty450drivers/char/n_tty.cecho_char(tty->read_buf[tail], tty);
tty456drivers/char/n_tty.cif (L_ECHO(tty) || L_ECHONL(tty)) {
tty457drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty458drivers/char/n_tty.cput_char('\a', tty);
tty461drivers/char/n_tty.copost('\n', tty);
tty465drivers/char/n_tty.cif (c == EOF_CHAR(tty)) {
tty466drivers/char/n_tty.cif (tty->canon_head != tty->read_head)
tty467drivers/char/n_tty.cset_bit(TTY_PUSH, &tty->flags);
tty471drivers/char/n_tty.cif ((c == EOL_CHAR(tty)) ||
tty472drivers/char/n_tty.c(c == EOL2_CHAR(tty) && L_IEXTEN(tty))) {
tty476drivers/char/n_tty.cif (L_ECHO(tty)) {
tty477drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty478drivers/char/n_tty.cput_char('\a', tty);
tty482drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty483drivers/char/n_tty.ctty->canon_column = tty->column;
tty484drivers/char/n_tty.cecho_char(c, tty);
tty490drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty491drivers/char/n_tty.cput_tty_queue(c, tty);
tty494drivers/char/n_tty.cset_bit(tty->read_head, &tty->read_flags);
tty495drivers/char/n_tty.cput_tty_queue(c, tty);
tty496drivers/char/n_tty.ctty->canon_head = tty->read_head;
tty497drivers/char/n_tty.ctty->canon_data++;
tty498drivers/char/n_tty.cif (tty->fasync)
tty499drivers/char/n_tty.ckill_fasync(tty->fasync, SIGIO);
tty500drivers/char/n_tty.cif (tty->read_wait)
tty501drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty506drivers/char/n_tty.cfinish_erasing(tty);
tty507drivers/char/n_tty.cif (L_ECHO(tty)) {
tty508drivers/char/n_tty.cif (tty->read_cnt >= N_TTY_BUF_SIZE-1) {
tty509drivers/char/n_tty.cput_char('\a', tty); /* beep if no space */
tty513drivers/char/n_tty.copost('\n', tty);
tty516drivers/char/n_tty.cif (tty->canon_head == tty->read_head)
tty517drivers/char/n_tty.ctty->canon_column = tty->column;
tty518drivers/char/n_tty.cecho_char(c, tty);
tty522drivers/char/n_tty.cif (I_PARMRK(tty) && c == (unsigned char) '\377')
tty523drivers/char/n_tty.cput_tty_queue(c, tty);
tty525drivers/char/n_tty.cput_tty_queue(c, tty);
tty528drivers/char/n_tty.cstatic void n_tty_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty535drivers/char/n_tty.cif (!tty->read_buf)
tty538drivers/char/n_tty.cif (tty->real_raw) {
tty539drivers/char/n_tty.ci = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt,
tty540drivers/char/n_tty.cN_TTY_BUF_SIZE - tty->read_head));
tty541drivers/char/n_tty.cmemcpy(tty->read_buf + tty->read_head, cp, i);
tty542drivers/char/n_tty.ctty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty543drivers/char/n_tty.ctty->read_cnt += i;
tty547drivers/char/n_tty.ci = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt,
tty548drivers/char/n_tty.cN_TTY_BUF_SIZE - tty->read_head));
tty549drivers/char/n_tty.cmemcpy(tty->read_buf + tty->read_head, cp, i);
tty550drivers/char/n_tty.ctty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty551drivers/char/n_tty.ctty->read_cnt += i;
tty558drivers/char/n_tty.cn_tty_receive_char(tty, *p);
tty561drivers/char/n_tty.cn_tty_receive_break(tty);
tty565drivers/char/n_tty.cn_tty_receive_parity_error(tty, *p);
tty568drivers/char/n_tty.cn_tty_receive_overrun(tty);
tty571drivers/char/n_tty.cprintk("%s: unknown flag %d\n", tty_name(tty),
tty576drivers/char/n_tty.cif (tty->driver.flush_chars)
tty577drivers/char/n_tty.ctty->driver.flush_chars(tty);
tty580drivers/char/n_tty.cif (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
tty581drivers/char/n_tty.cif (tty->fasync)
tty582drivers/char/n_tty.ckill_fasync(tty->fasync, SIGIO);
tty583drivers/char/n_tty.cif (tty->read_wait)
tty584drivers/char/n_tty.cwake_up_interruptible(&tty->read_wait);
tty587drivers/char/n_tty.cif ((tty->read_cnt >= TTY_THRESHOLD_THROTTLE) &&
tty588drivers/char/n_tty.ctty->driver.throttle &&
tty589drivers/char/n_tty.c!set_bit(TTY_THROTTLED, &tty->flags))
tty590drivers/char/n_tty.ctty->driver.throttle(tty);
tty593drivers/char/n_tty.cstatic int n_tty_receive_room(struct tty_struct *tty)
tty595drivers/char/n_tty.cint  left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
tty603drivers/char/n_tty.cif (tty->icanon && !tty->canon_data)
tty617drivers/char/n_tty.cstatic void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
tty619drivers/char/n_tty.cif (!tty)
tty622drivers/char/n_tty.ctty->icanon = (L_ICANON(tty) != 0);
tty623drivers/char/n_tty.cif (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) ||
tty624drivers/char/n_tty.cI_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) ||
tty625drivers/char/n_tty.cI_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) ||
tty626drivers/char/n_tty.cI_PARMRK(tty)) {
tty628drivers/char/n_tty.cmemset(tty->process_char_map, 0, 256/32);
tty630drivers/char/n_tty.cif (I_IGNCR(tty) || I_ICRNL(tty))
tty631drivers/char/n_tty.cset_bit('\r', &tty->process_char_map);
tty632drivers/char/n_tty.cif (I_INLCR(tty))
tty633drivers/char/n_tty.cset_bit('\n', &tty->process_char_map);
tty635drivers/char/n_tty.cif (L_ICANON(tty)) {
tty636drivers/char/n_tty.cset_bit(ERASE_CHAR(tty), &tty->process_char_map);
tty637drivers/char/n_tty.cset_bit(KILL_CHAR(tty), &tty->process_char_map);
tty638drivers/char/n_tty.cset_bit(EOF_CHAR(tty), &tty->process_char_map);
tty639drivers/char/n_tty.cset_bit('\n', &tty->process_char_map);
tty640drivers/char/n_tty.cset_bit(EOL_CHAR(tty), &tty->process_char_map);
tty641drivers/char/n_tty.cif (L_IEXTEN(tty)) {
tty642drivers/char/n_tty.cset_bit(WERASE_CHAR(tty),
tty643drivers/char/n_tty.c&tty->process_char_map);
tty644drivers/char/n_tty.cset_bit(LNEXT_CHAR(tty),
tty645drivers/char/n_tty.c&tty->process_char_map);
tty646drivers/char/n_tty.cset_bit(EOL2_CHAR(tty),
tty647drivers/char/n_tty.c&tty->process_char_map);
tty648drivers/char/n_tty.cif (L_ECHO(tty))
tty649drivers/char/n_tty.cset_bit(REPRINT_CHAR(tty),
tty650drivers/char/n_tty.c&tty->process_char_map);
tty653drivers/char/n_tty.cif (I_IXON(tty)) {
tty654drivers/char/n_tty.cset_bit(START_CHAR(tty), &tty->process_char_map);
tty655drivers/char/n_tty.cset_bit(STOP_CHAR(tty), &tty->process_char_map);
tty657drivers/char/n_tty.cif (L_ISIG(tty)) {
tty658drivers/char/n_tty.cset_bit(INTR_CHAR(tty), &tty->process_char_map);
tty659drivers/char/n_tty.cset_bit(QUIT_CHAR(tty), &tty->process_char_map);
tty660drivers/char/n_tty.cset_bit(SUSP_CHAR(tty), &tty->process_char_map);
tty662drivers/char/n_tty.cclear_bit(__DISABLED_CHAR, &tty->process_char_map);
tty664drivers/char/n_tty.ctty->raw = 0;
tty665drivers/char/n_tty.ctty->real_raw = 0;
tty667drivers/char/n_tty.ctty->raw = 1;
tty668drivers/char/n_tty.cif ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) &&
tty669drivers/char/n_tty.c(I_IGNPAR(tty) || !I_INPCK(tty)) &&
tty670drivers/char/n_tty.c(tty->driver.flags & TTY_DRIVER_REAL_RAW))
tty671drivers/char/n_tty.ctty->real_raw = 1;
tty673drivers/char/n_tty.ctty->real_raw = 0;
tty677drivers/char/n_tty.cstatic void n_tty_close(struct tty_struct *tty)
tty679drivers/char/n_tty.ctty_wait_until_sent(tty, 0);
tty680drivers/char/n_tty.cn_tty_flush_buffer(tty);
tty681drivers/char/n_tty.cif (tty->read_buf) {
tty682drivers/char/n_tty.cfree_page((unsigned long) tty->read_buf);
tty683drivers/char/n_tty.ctty->read_buf = 0;
tty687drivers/char/n_tty.cstatic int n_tty_open(struct tty_struct *tty)
tty689drivers/char/n_tty.cif (!tty)
tty692drivers/char/n_tty.cif (!tty->read_buf) {
tty693drivers/char/n_tty.ctty->read_buf = (unsigned char *)
tty695drivers/char/n_tty.cif (!tty->read_buf)
tty698drivers/char/n_tty.cmemset(tty->read_buf, 0, N_TTY_BUF_SIZE);
tty699drivers/char/n_tty.ctty->read_head = tty->read_tail = tty->read_cnt = 0;
tty700drivers/char/n_tty.cmemset(tty->read_flags, 0, sizeof(tty->read_flags));
tty701drivers/char/n_tty.cn_tty_set_termios(tty, 0);
tty702drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty703drivers/char/n_tty.ctty->closing = 0;
tty707drivers/char/n_tty.cstatic inline int input_available_p(struct tty_struct *tty, int amt)
tty709drivers/char/n_tty.cif (L_ICANON(tty)) {
tty710drivers/char/n_tty.cif (tty->canon_data)
tty712drivers/char/n_tty.c} else if (tty->read_cnt >= (amt ? amt : 1))
tty726drivers/char/n_tty.cstatic inline void copy_from_read_buf(struct tty_struct *tty,
tty733drivers/char/n_tty.cn = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail));
tty736drivers/char/n_tty.cmemcpy_tofs(*b, &tty->read_buf[tty->read_tail], n);
tty737drivers/char/n_tty.ctty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1);
tty738drivers/char/n_tty.ctty->read_cnt -= n;
tty743drivers/char/n_tty.cstatic int read_chan(struct tty_struct *tty, struct file *file,
tty755drivers/char/n_tty.cif (!tty->read_buf) {
tty766drivers/char/n_tty.ccurrent->tty == tty) {
tty767drivers/char/n_tty.cif (tty->pgrp <= 0)
tty769drivers/char/n_tty.celse if (current->pgrp != tty->pgrp) {
tty778drivers/char/n_tty.cif (L_ICANON(tty)) {
tty782drivers/char/n_tty.ctime = (HZ / 10) * TIME_CHAR(tty);
tty783drivers/char/n_tty.cminimum = MIN_CHAR(tty);
tty787drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty788drivers/char/n_tty.celse if (!tty->read_wait ||
tty789drivers/char/n_tty.c(tty->minimum_to_wake > minimum))
tty790drivers/char/n_tty.ctty->minimum_to_wake = minimum;
tty797drivers/char/n_tty.ctty->minimum_to_wake = minimum = 1;
tty801drivers/char/n_tty.cadd_wait_queue(&tty->read_wait, &wait);
tty804drivers/char/n_tty.cif (tty->packet && tty->link->ctrl_status) {
tty807drivers/char/n_tty.cput_fs_byte(tty->link->ctrl_status, b++);
tty808drivers/char/n_tty.ctty->link->ctrl_status = 0;
tty816drivers/char/n_tty.cif (((minimum - (b - buf)) < tty->minimum_to_wake) &&
tty818drivers/char/n_tty.ctty->minimum_to_wake = (minimum - (b - buf));
tty820drivers/char/n_tty.cif (!input_available_p(tty, 0)) {
tty821drivers/char/n_tty.cif (tty->flags & (1 << TTY_SLAVE_CLOSED)) {
tty843drivers/char/n_tty.cif (tty->packet && b == buf) {
tty848drivers/char/n_tty.cif (L_ICANON(tty)) {
tty853drivers/char/n_tty.cif (!tty->read_cnt) {
tty857drivers/char/n_tty.ceol = clear_bit(tty->read_tail,
tty858drivers/char/n_tty.c&tty->read_flags);
tty859drivers/char/n_tty.cc = tty->read_buf[tty->read_tail];
tty860drivers/char/n_tty.ctty->read_tail = ((tty->read_tail+1) &
tty862drivers/char/n_tty.ctty->read_cnt--;
tty870drivers/char/n_tty.cif (--tty->canon_data < 0) {
tty871drivers/char/n_tty.ctty->canon_data = 0;
tty881drivers/char/n_tty.ccopy_from_read_buf(tty, &b, &nr);
tty882drivers/char/n_tty.ccopy_from_read_buf(tty, &b, &nr);
tty888drivers/char/n_tty.cif (tty->driver.unthrottle &&
tty889drivers/char/n_tty.c(tty->read_cnt <= TTY_THRESHOLD_UNTHROTTLE)
tty890drivers/char/n_tty.c&& clear_bit(TTY_THROTTLED, &tty->flags))
tty891drivers/char/n_tty.ctty->driver.unthrottle(tty);
tty898drivers/char/n_tty.cremove_wait_queue(&tty->read_wait, &wait);
tty900drivers/char/n_tty.cif (!tty->read_wait)
tty901drivers/char/n_tty.ctty->minimum_to_wake = minimum;
tty907drivers/char/n_tty.cclear_bit(TTY_PUSH, &tty->flags);
tty908drivers/char/n_tty.cif (!size && clear_bit(TTY_PUSH, &tty->flags))
tty911drivers/char/n_tty.cclear_bit(TTY_PUSH, &tty->flags);
tty915drivers/char/n_tty.cstatic int write_chan(struct tty_struct * tty, struct file * file,
tty924drivers/char/n_tty.cif (L_TOSTOP(tty) && file->f_inode->i_rdev != CONSOLE_DEV) {
tty925drivers/char/n_tty.cretval = tty_check_change(tty);
tty930drivers/char/n_tty.cadd_wait_queue(&tty->write_wait, &wait);
tty937drivers/char/n_tty.cif (tty_hung_up_p(file) || (tty->link && !tty->link->count)) {
tty941drivers/char/n_tty.cif (O_OPOST(tty)) {
tty944drivers/char/n_tty.cif (opost(c, tty) < 0)
tty948drivers/char/n_tty.cif (tty->driver.flush_chars)
tty949drivers/char/n_tty.ctty->driver.flush_chars(tty);
tty951drivers/char/n_tty.cc = tty->driver.write(tty, 1, b, nr);
tty964drivers/char/n_tty.cremove_wait_queue(&tty->write_wait, &wait);
tty968drivers/char/n_tty.cstatic int normal_select(struct tty_struct * tty, struct inode * inode,
tty973drivers/char/n_tty.cif (input_available_p(tty, TIME_CHAR(tty) ? 0 :
tty974drivers/char/n_tty.cMIN_CHAR(tty)))
tty978drivers/char/n_tty.cif (tty->packet && tty->link->ctrl_status)
tty980drivers/char/n_tty.cif (tty->flags & (1 << TTY_SLAVE_CLOSED))
tty984drivers/char/n_tty.cif (!tty->read_wait) {
tty985drivers/char/n_tty.cif (MIN_CHAR(tty) && !TIME_CHAR(tty))
tty986drivers/char/n_tty.ctty->minimum_to_wake = MIN_CHAR(tty);
tty988drivers/char/n_tty.ctty->minimum_to_wake = 1;
tty990drivers/char/n_tty.cselect_wait(&tty->read_wait, wait);
tty993drivers/char/n_tty.cif (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
tty995drivers/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)
tty113drivers/char/selection.cint set_selection(const unsigned long arg, struct tty_struct *tty)
tty144drivers/char/selection.cmouse_report(tty, sel_mode & 15, xs, ys);
tty269drivers/char/selection.cint paste_selection(struct tty_struct *tty)
tty275drivers/char/selection.cstruct vt_struct *vt = (struct vt_struct *) tty->driver_data;
tty283drivers/char/selection.cif (test_bit(TTY_THROTTLED, &tty->flags)) {
tty287drivers/char/selection.cl = MIN(c, tty->ldisc.receive_room(tty));
tty288drivers/char/selection.ctty->ldisc.receive_buf(tty, bp, 0, l);
tty9drivers/char/selection.hextern int set_selection(const unsigned long arg, struct tty_struct *tty);
tty10drivers/char/selection.hextern int paste_selection(struct tty_struct *tty);
tty13drivers/char/selection.hextern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);
tty296drivers/char/serial.cstatic void rs_stop(struct tty_struct *tty)
tty298drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty301drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_stop"))
tty312drivers/char/serial.cstatic void rs_start(struct tty_struct *tty)
tty314drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty317drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_start"))
tty375drivers/char/serial.cstruct tty_struct *tty = info->tty;
tty386drivers/char/serial.cif (tty->flip.count >= TTY_FLIPBUF_SIZE)
tty388drivers/char/serial.ctty->flip.count++;
tty391drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_BREAK;
tty393drivers/char/serial.cdo_SAK(tty);
tty395drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_PARITY;
tty397drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_FRAME;
tty399drivers/char/serial.c*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
tty401drivers/char/serial.c*tty->flip.flag_buf_ptr++ = 0;
tty402drivers/char/serial.c*tty->flip.char_buf_ptr++ = ch;
tty406drivers/char/serial.cqueue_task_irq_off(&tty->flip.tqueue, &tq_timer);
tty423drivers/char/serial.cif ((info->xmit_cnt <= 0) || info->tty->stopped ||
tty424drivers/char/serial.cinfo->tty->hw_stopped) {
tty475drivers/char/serial.cif (info->tty->hw_stopped) {
tty480drivers/char/serial.cinfo->tty->hw_stopped = 0;
tty491drivers/char/serial.cinfo->tty->hw_stopped = 1;
tty524drivers/char/serial.cif (!info->tty ||
tty581drivers/char/serial.cif (!info || !info->tty)
tty642drivers/char/serial.cif (!info->tty ||
tty719drivers/char/serial.cstruct tty_struct  *tty;
tty721drivers/char/serial.ctty = info->tty;
tty722drivers/char/serial.cif (!tty)
tty726drivers/char/serial.ctty_hangup(tty);
tty732drivers/char/serial.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty733drivers/char/serial.ctty->ldisc.write_wakeup)
tty734drivers/char/serial.c(tty->ldisc.write_wakeup)(tty);
tty735drivers/char/serial.cwake_up_interruptible(&tty->write_wait);
tty864drivers/char/serial.cif (info->tty)
tty865drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty904drivers/char/serial.cif (info->tty)
tty905drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty929drivers/char/serial.cif (info->tty)
tty931drivers/char/serial.c&info->tty->flags);
tty986drivers/char/serial.cif (info->tty)
tty987drivers/char/serial.cclear_bit(TTY_IO_ERROR, &info->tty->flags);
tty1074drivers/char/serial.cif (!info->tty || (info->tty->termios->c_cflag & HUPCL)) {
tty1085drivers/char/serial.cif (info->tty)
tty1086drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty1103drivers/char/serial.cif (!info->tty || !info->tty->termios)
tty1105drivers/char/serial.ccflag = info->tty->termios->c_cflag;
tty1112drivers/char/serial.cinfo->tty->termios->c_cflag &= ~CBAUDEX;
tty1197drivers/char/serial.cif (I_INPCK(info->tty))
tty1199drivers/char/serial.cif (I_BRKINT(info->tty) || I_PARMRK(info->tty))
tty1203drivers/char/serial.cif (I_IGNPAR(info->tty)) {
tty1207drivers/char/serial.cif (I_IGNBRK(info->tty)) {
tty1214drivers/char/serial.cif (I_IGNPAR(info->tty)) {
tty1229drivers/char/serial.cstatic void rs_put_char(struct tty_struct *tty, unsigned char ch)
tty1231drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1234drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_put_char"))
tty1237drivers/char/serial.cif (!tty || !info->xmit_buf)
tty1252drivers/char/serial.cstatic void rs_flush_chars(struct tty_struct *tty)
tty1254drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1257drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_flush_chars"))
tty1260drivers/char/serial.cif (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped ||
tty1270drivers/char/serial.cstatic int rs_write(struct tty_struct * tty, int from_user,
tty1274drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1277drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_write"))
tty1280drivers/char/serial.cif (!tty || !info->xmit_buf || !tmp_buf)
tty1307drivers/char/serial.cif (info->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
tty1316drivers/char/serial.cstatic int rs_write_room(struct tty_struct *tty)
tty1318drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1321drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_write_room"))
tty1329drivers/char/serial.cstatic int rs_chars_in_buffer(struct tty_struct *tty)
tty1331drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1333drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_chars_in_buffer"))
tty1338drivers/char/serial.cstatic void rs_flush_buffer(struct tty_struct *tty)
tty1340drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1342drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_flush_buffer"))
tty1347drivers/char/serial.cwake_up_interruptible(&tty->write_wait);
tty1348drivers/char/serial.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty1349drivers/char/serial.ctty->ldisc.write_wakeup)
tty1350drivers/char/serial.c(tty->ldisc.write_wakeup)(tty);
tty1361drivers/char/serial.cstatic void rs_throttle(struct tty_struct * tty)
tty1363drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1367drivers/char/serial.cprintk("throttle %s: %d....\n", _tty_name(tty, buf),
tty1368drivers/char/serial.ctty->ldisc.chars_in_buffer(tty));
tty1371drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_throttle"))
tty1374drivers/char/serial.cif (I_IXOFF(tty))
tty1375drivers/char/serial.cinfo->x_char = STOP_CHAR(tty);
tty1384drivers/char/serial.cstatic void rs_unthrottle(struct tty_struct * tty)
tty1386drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1390drivers/char/serial.cprintk("unthrottle %s: %d....\n", _tty_name(tty, buf),
tty1391drivers/char/serial.ctty->ldisc.chars_in_buffer(tty));
tty1394drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_unthrottle"))
tty1397drivers/char/serial.cif (I_IXOFF(tty)) {
tty1401drivers/char/serial.cinfo->x_char = START_CHAR(tty);
tty1800drivers/char/serial.cstatic int rs_ioctl(struct tty_struct *tty, struct file * file,
tty1804drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty1807drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_ioctl"))
tty1813drivers/char/serial.cif (tty->flags & (1 << TTY_IO_ERROR))
tty1819drivers/char/serial.cretval = tty_check_change(tty);
tty1822drivers/char/serial.ctty_wait_until_sent(tty, 0);
tty1827drivers/char/serial.cretval = tty_check_change(tty);
tty1830drivers/char/serial.ctty_wait_until_sent(tty, 0);
tty1837drivers/char/serial.cput_fs_long(C_CLOCAL(tty) ? 1 : 0,
tty1842drivers/char/serial.ctty->termios->c_cflag =
tty1843drivers/char/serial.c((tty->termios->c_cflag & ~CLOCAL) |
tty1918drivers/char/serial.cstatic void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
tty1920drivers/char/serial.cstruct async_struct *info = (struct async_struct *)tty->driver_data;
tty1922drivers/char/serial.cif (tty->termios->c_cflag == old_termios->c_cflag)
tty1928drivers/char/serial.c!(tty->termios->c_cflag & CRTSCTS)) {
tty1929drivers/char/serial.ctty->hw_stopped = 0;
tty1930drivers/char/serial.crs_start(tty);
tty1941drivers/char/serial.c(tty->termios->c_cflag & CLOCAL))
tty1956drivers/char/serial.cstatic void rs_close(struct tty_struct *tty, struct file * filp)
tty1958drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty1962drivers/char/serial.cif (!info || serial_paranoia_check(info, tty->device, "rs_close"))
tty1975drivers/char/serial.cif ((tty->count == 1) && (info->count != 1)) {
tty2002drivers/char/serial.cinfo->normal_termios = *tty->termios;
tty2004drivers/char/serial.cinfo->callout_termios = *tty->termios;
tty2009drivers/char/serial.ctty->closing = 1;
tty2011drivers/char/serial.ctty_wait_until_sent(tty, info->closing_wait);
tty2037drivers/char/serial.cif (tty->driver.flush_buffer)
tty2038drivers/char/serial.ctty->driver.flush_buffer(tty);
tty2039drivers/char/serial.cif (tty->ldisc.flush_buffer)
tty2040drivers/char/serial.ctty->ldisc.flush_buffer(tty);
tty2041drivers/char/serial.ctty->closing = 0;
tty2043drivers/char/serial.cinfo->tty = 0;
tty2044drivers/char/serial.cif (tty->ldisc.num != ldiscs[N_TTY].num) {
tty2045drivers/char/serial.cif (tty->ldisc.close)
tty2046drivers/char/serial.c(tty->ldisc.close)(tty);
tty2047drivers/char/serial.ctty->ldisc = ldiscs[N_TTY];
tty2048drivers/char/serial.ctty->termios->c_line = N_TTY;
tty2049drivers/char/serial.cif (tty->ldisc.open)
tty2050drivers/char/serial.c(tty->ldisc.open)(tty);
tty2069drivers/char/serial.cvoid rs_hangup(struct tty_struct *tty)
tty2071drivers/char/serial.cstruct async_struct * info = (struct async_struct *)tty->driver_data;
tty2073drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_hangup"))
tty2080drivers/char/serial.cinfo->tty = 0;
tty2089drivers/char/serial.cstatic int block_til_ready(struct tty_struct *tty, struct file * filp,
tty2116drivers/char/serial.cif (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
tty2136drivers/char/serial.c(tty->flags & (1 << TTY_IO_ERROR))) {
tty2147drivers/char/serial.cif (tty->termios->c_cflag & CLOCAL)
tty2222drivers/char/serial.cint rs_open(struct tty_struct *tty, struct file * filp)
tty2227drivers/char/serial.cline = MINOR(tty->device) - tty->driver.minor_start;
tty2231drivers/char/serial.cif (serial_paranoia_check(info, tty->device, "rs_open"))
tty2235drivers/char/serial.cprintk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
tty2239drivers/char/serial.ctty->driver_data = info;
tty2240drivers/char/serial.cinfo->tty = tty;
tty2255drivers/char/serial.cretval = block_til_ready(tty, filp, info);
tty2265drivers/char/serial.cif (tty->driver.subtype == SERIAL_TYPE_NORMAL)
tty2266drivers/char/serial.c*tty->termios = info->normal_termios;
tty2268drivers/char/serial.c*tty->termios = info->callout_termios;
tty2607drivers/char/serial.cinfo->tty = 0;
tty2724drivers/char/serial.cif (info->tty)
tty2725drivers/char/serial.ctty_hangup(info->tty);
tty92drivers/char/tty_io.cstatic void initialize_tty_struct(struct tty_struct *tty);
tty112drivers/char/tty_io.cchar *_tty_name(struct tty_struct *tty, char *buf)
tty114drivers/char/tty_io.cif (tty)
tty115drivers/char/tty_io.csprintf(buf, "%s%d", tty->driver.name,
tty116drivers/char/tty_io.cMINOR(tty->device) - tty->driver.minor_start +
tty117drivers/char/tty_io.ctty->driver.name_base);
tty123drivers/char/tty_io.cchar *tty_name(struct tty_struct *tty)
tty127drivers/char/tty_io.creturn(_tty_name(tty, buf));
tty130drivers/char/tty_io.cinline int tty_paranoia_check(struct tty_struct *tty, dev_t device,
tty139drivers/char/tty_io.cif (!tty) {
tty143drivers/char/tty_io.cif (tty->magic != TTY_MAGIC) {
tty151drivers/char/tty_io.cstatic int check_tty_count(struct tty_struct *tty, const char *routine)
tty160drivers/char/tty_io.cif (f->private_data == tty) {
tty164drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty165drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_SLAVE &&
tty166drivers/char/tty_io.ctty->link && tty->link->count)
tty168drivers/char/tty_io.cif (tty->count != count) {
tty170drivers/char/tty_io.cMAJOR(tty->device), MINOR(tty->device), tty->count,
tty194drivers/char/tty_io.cstatic int tty_set_ldisc(struct tty_struct *tty, int ldisc)
tty203drivers/char/tty_io.cif (tty->ldisc.num == ldisc)
tty205drivers/char/tty_io.co_ldisc = tty->ldisc;
tty208drivers/char/tty_io.cif (tty->ldisc.close)
tty209drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty212drivers/char/tty_io.ctty->ldisc = ldiscs[ldisc];
tty213drivers/char/tty_io.ctty->termios->c_line = ldisc;
tty214drivers/char/tty_io.cif (tty->ldisc.open)
tty215drivers/char/tty_io.cretval = (tty->ldisc.open)(tty);
tty217drivers/char/tty_io.ctty->ldisc = o_ldisc;
tty218drivers/char/tty_io.ctty->termios->c_line = tty->ldisc.num;
tty219drivers/char/tty_io.cif (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) {
tty220drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty221drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty222drivers/char/tty_io.cif (tty->ldisc.open) {
tty223drivers/char/tty_io.cint r = tty->ldisc.open(tty);
tty228drivers/char/tty_io.ctty_name(tty), r);
tty232drivers/char/tty_io.cif (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
tty233drivers/char/tty_io.ctty->driver.set_ldisc(tty);
tty265drivers/char/tty_io.cint tty_check_change(struct tty_struct * tty)
tty267drivers/char/tty_io.cif (current->tty != tty)
tty269drivers/char/tty_io.cif (tty->pgrp <= 0) {
tty273drivers/char/tty_io.cif (current->pgrp == tty->pgrp)
tty337drivers/char/tty_io.cvoid do_tty_hangup(struct tty_struct * tty, struct file_operations *fops)
tty343drivers/char/tty_io.cif (!tty)
tty345drivers/char/tty_io.ccheck_tty_count(tty, "do_tty_hangup");
tty349drivers/char/tty_io.cif (filp->private_data != tty)
tty359drivers/char/tty_io.cif (tty->ldisc.flush_buffer)
tty360drivers/char/tty_io.ctty->ldisc.flush_buffer(tty);
tty361drivers/char/tty_io.cif (tty->driver.flush_buffer)
tty362drivers/char/tty_io.ctty->driver.flush_buffer(tty);
tty363drivers/char/tty_io.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty364drivers/char/tty_io.ctty->ldisc.write_wakeup)
tty365drivers/char/tty_io.c(tty->ldisc.write_wakeup)(tty);
tty366drivers/char/tty_io.cwake_up_interruptible(&tty->write_wait);
tty367drivers/char/tty_io.cwake_up_interruptible(&tty->read_wait);
tty373drivers/char/tty_io.cif (tty->ldisc.num != ldiscs[N_TTY].num) {
tty374drivers/char/tty_io.cif (tty->ldisc.close)
tty375drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty376drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty377drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty378drivers/char/tty_io.cif (tty->ldisc.open) {
tty379drivers/char/tty_io.ci = (tty->ldisc.open)(tty);
tty387drivers/char/tty_io.cif ((tty->session > 0) && (p->session == tty->session) &&
tty391drivers/char/tty_io.cif (tty->pgrp > 0)
tty392drivers/char/tty_io.cp->tty_old_pgrp = tty->pgrp;
tty394drivers/char/tty_io.cif (p->tty == tty)
tty395drivers/char/tty_io.cp->tty = NULL;
tty397drivers/char/tty_io.ctty->flags = 0;
tty398drivers/char/tty_io.ctty->session = 0;
tty399drivers/char/tty_io.ctty->pgrp = -1;
tty400drivers/char/tty_io.ctty->ctrl_status = 0;
tty401drivers/char/tty_io.cif (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS)
tty402drivers/char/tty_io.c*tty->termios = tty->driver.init_termios;
tty403drivers/char/tty_io.cif (tty->driver.hangup)
tty404drivers/char/tty_io.c(tty->driver.hangup)(tty);
tty407drivers/char/tty_io.cvoid tty_hangup(struct tty_struct * tty)
tty410drivers/char/tty_io.cprintk("%s hangup...\n", tty_name(tty));
tty412drivers/char/tty_io.cdo_tty_hangup(tty, &hung_up_tty_fops);
tty415drivers/char/tty_io.cvoid tty_vhangup(struct tty_struct * tty)
tty418drivers/char/tty_io.cprintk("%s vhangup...\n", tty_name(tty));
tty420drivers/char/tty_io.cdo_tty_hangup(tty, &hung_up_tty_fops);
tty440drivers/char/tty_io.cstruct tty_struct *tty = current->tty;
tty443drivers/char/tty_io.cif (!tty) {
tty450drivers/char/tty_io.cif (tty->pgrp > 0) {
tty451drivers/char/tty_io.ckill_pg(tty->pgrp, SIGHUP, priv);
tty452drivers/char/tty_io.ckill_pg(tty->pgrp, SIGCONT, priv);
tty456drivers/char/tty_io.ctty->session = 0;
tty457drivers/char/tty_io.ctty->pgrp = -1;
tty461drivers/char/tty_io.cp->tty = NULL;
tty642drivers/char/tty_io.cvoid stop_tty(struct tty_struct *tty)
tty644drivers/char/tty_io.cif (tty->stopped)
tty646drivers/char/tty_io.ctty->stopped = 1;
tty647drivers/char/tty_io.cif (tty->link && tty->link->packet) {
tty648drivers/char/tty_io.ctty->ctrl_status &= ~TIOCPKT_START;
tty649drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_STOP;
tty650drivers/char/tty_io.cwake_up_interruptible(&tty->link->read_wait);
tty652drivers/char/tty_io.cif (tty->driver.stop)
tty653drivers/char/tty_io.c(tty->driver.stop)(tty);
tty656drivers/char/tty_io.cvoid start_tty(struct tty_struct *tty)
tty658drivers/char/tty_io.cif (!tty->stopped)
tty660drivers/char/tty_io.ctty->stopped = 0;
tty661drivers/char/tty_io.cif (tty->link && tty->link->packet) {
tty662drivers/char/tty_io.ctty->ctrl_status &= ~TIOCPKT_STOP;
tty663drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_START;
tty664drivers/char/tty_io.cwake_up_interruptible(&tty->link->read_wait);
tty666drivers/char/tty_io.cif (tty->driver.start)
tty667drivers/char/tty_io.c(tty->driver.start)(tty);
tty668drivers/char/tty_io.cif ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty669drivers/char/tty_io.ctty->ldisc.write_wakeup)
tty670drivers/char/tty_io.c(tty->ldisc.write_wakeup)(tty);
tty671drivers/char/tty_io.cwake_up_interruptible(&tty->write_wait);
tty677drivers/char/tty_io.cstruct tty_struct * tty;
tty679drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty680drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_read"))
tty682drivers/char/tty_io.cif (!tty || (tty->flags & (1 << TTY_IO_ERROR)))
tty691drivers/char/tty_io.c(tty->pgrp > 0) &&
tty692drivers/char/tty_io.c(current->tty == tty) &&
tty693drivers/char/tty_io.c(tty->pgrp != current->pgrp))
tty701drivers/char/tty_io.cif (tty->ldisc.read)
tty703drivers/char/tty_io.ci = (tty->ldisc.read)(tty,file,(unsigned char *)buf,(unsigned int)count);
tty714drivers/char/tty_io.cstruct tty_struct * tty;
tty719drivers/char/tty_io.ctty = redirect;
tty721drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty722drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_write"))
tty724drivers/char/tty_io.cif (!tty || !tty->driver.write || (tty->flags & (1 << TTY_IO_ERROR)))
tty727drivers/char/tty_io.cif (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) &&
tty728drivers/char/tty_io.c(current->tty == tty) && (tty->pgrp != current->pgrp)) {
tty737drivers/char/tty_io.cif (tty->ldisc.write)
tty739drivers/char/tty_io.ci = (tty->ldisc.write)(tty,file,(unsigned char *)buf,(unsigned int)count);
tty754drivers/char/tty_io.cstruct tty_struct *tty, **tty_loc, *o_tty, **o_tty_loc;
tty766drivers/char/tty_io.ctty = o_tty = NULL;
tty783drivers/char/tty_io.cif (!*tty_loc && !tty) {
tty784drivers/char/tty_io.cif (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL)))
tty786drivers/char/tty_io.cinitialize_tty_struct(tty);
tty787drivers/char/tty_io.ctty->device = device;
tty788drivers/char/tty_io.ctty->driver = *driver;
tty854drivers/char/tty_io.ctty->termios = *tp_loc;
tty855drivers/char/tty_io.ctty->termios_locked = *ltp_loc;
tty856drivers/char/tty_io.c*tty_loc = tty;
tty859drivers/char/tty_io.cif (tty->ldisc.open) {
tty860drivers/char/tty_io.cretval = (tty->ldisc.open)(tty);
tty863drivers/char/tty_io.ctty = NULL;
tty867drivers/char/tty_io.ctty = NULL;
tty903drivers/char/tty_io.cif (tty)
tty904drivers/char/tty_io.cfree_page((unsigned long) tty);
tty925drivers/char/tty_io.cstruct tty_struct *tty, *o_tty;
tty930drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty931drivers/char/tty_io.cif (tty_paranoia_check(tty, filp->f_inode->i_rdev, "release_dev"))
tty934drivers/char/tty_io.ccheck_tty_count(tty, "release_dev");
tty938drivers/char/tty_io.ctp = tty->termios;
tty939drivers/char/tty_io.cltp = tty->termios_locked;
tty941drivers/char/tty_io.cidx = MINOR(tty->device) - tty->driver.minor_start;
tty943drivers/char/tty_io.cif (idx < 0 || idx >= tty->driver.num) {
tty945drivers/char/tty_io.cMAJOR(tty->device), MINOR(tty->device));
tty948drivers/char/tty_io.cif (tty != tty->driver.table[idx]) {
tty950drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty953drivers/char/tty_io.cif (tp != tty->driver.termios[idx]) {
tty955drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty958drivers/char/tty_io.cif (ltp != tty->driver.termios_locked[idx]) {
tty960drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty966drivers/char/tty_io.cprintk("release_dev of %s (tty count=%d)...", tty_name(tty),
tty967drivers/char/tty_io.ctty->count);
tty970drivers/char/tty_io.co_tty = tty->link;
tty975drivers/char/tty_io.cif (tty->driver.other) {
tty976drivers/char/tty_io.cif (o_tty != tty->driver.other->table[idx]) {
tty978drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty981drivers/char/tty_io.cif (o_tp != tty->driver.other->termios[idx]) {
tty983drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty986drivers/char/tty_io.cif (o_ltp != tty->driver.other->termios_locked[idx]) {
tty988drivers/char/tty_io.cidx, MAJOR(tty->device), MINOR(tty->device));
tty992drivers/char/tty_io.cif (o_tty->link != tty) {
tty999drivers/char/tty_io.cif (tty->driver.close)
tty1000drivers/char/tty_io.ctty->driver.close(tty, filp);
tty1001drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty1002drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER) {
tty1003drivers/char/tty_io.cif (--tty->link->count < 0) {
tty1005drivers/char/tty_io.ctty->count, tty_name(tty));
tty1006drivers/char/tty_io.ctty->link->count = 0;
tty1009drivers/char/tty_io.cif (--tty->count < 0) {
tty1011drivers/char/tty_io.ctty->count, tty_name(tty));
tty1012drivers/char/tty_io.ctty->count = 0;
tty1014drivers/char/tty_io.cif (tty->count)
tty1020drivers/char/tty_io.ctty->driver.other->table[idx] = NULL;
tty1021drivers/char/tty_io.ctty->driver.other->termios[idx] = NULL;
tty1036drivers/char/tty_io.cif ((*p)->tty == tty)
tty1037drivers/char/tty_io.c(*p)->tty = NULL;
tty1038drivers/char/tty_io.cif (o_tty && (*p)->tty == o_tty)
tty1039drivers/char/tty_io.c(*p)->tty = NULL;
tty1046drivers/char/tty_io.cif (tty->ldisc.close)
tty1047drivers/char/tty_io.c(tty->ldisc.close)(tty);
tty1048drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty1049drivers/char/tty_io.ctty->termios->c_line = N_TTY;
tty1059drivers/char/tty_io.ctty->driver.table[idx] = NULL;
tty1060drivers/char/tty_io.cif (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
tty1061drivers/char/tty_io.ctty->driver.termios[idx] = NULL;
tty1064drivers/char/tty_io.cif (tty == redirect || o_tty == redirect)
tty1071drivers/char/tty_io.cif (tty->flip.tqueue.sync) {
tty1075drivers/char/tty_io.cif (tq == &tty->flip.tqueue) {
tty1085drivers/char/tty_io.ctty->magic = 0;
tty1086drivers/char/tty_io.c(*tty->driver.refcount)--;
tty1087drivers/char/tty_io.cfree_page((unsigned long) tty);
tty1110drivers/char/tty_io.cstruct tty_struct *tty;
tty1119drivers/char/tty_io.cif (!current->tty)
tty1121drivers/char/tty_io.cdevice = current->tty->device;
tty1130drivers/char/tty_io.cretval = init_dev(device, &tty);
tty1133drivers/char/tty_io.cfilp->private_data = tty;
tty1134drivers/char/tty_io.ccheck_tty_count(tty, "tty_open");
tty1135drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty1136drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER)
tty1139drivers/char/tty_io.cprintk("opening %s...", tty_name(tty));
tty1141drivers/char/tty_io.cif (tty->driver.open)
tty1142drivers/char/tty_io.cretval = tty->driver.open(tty, filp);
tty1146drivers/char/tty_io.cif (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !suser())
tty1151drivers/char/tty_io.cprintk("error %d in opening %s...", retval, tty_name(tty));
tty1168drivers/char/tty_io.c!current->tty &&
tty1169drivers/char/tty_io.ctty->session == 0) {
tty1170drivers/char/tty_io.ccurrent->tty = tty;
tty1172drivers/char/tty_io.ctty->session = current->session;
tty1173drivers/char/tty_io.ctty->pgrp = current->pgrp;
tty1190drivers/char/tty_io.cstruct tty_struct * tty;
tty1192drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty1193drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_select"))
tty1196drivers/char/tty_io.cif (tty->ldisc.select)
tty1197drivers/char/tty_io.creturn (tty->ldisc.select)(tty, inode, filp, sel_type, wait);
tty1203drivers/char/tty_io.cstruct tty_struct * tty;
tty1206drivers/char/tty_io.ctty = (struct tty_struct *)filp->private_data;
tty1207drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync"))
tty1210drivers/char/tty_io.cfor (fa = tty->fasync, prev = 0; fa; prev= fa, fa = fa->fa_next) {
tty1223drivers/char/tty_io.cfa->fa_next = tty->fasync;
tty1224drivers/char/tty_io.ctty->fasync = fa;
tty1225drivers/char/tty_io.cif (!tty->read_wait)
tty1226drivers/char/tty_io.ctty->minimum_to_wake = 1;
tty1228drivers/char/tty_io.cif (tty->pgrp)
tty1229drivers/char/tty_io.cfilp->f_owner = -tty->pgrp;
tty1239drivers/char/tty_io.ctty->fasync = fa->fa_next;
tty1241drivers/char/tty_io.cif (!tty->fasync && !tty->read_wait)
tty1242drivers/char/tty_io.ctty->minimum_to_wake = N_TTY_BUF_SIZE;
tty1285drivers/char/tty_io.cstruct tty_struct * tty;
tty1292drivers/char/tty_io.ctty = (struct tty_struct *)file->private_data;
tty1293drivers/char/tty_io.cif (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
tty1296drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty1297drivers/char/tty_io.ctty->driver.subtype == PTY_TYPE_MASTER)
tty1298drivers/char/tty_io.creal_tty = tty->link;
tty1300drivers/char/tty_io.creal_tty = tty;
tty1304drivers/char/tty_io.cif ((current->tty != tty) && !suser())
tty1310drivers/char/tty_io.ctty->ldisc.receive_buf(tty, &ch, &mbz, 1);
tty1317drivers/char/tty_io.cmemcpy_tofs((struct winsize *) arg, &tty->winsize,
tty1327drivers/char/tty_io.cif (memcmp(&tmp_ws, &tty->winsize,
tty1329drivers/char/tty_io.cif (tty->pgrp > 0)
tty1330drivers/char/tty_io.ckill_pg(tty->pgrp, SIGWINCH, 1);
tty1331drivers/char/tty_io.cif ((real_tty->pgrp != tty->pgrp) &&
tty1335drivers/char/tty_io.ctty->winsize = tmp_ws;
tty1339drivers/char/tty_io.cif (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
tty1360drivers/char/tty_io.cset_bit(TTY_EXCLUSIVE, &tty->flags);
tty1363drivers/char/tty_io.cclear_bit(TTY_EXCLUSIVE, &tty->flags);
tty1366drivers/char/tty_io.cif (current->tty != tty)
tty1370drivers/char/tty_io.ccurrent->tty = NULL;
tty1374drivers/char/tty_io.c(current->session == tty->session))
tty1380drivers/char/tty_io.cif (!current->leader || current->tty)
tty1382drivers/char/tty_io.cif (tty->session > 0) {
tty1394drivers/char/tty_io.cif (p->tty == tty)
tty1395drivers/char/tty_io.cp->tty = NULL;
tty1399drivers/char/tty_io.ccurrent->tty = tty;
tty1401drivers/char/tty_io.ctty->session = current->session;
tty1402drivers/char/tty_io.ctty->pgrp = current->pgrp;
tty1409drivers/char/tty_io.cif (tty == real_tty && current->tty != real_tty)
tty1421drivers/char/tty_io.cif (!current->tty ||
tty1422drivers/char/tty_io.c(current->tty != real_tty) ||
tty1437drivers/char/tty_io.cput_fs_long(tty->ldisc.num, (unsigned long *) arg);
tty1440drivers/char/tty_io.cretval = tty_check_change(tty);
tty1444drivers/char/tty_io.creturn tty_set_ldisc(tty, arg);
tty1446drivers/char/tty_io.cif (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
tty1448drivers/char/tty_io.cif (current->tty != tty && !suser())
tty1466drivers/char/tty_io.creturn set_selection(arg, tty);
tty1468drivers/char/tty_io.creturn paste_selection(tty);
tty1499drivers/char/tty_io.ctty, sizeof(struct tty_struct));
tty1502drivers/char/tty_io.cif (tty->driver.ioctl) {
tty1503drivers/char/tty_io.cretval = (tty->driver.ioctl)(tty, file,
tty1508drivers/char/tty_io.cif (tty->ldisc.ioctl) {
tty1509drivers/char/tty_io.cretval = (tty->ldisc.ioctl)(tty, file,
tty1531drivers/char/tty_io.cvoid do_SAK( struct tty_struct *tty)
tty1534drivers/char/tty_io.ctty_hangup(tty);
tty1541drivers/char/tty_io.cif (!tty)
tty1543drivers/char/tty_io.csession  = tty->session;
tty1544drivers/char/tty_io.cif (tty->ldisc.flush_buffer)
tty1545drivers/char/tty_io.ctty->ldisc.flush_buffer(tty);
tty1546drivers/char/tty_io.cif (tty->driver.flush_buffer)
tty1547drivers/char/tty_io.ctty->driver.flush_buffer(tty);
tty1551drivers/char/tty_io.cif (((*p)->tty == tty) ||
tty1558drivers/char/tty_io.c(filp->private_data == tty)) {
tty1574drivers/char/tty_io.cstruct tty_struct *tty = (struct tty_struct *) private_;
tty1579drivers/char/tty_io.cif (tty->flip.buf_num) {
tty1580drivers/char/tty_io.ccp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
tty1581drivers/char/tty_io.cfp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
tty1582drivers/char/tty_io.ctty->flip.buf_num = 0;
tty1585drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf;
tty1586drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf;
tty1588drivers/char/tty_io.ccp = tty->flip.char_buf;
tty1589drivers/char/tty_io.cfp = tty->flip.flag_buf;
tty1590drivers/char/tty_io.ctty->flip.buf_num = 1;
tty1593drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
tty1594drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
tty1596drivers/char/tty_io.ccount = tty->flip.count;
tty1597drivers/char/tty_io.ctty->flip.count = 0;
tty1601drivers/char/tty_io.cif (count > tty->max_flip_cnt)
tty1602drivers/char/tty_io.ctty->max_flip_cnt = count;
tty1604drivers/char/tty_io.ctty->ldisc.receive_buf(tty, cp, fp, count);
tty1610drivers/char/tty_io.cstatic void initialize_tty_struct(struct tty_struct *tty)
tty1612drivers/char/tty_io.cmemset(tty, 0, sizeof(struct tty_struct));
tty1613drivers/char/tty_io.ctty->magic = TTY_MAGIC;
tty1614drivers/char/tty_io.ctty->ldisc = ldiscs[N_TTY];
tty1615drivers/char/tty_io.ctty->pgrp = -1;
tty1616drivers/char/tty_io.ctty->flip.char_buf_ptr = tty->flip.char_buf;
tty1617drivers/char/tty_io.ctty->flip.flag_buf_ptr = tty->flip.flag_buf;
tty1618drivers/char/tty_io.ctty->flip.tqueue.routine = flush_to_ldisc;
tty1619drivers/char/tty_io.ctty->flip.tqueue.data = tty;
tty1625drivers/char/tty_io.cvoid tty_default_put_char(struct tty_struct *tty, unsigned char ch)
tty1627drivers/char/tty_io.ctty->driver.write(tty, 0, &ch, 1);
tty43drivers/char/tty_ioctl.cvoid tty_wait_until_sent(struct tty_struct * tty, int timeout)
tty48drivers/char/tty_ioctl.cprintk("%s wait until sent...\n", tty_name(tty));
tty50drivers/char/tty_ioctl.cif (!tty->driver.chars_in_buffer ||
tty51drivers/char/tty_ioctl.c!tty->driver.chars_in_buffer(tty))
tty53drivers/char/tty_ioctl.cadd_wait_queue(&tty->write_wait, &wait);
tty61drivers/char/tty_ioctl.cprintk("waiting %s...(%d)\n", tty_name(tty), tty->driver.chars_in_buffer(tty));
tty66drivers/char/tty_ioctl.cif (!tty->driver.chars_in_buffer(tty))
tty71drivers/char/tty_ioctl.cremove_wait_queue(&tty->write_wait, &wait);
tty97drivers/char/tty_ioctl.cstatic int set_termios(struct tty_struct * tty, unsigned long arg, int opt)
tty101drivers/char/tty_ioctl.cstruct termios old_termios = *tty->termios;
tty104drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty112drivers/char/tty_ioctl.ctmp_termios = *tty->termios;
tty131drivers/char/tty_ioctl.cif ((opt & TERMIOS_FLUSH) && tty->ldisc.flush_buffer)
tty132drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty135drivers/char/tty_ioctl.ctty_wait_until_sent(tty, 0);
tty138drivers/char/tty_ioctl.c*tty->termios = tmp_termios;
tty139drivers/char/tty_ioctl.cunset_locked_termios(tty->termios, &old_termios, tty->termios_locked);
tty140drivers/char/tty_ioctl.ccanon_change = (old_termios.c_lflag ^ tty->termios->c_lflag) & ICANON;
tty142drivers/char/tty_ioctl.cmemset(&tty->read_flags, 0, sizeof tty->read_flags);
tty143drivers/char/tty_ioctl.ctty->canon_head = tty->read_tail;
tty144drivers/char/tty_ioctl.ctty->canon_data = 0;
tty145drivers/char/tty_ioctl.ctty->erasing = 0;
tty148drivers/char/tty_ioctl.cif (canon_change && !L_ICANON(tty) && tty->read_cnt)
tty150drivers/char/tty_ioctl.cwake_up_interruptible(&tty->read_wait);
tty154drivers/char/tty_ioctl.cif (tty->link && tty->link->packet) {
tty158drivers/char/tty_ioctl.cint new_flow = (I_IXON(tty) &&
tty159drivers/char/tty_ioctl.cSTOP_CHAR(tty) == '\023' &&
tty160drivers/char/tty_ioctl.cSTART_CHAR(tty) == '\021');
tty162drivers/char/tty_ioctl.ctty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP);
tty164drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_DOSTOP;
tty166drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_NOSTOP;
tty167drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->read_wait);
tty171drivers/char/tty_ioctl.cif (tty->driver.set_termios)
tty172drivers/char/tty_ioctl.c(*tty->driver.set_termios)(tty, &old_termios);
tty174drivers/char/tty_ioctl.cif (tty->ldisc.set_termios)
tty175drivers/char/tty_ioctl.c(*tty->ldisc.set_termios)(tty, &old_termios);
tty180drivers/char/tty_ioctl.cstatic int get_termio(struct tty_struct * tty, struct termio * termio)
tty188drivers/char/tty_ioctl.ctmp_termio.c_iflag = tty->termios->c_iflag;
tty189drivers/char/tty_ioctl.ctmp_termio.c_oflag = tty->termios->c_oflag;
tty190drivers/char/tty_ioctl.ctmp_termio.c_cflag = tty->termios->c_cflag;
tty191drivers/char/tty_ioctl.ctmp_termio.c_lflag = tty->termios->c_lflag;
tty192drivers/char/tty_ioctl.ctmp_termio.c_line = tty->termios->c_line;
tty194drivers/char/tty_ioctl.ctmp_termio.c_cc[i] = tty->termios->c_cc[i];
tty199drivers/char/tty_ioctl.cstatic unsigned long inq_canon(struct tty_struct * tty)
tty203drivers/char/tty_ioctl.cif (!tty->canon_data || !tty->read_buf)
tty205drivers/char/tty_ioctl.chead = tty->canon_head;
tty206drivers/char/tty_ioctl.ctail = tty->read_tail;
tty210drivers/char/tty_ioctl.cif (test_bit(tail, &tty->read_flags) &&
tty211drivers/char/tty_ioctl.ctty->read_buf[tail] == __DISABLED_CHAR)
tty218drivers/char/tty_ioctl.cint n_tty_ioctl(struct tty_struct * tty, struct file * file,
tty225drivers/char/tty_ioctl.cif (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
tty226drivers/char/tty_ioctl.ctty->driver.subtype == PTY_TYPE_MASTER)
tty227drivers/char/tty_ioctl.creal_tty = tty->link;
tty229drivers/char/tty_ioctl.creal_tty = tty;
tty256drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty261drivers/char/tty_ioctl.cstop_tty(tty);
tty264drivers/char/tty_ioctl.cstart_tty(tty);
tty267drivers/char/tty_ioctl.cif (STOP_CHAR(tty) != __DISABLED_CHAR)
tty268drivers/char/tty_ioctl.ctty->driver.write(tty, 0,
tty269drivers/char/tty_ioctl.c&STOP_CHAR(tty), 1);
tty272drivers/char/tty_ioctl.cif (START_CHAR(tty) != __DISABLED_CHAR)
tty273drivers/char/tty_ioctl.ctty->driver.write(tty, 0,
tty274drivers/char/tty_ioctl.c&START_CHAR(tty), 1);
tty281drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty286drivers/char/tty_ioctl.cif (tty->ldisc.flush_buffer)
tty287drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty290drivers/char/tty_ioctl.cif (tty->ldisc.flush_buffer)
tty291drivers/char/tty_ioctl.ctty->ldisc.flush_buffer(tty);
tty294drivers/char/tty_ioctl.cif (tty->driver.flush_buffer)
tty295drivers/char/tty_ioctl.ctty->driver.flush_buffer(tty);
tty306drivers/char/tty_ioctl.cif (tty->driver.chars_in_buffer)
tty307drivers/char/tty_ioctl.cput_fs_long(tty->driver.chars_in_buffer(tty),
tty317drivers/char/tty_ioctl.cif (L_ICANON(tty))
tty318drivers/char/tty_ioctl.cput_fs_long(inq_canon(tty),
tty321drivers/char/tty_ioctl.cput_fs_long(tty->read_cnt,
tty345drivers/char/tty_ioctl.cif (tty->driver.type != TTY_DRIVER_TYPE_PTY ||
tty346drivers/char/tty_ioctl.ctty->driver.subtype != PTY_TYPE_MASTER)
tty353drivers/char/tty_ioctl.cif (!tty->packet) {
tty354drivers/char/tty_ioctl.ctty->packet = 1;
tty355drivers/char/tty_ioctl.ctty->link->ctrl_status = 0;
tty358drivers/char/tty_ioctl.ctty->packet = 0;
tty363drivers/char/tty_ioctl.cretval = tty_check_change(tty);
tty366drivers/char/tty_ioctl.ctty_wait_until_sent(tty, 0);
tty367drivers/char/tty_ioctl.cif (!tty->driver.ioctl)
tty369drivers/char/tty_ioctl.ctty->driver.ioctl(tty, file, cmd, arg);
tty135drivers/char/vt.cint vt_ioctl(struct tty_struct *tty, struct file * file,
tty142drivers/char/vt.cstruct vt_struct *vt = (struct vt_struct *)tty->driver_data;
tty154drivers/char/vt.cif (current->tty == tty || suser())
tty273drivers/char/vt.cif (tty->ldisc.flush_buffer)
tty274drivers/char/vt.ctty->ldisc.flush_buffer(tty);
tty107drivers/net/ppp.c#define ppp_find(tty) ((struct ppp *) tty->disc_data)
tty148drivers/net/ppp.cstatic int ppp_select(struct tty_struct *tty, struct inode * inode,
tty154drivers/net/ppp.cstatic int ppp_receive_room(struct tty_struct *tty);
tty155drivers/net/ppp.cstatic void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty157drivers/net/ppp.cstatic void ppp_write_wakeup(struct tty_struct *tty);
tty265drivers/net/ppp.cppp->tty   = NULL;
tty467drivers/net/ppp.cif (ppp->tty != NULL && ppp->tty->disc_data == ppp)
tty468drivers/net/ppp.cppp->tty->disc_data = NULL; /* Break the tty->ppp link */
tty492drivers/net/ppp.cppp->tty   = NULL;
tty496drivers/net/ppp.cppp_close(struct tty_struct *tty)
tty498drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty512drivers/net/ppp.cppp_open(struct tty_struct *tty)
tty514drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty531drivers/net/ppp.cppp->tty = tty;
tty534drivers/net/ppp.ctty->disc_data = ppp;
tty535drivers/net/ppp.cif (tty->driver.flush_buffer)
tty536drivers/net/ppp.ctty->driver.flush_buffer(tty);
tty537drivers/net/ppp.cif (tty->ldisc.flush_buffer)
tty538drivers/net/ppp.ctty->ldisc.flush_buffer(tty);
tty540drivers/net/ppp.ctty_read_flush (tty);
tty541drivers/net/ppp.ctty_write_flush (tty);
tty588drivers/net/ppp.cif (ppp->tty == NULL) {
tty606drivers/net/ppp.cif (ppp->tty == NULL) {
tty687drivers/net/ppp.canswer = tty_write_data (ppp->tty,
tty711drivers/net/ppp.cactual = ppp->tty->driver.write(ppp->tty, 0, ppp->xbuff, count);
tty717drivers/net/ppp.cppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
tty721drivers/net/ppp.cstatic void ppp_write_wakeup(struct tty_struct *tty)
tty724drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty746drivers/net/ppp.cactual = tty->driver.write(tty, 0, ppp->xtail, count);
tty750drivers/net/ppp.ctty->flags &= ~TTY_DO_WRITE_WAKEUP;
tty795drivers/net/ppp.cppp_dump_inqueue(struct tty_struct *tty)
tty797drivers/net/ppp.cint  head = tty->read_q.head,
tty798drivers/net/ppp.ctail = tty->read_q.tail,
tty803drivers/net/ppp.c(unsigned int) tty->termios->c_iflag))
tty809drivers/net/ppp.cbuffer [count] = tty->read_q.buf[i];
tty822drivers/net/ppp.cvoid ppp_tty_input_ready(struct tty_struct *tty)
tty824drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty839drivers/net/ppp.cppp_dump_inqueue(ppp->tty);
tty842drivers/net/ppp.cn = tty_read_raw_data(tty, buff, 128);
tty917drivers/net/ppp.cstatic int ppp_receive_room(struct tty_struct *tty)
tty923drivers/net/ppp.cstatic void ppp_receive_buf(struct tty_struct *tty, unsigned char *cp,
tty926drivers/net/ppp.cregister struct ppp *ppp = ppp_find (tty);
tty1191drivers/net/ppp.ckill_fasync(ppp->tty->fasync, SIGIO);
tty1226drivers/net/ppp.cppp_read(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr)
tty1228drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1327drivers/net/ppp.cppp_write(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned int nr)
tty1329drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1402drivers/net/ppp.cppp_ioctl(struct tty_struct *tty, struct file *file, unsigned int i,
tty1405drivers/net/ppp.cstruct ppp *ppp = ppp_find(tty);
tty1601drivers/net/ppp.cerror = n_tty_ioctl(tty, file, i, l);
tty1624drivers/net/ppp.cppp_select (struct tty_struct *tty, struct inode * inode,
tty1627drivers/net/ppp.cstruct ppp *ppp = ppp_find (tty);
tty1651drivers/net/ppp.cif (tty->packet && tty->link->ctrl_status)
tty1655drivers/net/ppp.cif (tty->flags & (1 << TTY_SLAVE_CLOSED))
tty1690drivers/net/ppp.cstruct tty_struct *tty;
tty1704drivers/net/ppp.ctty   = ppp->tty;
tty1714drivers/net/ppp.cif (tty == NULL) {
tty1901drivers/net/ppp.cppp_find(struct tty_struct *tty)
tty1905drivers/net/ppp.cif (ppp_ctrl[i].inuse && (ppp_ctrl[i].tty == tty)) return &ppp_ctrl[i];
tty373drivers/net/slip.csl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
tty374drivers/net/slip.cactual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
tty386drivers/net/slip.cstatic void slip_write_wakeup(struct tty_struct *tty)
tty389drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty400drivers/net/slip.ctty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
tty406drivers/net/slip.cactual = tty->driver.write(tty, 0, sl->xhead, sl->xleft);
tty441drivers/net/slip.c(sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ?
tty444drivers/net/slip.csl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
tty519drivers/net/slip.cif (sl->tty == NULL) {
tty602drivers/net/slip.cif (sl->tty == NULL) {
tty605drivers/net/slip.csl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
tty615drivers/net/slip.cslip_receive_room(struct tty_struct *tty)
tty627drivers/net/slip.cslip_receive_buf(struct tty_struct *tty, unsigned char *cp, char *fp, int count)
tty629drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty672drivers/net/slip.cslip_open(struct tty_struct *tty)
tty674drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty687drivers/net/slip.csl->tty = tty;
tty688drivers/net/slip.ctty->disc_data = sl;
tty689drivers/net/slip.cif (tty->driver.flush_buffer)  {
tty690drivers/net/slip.ctty->driver.flush_buffer(tty);
tty692drivers/net/slip.cif (tty->ldisc.flush_buffer)  {
tty693drivers/net/slip.ctty->ldisc.flush_buffer(tty);
tty725drivers/net/slip.cslip_close(struct tty_struct *tty)
tty727drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty736drivers/net/slip.ctty->disc_data = 0;
tty737drivers/net/slip.csl->tty = NULL;
tty960drivers/net/slip.cslip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
tty962drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
tty1042drivers/net/slip.creturn n_tty_ioctl(tty, (struct file *) file, cmd, (unsigned long) arg);
tty52drivers/net/slip.hstruct tty_struct  *tty;    /* ptr to TTY structure    */
tty526fs/open.cif (current->tty)
tty527fs/open.ctty_vhangup(current->tty);
tty479fs/proc/array.cif ((*p)->tty)
tty480fs/proc/array.ctty_pgrp = (*p)->tty->pgrp;
tty492fs/proc/array.c(*p)->tty ? (*p)->tty->device : 0,
tty34include/linux/cyclades.hstruct tty_struct   *tty;
tty189include/linux/ppp.hstruct tty_struct  *tty;    /* ptr to TTY structure    */
tty178include/linux/sched.hstruct tty_struct *tty; /* NULL if no tty */
tty118include/linux/serial.hstruct tty_struct   *tty;
tty100include/linux/tty.h#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR])
tty101include/linux/tty.h#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT])
tty102include/linux/tty.h#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE])
tty103include/linux/tty.h#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL])
tty104include/linux/tty.h#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF])
tty105include/linux/tty.h#define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME])
tty106include/linux/tty.h#define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN])
tty107include/linux/tty.h#define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC])
tty108include/linux/tty.h#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART])
tty109include/linux/tty.h#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP])
tty110include/linux/tty.h#define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP])
tty111include/linux/tty.h#define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL])
tty112include/linux/tty.h#define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT])
tty113include/linux/tty.h#define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD])
tty114include/linux/tty.h#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE])
tty115include/linux/tty.h#define LNEXT_CHAR(tty)  ((tty)->termios->c_cc[VLNEXT])
tty116include/linux/tty.h#define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2])
tty118include/linux/tty.h#define _I_FLAG(tty,f)  ((tty)->termios->c_iflag & (f))
tty119include/linux/tty.h#define _O_FLAG(tty,f)  ((tty)->termios->c_oflag & (f))
tty120include/linux/tty.h#define _C_FLAG(tty,f)  ((tty)->termios->c_cflag & (f))
tty121include/linux/tty.h#define _L_FLAG(tty,f)  ((tty)->termios->c_lflag & (f))
tty123include/linux/tty.h#define I_IGNBRK(tty)  _I_FLAG((tty),IGNBRK)
tty124include/linux/tty.h#define I_BRKINT(tty)  _I_FLAG((tty),BRKINT)
tty125include/linux/tty.h#define I_IGNPAR(tty)  _I_FLAG((tty),IGNPAR)
tty126include/linux/tty.h#define I_PARMRK(tty)  _I_FLAG((tty),PARMRK)
tty127include/linux/tty.h#define I_INPCK(tty)  _I_FLAG((tty),INPCK)
tty128include/linux/tty.h#define I_ISTRIP(tty)  _I_FLAG((tty),ISTRIP)
tty129include/linux/tty.h#define I_INLCR(tty)  _I_FLAG((tty),INLCR)
tty130include/linux/tty.h#define I_IGNCR(tty)  _I_FLAG((tty),IGNCR)
tty131include/linux/tty.h#define I_ICRNL(tty)  _I_FLAG((tty),ICRNL)
tty132include/linux/tty.h#define I_IUCLC(tty)  _I_FLAG((tty),IUCLC)
tty133include/linux/tty.h#define I_IXON(tty)  _I_FLAG((tty),IXON)
tty134include/linux/tty.h#define I_IXANY(tty)  _I_FLAG((tty),IXANY)
tty135include/linux/tty.h#define I_IXOFF(tty)  _I_FLAG((tty),IXOFF)
tty136include/linux/tty.h#define I_IMAXBEL(tty)  _I_FLAG((tty),IMAXBEL)
tty138include/linux/tty.h#define O_OPOST(tty)  _O_FLAG((tty),OPOST)
tty139include/linux/tty.h#define O_OLCUC(tty)  _O_FLAG((tty),OLCUC)
tty140include/linux/tty.h#define O_ONLCR(tty)  _O_FLAG((tty),ONLCR)
tty141include/linux/tty.h#define O_OCRNL(tty)  _O_FLAG((tty),OCRNL)
tty142include/linux/tty.h#define O_ONOCR(tty)  _O_FLAG((tty),ONOCR)
tty143include/linux/tty.h#define O_ONLRET(tty)  _O_FLAG((tty),ONLRET)
tty144include/linux/tty.h#define O_OFILL(tty)  _O_FLAG((tty),OFILL)
tty145include/linux/tty.h#define O_OFDEL(tty)  _O_FLAG((tty),OFDEL)
tty146include/linux/tty.h#define O_NLDLY(tty)  _O_FLAG((tty),NLDLY)
tty147include/linux/tty.h#define O_CRDLY(tty)  _O_FLAG((tty),CRDLY)
tty148include/linux/tty.h#define O_TABDLY(tty)  _O_FLAG((tty),TABDLY)
tty149include/linux/tty.h#define O_BSDLY(tty)  _O_FLAG((tty),BSDLY)
tty150include/linux/tty.h#define O_VTDLY(tty)  _O_FLAG((tty),VTDLY)
tty151include/linux/tty.h#define O_FFDLY(tty)  _O_FLAG((tty),FFDLY)
tty153include/linux/tty.h#define C_BAUD(tty)  _C_FLAG((tty),CBAUD)
tty154include/linux/tty.h#define C_CSIZE(tty)  _C_FLAG((tty),CSIZE)
tty155include/linux/tty.h#define C_CSTOPB(tty)  _C_FLAG((tty),CSTOPB)
tty156include/linux/tty.h#define C_CREAD(tty)  _C_FLAG((tty),CREAD)
tty157include/linux/tty.h#define C_PARENB(tty)  _C_FLAG((tty),PARENB)
tty158include/linux/tty.h#define C_PARODD(tty)  _C_FLAG((tty),PARODD)
tty159include/linux/tty.h#define C_HUPCL(tty)  _C_FLAG((tty),HUPCL)
tty160include/linux/tty.h#define C_CLOCAL(tty)  _C_FLAG((tty),CLOCAL)
tty161include/linux/tty.h#define C_CIBAUD(tty)  _C_FLAG((tty),CIBAUD)
tty162include/linux/tty.h#define C_CRTSCTS(tty)  _C_FLAG((tty),CRTSCTS)
tty164include/linux/tty.h#define L_ISIG(tty)  _L_FLAG((tty),ISIG)
tty165include/linux/tty.h#define L_ICANON(tty)  _L_FLAG((tty),ICANON)
tty166include/linux/tty.h#define L_XCASE(tty)  _L_FLAG((tty),XCASE)
tty167include/linux/tty.h#define L_ECHO(tty)  _L_FLAG((tty),ECHO)
tty168include/linux/tty.h#define L_ECHOE(tty)  _L_FLAG((tty),ECHOE)
tty169include/linux/tty.h#define L_ECHOK(tty)  _L_FLAG((tty),ECHOK)
tty170include/linux/tty.h#define L_ECHONL(tty)  _L_FLAG((tty),ECHONL)
tty171include/linux/tty.h#define L_NOFLSH(tty)  _L_FLAG((tty),NOFLSH)
tty172include/linux/tty.h#define L_TOSTOP(tty)  _L_FLAG((tty),TOSTOP)
tty173include/linux/tty.h#define L_ECHOCTL(tty)  _L_FLAG((tty),ECHOCTL)
tty174include/linux/tty.h#define L_ECHOPRT(tty)  _L_FLAG((tty),ECHOPRT)
tty175include/linux/tty.h#define L_ECHOKE(tty)  _L_FLAG((tty),ECHOKE)
tty176include/linux/tty.h#define L_FLUSHO(tty)  _L_FLAG((tty),FLUSHO)
tty177include/linux/tty.h#define L_PENDIN(tty)  _L_FLAG((tty),PENDIN)
tty178include/linux/tty.h#define L_IEXTEN(tty)  _L_FLAG((tty),IEXTEN)
tty259include/linux/tty.h#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
tty287include/linux/tty.hextern int tty_paranoia_check(struct tty_struct *tty, dev_t device,
tty289include/linux/tty.hextern char *_tty_name(struct tty_struct *tty, char *buf);
tty290include/linux/tty.hextern char *tty_name(struct tty_struct *tty);
tty291include/linux/tty.hextern void tty_wait_until_sent(struct tty_struct * tty, int timeout);
tty292include/linux/tty.hextern int tty_check_change(struct tty_struct * tty);
tty293include/linux/tty.hextern void stop_tty(struct tty_struct * tty);
tty294include/linux/tty.hextern void start_tty(struct tty_struct * tty);
tty298include/linux/tty.hextern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
tty303include/linux/tty.hextern int tty_signal(int sig, struct tty_struct *tty);
tty304include/linux/tty.hextern void tty_hangup(struct tty_struct * tty);
tty305include/linux/tty.hextern void tty_vhangup(struct tty_struct * tty);
tty308include/linux/tty.hextern void do_SAK(struct tty_struct *tty);
tty315include/linux/tty.hextern int n_tty_ioctl(struct tty_struct * tty, struct file * file,
tty320include/linux/tty.hextern int  rs_open(struct tty_struct * tty, struct file * filp);
tty324include/linux/tty.hextern int  pty_open(struct tty_struct * tty, struct file * filp);
tty328include/linux/tty.hextern int con_open(struct tty_struct * tty, struct file * filp);
tty333include/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,
tty519kernel/sys.ccurrent->tty = NULL;