Lines Matching refs:termios
245 struct ktermios *termios = &tty->termios; in unset_locked_termios() local
251 NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag); in unset_locked_termios()
252 NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag); in unset_locked_termios()
253 NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag); in unset_locked_termios()
254 NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag); in unset_locked_termios()
255 termios->c_line = locked->c_line ? old->c_line : termios->c_line; in unset_locked_termios()
257 termios->c_cc[i] = locked->c_cc[i] ? in unset_locked_termios()
258 old->c_cc[i] : termios->c_cc[i]; in unset_locked_termios()
329 old_termios = tty->termios; in tty_set_termios()
330 tty->termios = *new_termios; in tty_set_termios()
336 tty_termios_copy_hw(&tty->termios, &old_termios); in tty_set_termios()
372 tmp_termios = tty->termios; in set_termios()
382 (struct termios __user *)arg)) in set_termios()
391 (struct termios __user *)arg))
426 *kterm = tty->termios; in copy_termios()
475 tmp.sg_ispeed = tty->termios.c_ispeed; in get_sgttyb()
476 tmp.sg_ospeed = tty->termios.c_ospeed; in get_sgttyb()
477 tmp.sg_erase = tty->termios.c_cc[VERASE]; in get_sgttyb()
478 tmp.sg_kill = tty->termios.c_cc[VKILL]; in get_sgttyb()
485 static void set_sgflags(struct ktermios *termios, int flags) in set_sgflags() argument
487 termios->c_iflag = ICRNL | IXON; in set_sgflags()
488 termios->c_oflag = 0; in set_sgflags()
489 termios->c_lflag = ISIG | ICANON; in set_sgflags()
491 termios->c_iflag = 0; in set_sgflags()
492 termios->c_lflag &= ~ICANON; in set_sgflags()
495 termios->c_lflag |= ECHO | ECHOE | ECHOK | in set_sgflags()
499 termios->c_oflag |= OPOST | ONLCR; in set_sgflags()
502 termios->c_iflag = 0; in set_sgflags()
503 termios->c_lflag &= ~(ISIG | ICANON); in set_sgflags()
505 if (!(termios->c_lflag & ICANON)) { in set_sgflags()
506 termios->c_cc[VMIN] = 1; in set_sgflags()
507 termios->c_cc[VTIME] = 0; in set_sgflags()
526 struct ktermios termios; in set_sgttyb() local
536 termios = tty->termios; in set_sgttyb()
537 termios.c_cc[VERASE] = tmp.sg_erase; in set_sgttyb()
538 termios.c_cc[VKILL] = tmp.sg_kill; in set_sgttyb()
539 set_sgflags(&termios, tmp.sg_flags); in set_sgttyb()
542 tty_termios_encode_baud_rate(&termios, termios.c_ispeed, in set_sgttyb()
543 termios.c_ospeed); in set_sgttyb()
546 tty_set_termios(tty, &termios); in set_sgttyb()
557 tmp.t_intrc = tty->termios.c_cc[VINTR]; in get_tchars()
558 tmp.t_quitc = tty->termios.c_cc[VQUIT]; in get_tchars()
559 tmp.t_startc = tty->termios.c_cc[VSTART]; in get_tchars()
560 tmp.t_stopc = tty->termios.c_cc[VSTOP]; in get_tchars()
561 tmp.t_eofc = tty->termios.c_cc[VEOF]; in get_tchars()
562 tmp.t_brkc = tty->termios.c_cc[VEOL2]; /* what is brkc anyway? */ in get_tchars()
574 tty->termios.c_cc[VINTR] = tmp.t_intrc; in set_tchars()
575 tty->termios.c_cc[VQUIT] = tmp.t_quitc; in set_tchars()
576 tty->termios.c_cc[VSTART] = tmp.t_startc; in set_tchars()
577 tty->termios.c_cc[VSTOP] = tmp.t_stopc; in set_tchars()
578 tty->termios.c_cc[VEOF] = tmp.t_eofc; in set_tchars()
579 tty->termios.c_cc[VEOL2] = tmp.t_brkc; /* what is brkc anyway? */ in set_tchars()
591 tmp.t_suspc = tty->termios.c_cc[VSUSP]; in get_ltchars()
593 tmp.t_dsuspc = tty->termios.c_cc[VSUSP]; in get_ltchars()
594 tmp.t_rprntc = tty->termios.c_cc[VREPRINT]; in get_ltchars()
596 tmp.t_flushc = tty->termios.c_cc[VEOL2]; in get_ltchars()
597 tmp.t_werasc = tty->termios.c_cc[VWERASE]; in get_ltchars()
598 tmp.t_lnextc = tty->termios.c_cc[VLNEXT]; in get_ltchars()
611 tty->termios.c_cc[VSUSP] = tmp.t_suspc; in set_ltchars()
613 tty->termios.c_cc[VEOL2] = tmp.t_dsuspc; in set_ltchars()
614 tty->termios.c_cc[VREPRINT] = tmp.t_rprntc; in set_ltchars()
616 tty->termios.c_cc[VEOL2] = tmp.t_flushc; in set_ltchars()
617 tty->termios.c_cc[VWERASE] = tmp.t_werasc; in set_ltchars()
618 tty->termios.c_cc[VLNEXT] = tmp.t_lnextc; in set_ltchars()
640 old = tty->termios; in tty_change_softcar()
641 tty->termios.c_cflag &= ~CLOCAL; in tty_change_softcar()
642 tty->termios.c_cflag |= bit; in tty_change_softcar()
708 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
714 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
740 if (kernel_termios_to_user_termios((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
748 (struct termios __user *) arg)) in tty_mode_ioctl()
757 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, &kterm)) in tty_mode_ioctl()
765 (struct termios __user *) arg)) in tty_mode_ioctl()