linux.hh (8600:b0d7c64ada19) linux.hh (9141:593fe25c86a6)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2009 The University of Edinburgh
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 117 unchanged lines hidden (view full) ---

126 //@}
127
128 /// For mmap().
129 static const unsigned TGT_MAP_ANONYMOUS = 0x20;
130 static const unsigned TGT_MAP_FIXED = 0x10;
131
132 //@{
133 /// ioctl() command codes.
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2009 The University of Edinburgh
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 117 unchanged lines hidden (view full) ---

126 //@}
127
128 /// For mmap().
129 static const unsigned TGT_MAP_ANONYMOUS = 0x20;
130 static const unsigned TGT_MAP_FIXED = 0x10;
131
132 //@{
133 /// ioctl() command codes.
134 /// These are for the 2.6.15 kernel. Some have changed for
135 /// later versions.
136 static const unsigned TIOCGETP_ = 0x40067408;
137 static const unsigned TIOCSETP_ = 0x80067409;
138 static const unsigned TIOCSETN_ = 0x8006740a;
139 static const unsigned TIOCSETC_ = 0x80067411;
140 static const unsigned TIOCGETC_ = 0x40067412;
141 static const unsigned FIONREAD_ = 0x4004667f;
142 static const unsigned TIOCISATTY_ = 0x2000745e;
143 static const unsigned TIOCGETS_ = 0x402c7413;
144 static const unsigned TIOCGETA_ = 0x40147417;
145 static const unsigned TCSETAW_ = 0x80147419;
134 static const unsigned TGT_TIOCGETP = 0x40067408;
135 static const unsigned TGT_TIOCSETP = 0x80067409;
136 static const unsigned TGT_TIOCSETN = 0x8006740a;
137 static const unsigned TGT_TIOCSETC = 0x80067411;
138 static const unsigned TGT_TIOCGETC = 0x40067412;
139 static const unsigned TGT_FIONREAD = 0x4004667f;
140 static const unsigned TGT_TCGETS = 0x402c7413;
141 static const unsigned TGT_TCGETA = 0x40127417;
142 static const unsigned TGT_TCSETAW = 0x80147419; // 2.6.15 kernel
146 //@}
143 //@}
144
145 static bool
146 isTtyReq(unsigned req)
147 {
148 switch (req) {
149 case TGT_TIOCGETP:
150 case TGT_TIOCSETP:
151 case TGT_TIOCSETN:
152 case TGT_TIOCSETC:
153 case TGT_TIOCGETC:
154 case TGT_TCGETS:
155 case TGT_TCGETA:
156 case TGT_TCSETAW:
157 return true;
158 default:
159 return false;
160 }
161 }
147};
148
149#endif // __ARCH_POWER_LINUX_LINUX_HH__
162};
163
164#endif // __ARCH_POWER_LINUX_LINUX_HH__