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

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

89 uint64_t totalswap; /* Total swap space size */
90 uint64_t freeswap; /* swap space still available */
91 uint16_t procs; /* Number of current processes */
92 uint64_t totalhigh; /* Total high memory size */
93 uint64_t freehigh; /* Available high memory size */
94 uint64_t mem_unit; /* Memory unit size in bytes */
95 } tgt_sysinfo;
96
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

89 uint64_t totalswap; /* Total swap space size */
90 uint64_t freeswap; /* swap space still available */
91 uint16_t procs; /* Number of current processes */
92 uint64_t totalhigh; /* Total high memory size */
93 uint64_t freehigh; /* Available high memory size */
94 uint64_t mem_unit; /* Memory unit size in bytes */
95 } tgt_sysinfo;
96
97 //@{
98 /// ioctl() command codes.
99 /// These were calculated using the SPARC Linux headers on an x86
100 /// machine and thus may not be correct. It would be good to
101 /// verify/update these values on an actual SPARC Linux machine.
102 static const unsigned TGT_TCGETA = 0x40125401;
103 static const unsigned TGT_TCSETAW = 0x80125403;
104 static const unsigned TGT_TCGETS = 0x40385408;
105 static const unsigned TGT_FIONREAD = 0x4004667f;
106 static const unsigned TGT_TIOCGETP = 0x40067408;
107 static const unsigned TGT_TIOCSETP = 0x80067409;
108 static const unsigned TGT_TIOCSETN = 0x8006740a;
109 //@}
110
111 static bool
112 isTtyReq(unsigned req)
113 {
114 switch (req) {
115 case TGT_TIOCGETP:
116 case TGT_TIOCSETP:
117 case TGT_TIOCSETN:
118 case TGT_TCGETS:
119 case TGT_TCGETA:
120 case TGT_TCSETAW:
121 return true;
122 default:
123 return false;
124 }
125 }
97};
98
99class Sparc32Linux : public SparcLinux
100{
101 public:
102
103 typedef struct {
104 uint64_t st_dev;

--- 39 unchanged lines hidden ---
126};
127
128class Sparc32Linux : public SparcLinux
129{
130 public:
131
132 typedef struct {
133 uint64_t st_dev;

--- 39 unchanged lines hidden ---