Lines Matching refs:termios
19 static inline int user_termio_to_kernel_termios(struct ktermios *termios, in user_termio_to_kernel_termios() argument
26 termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp; in user_termio_to_kernel_termios()
30 termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp; in user_termio_to_kernel_termios()
34 termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp; in user_termio_to_kernel_termios()
38 termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp; in user_termio_to_kernel_termios()
40 if (get_user(termios->c_line, &termio->c_line) < 0) in user_termio_to_kernel_termios()
43 if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0) in user_termio_to_kernel_termios()
56 struct ktermios *termios) in kernel_termios_to_user_termio() argument
58 if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || in kernel_termios_to_user_termio()
59 put_user(termios->c_oflag, &termio->c_oflag) < 0 || in kernel_termios_to_user_termio()
60 put_user(termios->c_cflag, &termio->c_cflag) < 0 || in kernel_termios_to_user_termio()
61 put_user(termios->c_lflag, &termio->c_lflag) < 0 || in kernel_termios_to_user_termio()
62 put_user(termios->c_line, &termio->c_line) < 0 || in kernel_termios_to_user_termio()
63 copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0) in kernel_termios_to_user_termio()
83 struct termios __user *u) in user_termios_to_kernel_termios_1()
85 return copy_from_user(k, u, sizeof(struct termios)); in user_termios_to_kernel_termios_1()
88 static inline int kernel_termios_to_user_termios_1(struct termios __user *u, in kernel_termios_to_user_termios_1()
91 return copy_to_user(u, k, sizeof(struct termios)); in kernel_termios_to_user_termios_1()
95 struct termios __user *u) in user_termios_to_kernel_termios()
97 return copy_from_user(k, u, sizeof(struct termios)); in user_termios_to_kernel_termios()
100 static inline int kernel_termios_to_user_termios(struct termios __user *u, in kernel_termios_to_user_termios()
103 return copy_to_user(u, k, sizeof(struct termios)); in kernel_termios_to_user_termios()