Lines Matching refs:termios

11 #include <linux/termios.h>
40 * Internal flag options for termios setting behavior
105 * Takes the termios rwsem to protect against parallel throttle/unthrottle
107 * termios data at this point when implementing software flow control.
127 * Takes the termios rwsem to protect against parallel throttle/unthrottle
129 * termios data at this point when implementing software flow control.
246 struct ktermios *termios = &tty->termios;
252 NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag);
253 NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag);
254 NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag);
255 NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag);
256 termios->c_line = locked->c_line ? old->c_line : termios->c_line;
258 termios->c_cc[i] = locked->c_cc[i] ?
259 old->c_cc[i] : termios->c_cc[i];
265 * @new: New termios
266 * @old: Old termios
269 * the old termios structure to the new one. This is used in cases
287 * @a: termios
288 * @b: termios to compare
291 * between the two termios structures, or a speed change is needed.
305 * tty_set_termios - update termios values
309 * Perform updates to the termios values set on this terminal.
310 * A master pty's termios should never be set.
323 * Perform the actual termios internal changes under lock.
330 old_termios = tty->termios;
331 tty->termios = *new_termios;
337 tty_termios_copy_hw(&tty->termios, &old_termios);
351 * set_termios - set termios values for a tty
356 * Helper function to prepare termios data and run necessary other
373 tmp_termios = tty->termios;
383 (struct termios __user *)arg))
392 (struct termios __user *)arg))
438 /* FIXME: Arguably if tmp_termios == tty->termios AND the
439 actual requested termios was not tmp_termios then we may
448 *kterm = tty->termios;
497 tmp.sg_ispeed = tty->termios.c_ispeed;
498 tmp.sg_ospeed = tty->termios.c_ospeed;
499 tmp.sg_erase = tty->termios.c_cc[VERASE];
500 tmp.sg_kill = tty->termios.c_cc[VKILL];
507 static void set_sgflags(struct ktermios *termios, int flags)
509 termios->c_iflag = ICRNL | IXON;
510 termios->c_oflag = 0;
511 termios->c_lflag = ISIG | ICANON;
513 termios->c_iflag = 0;
514 termios->c_lflag &= ~ICANON;
517 termios->c_lflag |= ECHO | ECHOE | ECHOK |
521 termios->c_oflag |= OPOST | ONLCR;
524 termios->c_iflag = 0;
525 termios->c_lflag &= ~(ISIG | ICANON);
527 if (!(termios->c_lflag & ICANON)) {
528 termios->c_cc[VMIN] = 1;
529 termios->c_cc[VTIME] = 0;
548 struct ktermios termios;
558 termios = tty->termios;
559 termios.c_cc[VERASE] = tmp.sg_erase;
560 termios.c_cc[VKILL] = tmp.sg_kill;
561 set_sgflags(&termios, tmp.sg_flags);
564 tty_termios_encode_baud_rate(&termios, termios.c_ispeed,
565 termios.c_ospeed);
568 tty_set_termios(tty, &termios);
579 tmp.t_intrc = tty->termios.c_cc[VINTR];
580 tmp.t_quitc = tty->termios.c_cc[VQUIT];
581 tmp.t_startc = tty->termios.c_cc[VSTART];
582 tmp.t_stopc = tty->termios.c_cc[VSTOP];
583 tmp.t_eofc = tty->termios.c_cc[VEOF];
584 tmp.t_brkc = tty->termios.c_cc[VEOL2]; /* what is brkc anyway? */
596 tty->termios.c_cc[VINTR] = tmp.t_intrc;
597 tty->termios.c_cc[VQUIT] = tmp.t_quitc;
598 tty->termios.c_cc[VSTART] = tmp.t_startc;
599 tty->termios.c_cc[VSTOP] = tmp.t_stopc;
600 tty->termios.c_cc[VEOF] = tmp.t_eofc;
601 tty->termios.c_cc[VEOL2] = tmp.t_brkc; /* what is brkc anyway? */
613 tmp.t_suspc = tty->termios.c_cc[VSUSP];
615 tmp.t_dsuspc = tty->termios.c_cc[VSUSP];
616 tmp.t_rprntc = tty->termios.c_cc[VREPRINT];
618 tmp.t_flushc = tty->termios.c_cc[VEOL2];
619 tmp.t_werasc = tty->termios.c_cc[VWERASE];
620 tmp.t_lnextc = tty->termios.c_cc[VLNEXT];
633 tty->termios.c_cc[VSUSP] = tmp.t_suspc;
635 tty->termios.c_cc[VEOL2] = tmp.t_dsuspc;
636 tty->termios.c_cc[VREPRINT] = tmp.t_rprntc;
638 tty->termios.c_cc[VEOL2] = tmp.t_flushc;
639 tty->termios.c_cc[VWERASE] = tmp.t_werasc;
640 tty->termios.c_cc[VLNEXT] = tmp.t_lnextc;
652 * layer to make it visible. All done with the termios rwsem
662 old = tty->termios;
663 tty->termios.c_cflag &= ~CLOCAL;
664 tty->termios.c_cflag |= bit;
730 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm))
736 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm))
762 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm))
770 (struct termios __user *) arg))
779 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm))
787 (struct termios __user *) arg))