Lines Matching refs:termios
14 static inline int user_termio_to_kernel_termios(struct ktermios *termios, in user_termio_to_kernel_termios() argument
21 termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp; in user_termio_to_kernel_termios()
25 termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp; in user_termio_to_kernel_termios()
29 termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp; in user_termio_to_kernel_termios()
33 termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp; in user_termio_to_kernel_termios()
35 if (get_user(termios->c_line, &termio->c_line) < 0) in user_termio_to_kernel_termios()
38 if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0) in user_termio_to_kernel_termios()
51 struct ktermios *termios) in kernel_termios_to_user_termio() argument
53 if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || in kernel_termios_to_user_termio()
54 put_user(termios->c_oflag, &termio->c_oflag) < 0 || in kernel_termios_to_user_termio()
55 put_user(termios->c_cflag, &termio->c_cflag) < 0 || in kernel_termios_to_user_termio()
56 put_user(termios->c_lflag, &termio->c_lflag) < 0 || in kernel_termios_to_user_termio()
57 put_user(termios->c_line, &termio->c_line) < 0 || in kernel_termios_to_user_termio()
58 copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0) in kernel_termios_to_user_termio()
65 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
69 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
72 #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
73 #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))