Lines Matching refs:termios
20 static inline int user_termio_to_kernel_termios(struct ktermios *termios, in user_termio_to_kernel_termios() argument
27 termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp; in user_termio_to_kernel_termios()
31 termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp; in user_termio_to_kernel_termios()
35 termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp; in user_termio_to_kernel_termios()
39 termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp; in user_termio_to_kernel_termios()
41 if (get_user(termios->c_line, &termio->c_line) < 0) in user_termio_to_kernel_termios()
44 if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0) in user_termio_to_kernel_termios()
57 struct ktermios *termios) in kernel_termios_to_user_termio() argument
59 if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || in kernel_termios_to_user_termio()
60 put_user(termios->c_oflag, &termio->c_oflag) < 0 || in kernel_termios_to_user_termio()
61 put_user(termios->c_cflag, &termio->c_cflag) < 0 || in kernel_termios_to_user_termio()
62 put_user(termios->c_lflag, &termio->c_lflag) < 0 || in kernel_termios_to_user_termio()
63 put_user(termios->c_line, &termio->c_line) < 0 || in kernel_termios_to_user_termio()
64 copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0) in kernel_termios_to_user_termio()
84 struct termios __user *u) in user_termios_to_kernel_termios_1()
86 return copy_from_user(k, u, sizeof(struct termios)); in user_termios_to_kernel_termios_1()
89 static inline int kernel_termios_to_user_termios_1(struct termios __user *u, in kernel_termios_to_user_termios_1()
92 return copy_to_user(u, k, sizeof(struct termios)); in kernel_termios_to_user_termios_1()
96 struct termios __user *u) in user_termios_to_kernel_termios()
98 return copy_from_user(k, u, sizeof(struct termios)); in user_termios_to_kernel_termios()
101 static inline int kernel_termios_to_user_termios(struct termios __user *u, in kernel_termios_to_user_termios()
104 return copy_to_user(u, k, sizeof(struct termios)); in kernel_termios_to_user_termios()