• Home
  • Raw
  • Download

Lines Matching refs:termios

244 	struct ktermios *termios = &tty->termios;  in unset_locked_termios()  local
250 NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag); in unset_locked_termios()
251 NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag); in unset_locked_termios()
252 NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag); in unset_locked_termios()
253 NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag); in unset_locked_termios()
254 termios->c_line = locked->c_line ? old->c_line : termios->c_line; in unset_locked_termios()
256 termios->c_cc[i] = locked->c_cc[i] ? in unset_locked_termios()
257 old->c_cc[i] : termios->c_cc[i]; in unset_locked_termios()
309 speed_t tty_termios_baud_rate(struct ktermios *termios) in tty_termios_baud_rate() argument
313 cbaud = termios->c_cflag & CBAUD; in tty_termios_baud_rate()
318 return termios->c_ospeed; in tty_termios_baud_rate()
324 termios->c_cflag &= ~CBAUDEX; in tty_termios_baud_rate()
344 speed_t tty_termios_input_baud_rate(struct ktermios *termios) in tty_termios_input_baud_rate() argument
347 unsigned int cbaud = (termios->c_cflag >> IBSHIFT) & CBAUD; in tty_termios_input_baud_rate()
350 return tty_termios_baud_rate(termios); in tty_termios_input_baud_rate()
354 return termios->c_ispeed; in tty_termios_input_baud_rate()
360 termios->c_cflag &= ~(CBAUDEX << IBSHIFT); in tty_termios_input_baud_rate()
366 return tty_termios_baud_rate(termios); in tty_termios_input_baud_rate()
393 void tty_termios_encode_baud_rate(struct ktermios *termios, in tty_termios_encode_baud_rate() argument
404 termios->c_ispeed = ibaud; in tty_termios_encode_baud_rate()
405 termios->c_ospeed = obaud; in tty_termios_encode_baud_rate()
412 if ((termios->c_cflag & CBAUD) == BOTHER) in tty_termios_encode_baud_rate()
414 if (((termios->c_cflag >> IBSHIFT) & CBAUD) == BOTHER) in tty_termios_encode_baud_rate()
416 if ((termios->c_cflag >> IBSHIFT) & CBAUD) in tty_termios_encode_baud_rate()
419 termios->c_cflag &= ~CBAUD; in tty_termios_encode_baud_rate()
431 termios->c_cflag |= baud_bits[i]; in tty_termios_encode_baud_rate()
443 termios->c_cflag |= (baud_bits[i] << IBSHIFT); in tty_termios_encode_baud_rate()
455 termios->c_cflag |= BOTHER; in tty_termios_encode_baud_rate()
459 termios->c_cflag |= (BOTHER << IBSHIFT); in tty_termios_encode_baud_rate()
479 tty_termios_encode_baud_rate(&tty->termios, ibaud, obaud); in tty_encode_baud_rate()
550 old_termios = tty->termios; in tty_set_termios()
551 tty->termios = *new_termios; in tty_set_termios()
557 tty_termios_copy_hw(&tty->termios, &old_termios); in tty_set_termios()
593 tmp_termios = tty->termios; in set_termios()
603 (struct termios __user *)arg)) in set_termios()
612 (struct termios __user *)arg))
647 *kterm = tty->termios; in copy_termios()
741 tmp.sg_ispeed = tty->termios.c_ispeed; in get_sgttyb()
742 tmp.sg_ospeed = tty->termios.c_ospeed; in get_sgttyb()
743 tmp.sg_erase = tty->termios.c_cc[VERASE]; in get_sgttyb()
744 tmp.sg_kill = tty->termios.c_cc[VKILL]; in get_sgttyb()
751 static void set_sgflags(struct ktermios *termios, int flags) in set_sgflags() argument
753 termios->c_iflag = ICRNL | IXON; in set_sgflags()
754 termios->c_oflag = 0; in set_sgflags()
755 termios->c_lflag = ISIG | ICANON; in set_sgflags()
757 termios->c_iflag = 0; in set_sgflags()
758 termios->c_lflag &= ~ICANON; in set_sgflags()
761 termios->c_lflag |= ECHO | ECHOE | ECHOK | in set_sgflags()
765 termios->c_oflag |= OPOST | ONLCR; in set_sgflags()
768 termios->c_iflag = 0; in set_sgflags()
769 termios->c_lflag &= ~(ISIG | ICANON); in set_sgflags()
771 if (!(termios->c_lflag & ICANON)) { in set_sgflags()
772 termios->c_cc[VMIN] = 1; in set_sgflags()
773 termios->c_cc[VTIME] = 0; in set_sgflags()
792 struct ktermios termios; in set_sgttyb() local
802 termios = tty->termios; in set_sgttyb()
803 termios.c_cc[VERASE] = tmp.sg_erase; in set_sgttyb()
804 termios.c_cc[VKILL] = tmp.sg_kill; in set_sgttyb()
805 set_sgflags(&termios, tmp.sg_flags); in set_sgttyb()
808 tty_termios_encode_baud_rate(&termios, termios.c_ispeed, in set_sgttyb()
809 termios.c_ospeed); in set_sgttyb()
812 tty_set_termios(tty, &termios); in set_sgttyb()
823 tmp.t_intrc = tty->termios.c_cc[VINTR]; in get_tchars()
824 tmp.t_quitc = tty->termios.c_cc[VQUIT]; in get_tchars()
825 tmp.t_startc = tty->termios.c_cc[VSTART]; in get_tchars()
826 tmp.t_stopc = tty->termios.c_cc[VSTOP]; in get_tchars()
827 tmp.t_eofc = tty->termios.c_cc[VEOF]; in get_tchars()
828 tmp.t_brkc = tty->termios.c_cc[VEOL2]; /* what is brkc anyway? */ in get_tchars()
840 tty->termios.c_cc[VINTR] = tmp.t_intrc; in set_tchars()
841 tty->termios.c_cc[VQUIT] = tmp.t_quitc; in set_tchars()
842 tty->termios.c_cc[VSTART] = tmp.t_startc; in set_tchars()
843 tty->termios.c_cc[VSTOP] = tmp.t_stopc; in set_tchars()
844 tty->termios.c_cc[VEOF] = tmp.t_eofc; in set_tchars()
845 tty->termios.c_cc[VEOL2] = tmp.t_brkc; /* what is brkc anyway? */ in set_tchars()
857 tmp.t_suspc = tty->termios.c_cc[VSUSP]; in get_ltchars()
859 tmp.t_dsuspc = tty->termios.c_cc[VSUSP]; in get_ltchars()
860 tmp.t_rprntc = tty->termios.c_cc[VREPRINT]; in get_ltchars()
862 tmp.t_flushc = tty->termios.c_cc[VEOL2]; in get_ltchars()
863 tmp.t_werasc = tty->termios.c_cc[VWERASE]; in get_ltchars()
864 tmp.t_lnextc = tty->termios.c_cc[VLNEXT]; in get_ltchars()
877 tty->termios.c_cc[VSUSP] = tmp.t_suspc; in set_ltchars()
879 tty->termios.c_cc[VEOL2] = tmp.t_dsuspc; in set_ltchars()
880 tty->termios.c_cc[VREPRINT] = tmp.t_rprntc; in set_ltchars()
882 tty->termios.c_cc[VEOL2] = tmp.t_flushc; in set_ltchars()
883 tty->termios.c_cc[VWERASE] = tmp.t_werasc; in set_ltchars()
884 tty->termios.c_cc[VLNEXT] = tmp.t_lnextc; in set_ltchars()
906 old = tty->termios; in tty_change_softcar()
907 tty->termios.c_cflag &= ~CLOCAL; in tty_change_softcar()
908 tty->termios.c_cflag |= bit; in tty_change_softcar()
974 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
980 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
1006 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
1014 (struct termios __user *) arg)) in tty_mode_ioctl()
1023 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
1031 (struct termios __user *) arg)) in tty_mode_ioctl()