patch-2.1.30 linux/include/asm-i386/termios.h
Next file: linux/include/asm-m68k/ide.h
Previous file: linux/include/asm-i386/system.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Tue Mar 11 14:08:47 1997
- Orig file:
v2.1.29/linux/include/asm-i386/termios.h
- Orig date:
Tue Mar 4 10:25:26 1997
diff -u --recursive --new-file v2.1.29/linux/include/asm-i386/termios.h linux/include/asm-i386/termios.h
@@ -66,26 +66,26 @@
}
#define user_termio_to_kernel_termios(termios, termio) \
-do { \
+({ \
SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-} while(0)
+})
/*
* Translate a "termios" structure into a "termio". Ugh.
*/
#define kernel_termios_to_user_termio(termio, termios) \
-do { \
+({ \
put_user((termios)->c_iflag, &(termio)->c_iflag); \
put_user((termios)->c_oflag, &(termio)->c_oflag); \
put_user((termios)->c_cflag, &(termio)->c_cflag); \
put_user((termios)->c_lflag, &(termio)->c_lflag); \
put_user((termios)->c_line, &(termio)->c_line); \
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
-} while(0)
+})
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov