Lines Matching refs:termios
15 static inline int user_termio_to_kernel_termios(struct ktermios *termios, in user_termio_to_kernel_termios() argument
22 termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp; in user_termio_to_kernel_termios()
26 termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp; in user_termio_to_kernel_termios()
30 termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp; in user_termio_to_kernel_termios()
34 termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp; in user_termio_to_kernel_termios()
36 if (get_user(termios->c_line, &termio->c_line) < 0) in user_termio_to_kernel_termios()
39 if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0) in user_termio_to_kernel_termios()
52 struct ktermios *termios) in kernel_termios_to_user_termio() argument
54 if (put_user(termios->c_iflag, &termio->c_iflag) < 0 || in kernel_termios_to_user_termio()
55 put_user(termios->c_oflag, &termio->c_oflag) < 0 || in kernel_termios_to_user_termio()
56 put_user(termios->c_cflag, &termio->c_cflag) < 0 || in kernel_termios_to_user_termio()
57 put_user(termios->c_lflag, &termio->c_lflag) < 0 || in kernel_termios_to_user_termio()
58 put_user(termios->c_line, &termio->c_line) < 0 || in kernel_termios_to_user_termio()
59 copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0) in kernel_termios_to_user_termio()
66 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
70 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
73 #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
74 #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))