Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12279
b: refs/heads/master
c: 3c4cf5e
h: refs/heads/master
i:
  12277: e6da65c
  12275: 9580c25
  12271: 44461eb
v: v3
  • Loading branch information
Stephen Rothwell committed Nov 1, 2005
1 parent 69e6813 commit eae60fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 870c6ff2ac0cb708697c2c06f3e5eddf9e3b38cb
refs/heads/master: 3c4cf5ee5a9224a800a74b5dfcb435550ed30737
34 changes: 1 addition & 33 deletions trunk/include/asm-powerpc/termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,39 +96,7 @@ struct termio {

#ifdef __KERNEL__

/*
* Translate a "termio" structure into a "termios". Ugh.
*/
#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
unsigned short __tmp; \
get_user(__tmp,&(termio)->x); \
(termios)->x = (0xffff0000 & (termios)->x) | __tmp; \
}

#define user_termio_to_kernel_termios(termios, termio) \
({ \
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); \
})

/*
* Translate a "termios" structure into a "termio". Ugh.
*/
#define kernel_termios_to_user_termio(termio, termios) \
({ \
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); \
})

#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))
#include <asm-generic/termios.h>

#endif /* __KERNEL__ */

Expand Down

0 comments on commit eae60fe

Please sign in to comment.