author | mickeyl <mickeyl> | 2005-03-31 20:03:31 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-03-31 20:03:31 (UTC) |
commit | 629c1c9a366f56e9d98940f8dcd0778d039f1421 (patch) (unidiff) | |
tree | b54e1da270ada28f0127585d4d9dcf46e36c3de1 /libopie2 | |
parent | 44bfce59cd3cfb2fa6d75675dee5db5edb36e522 (diff) | |
download | opie-629c1c9a366f56e9d98940f8dcd0778d039f1421.zip opie-629c1c9a366f56e9d98940f8dcd0778d039f1421.tar.gz opie-629c1c9a366f56e9d98940f8dcd0778d039f1421.tar.bz2 |
check for '2.4' kernel rather than for an Embedix version, since we will
most likely neither see a unified 2.4 OZ kernel, nor a Embedix 2.6.
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 26 |
2 files changed, 8 insertions, 20 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index cf2061b..af77ed1 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -118,8 +118,6 @@ struct default_button default_buttons [] = { | |||
118 | ODevice *ODevice::inst() | 118 | ODevice *ODevice::inst() |
119 | { | 119 | { |
120 | static ODevice *dev = 0; | 120 | static ODevice *dev = 0; |
121 | |||
122 | // rewrite this to only use /proc/cpuinfo or so | ||
123 | QString cpu_info; | 121 | QString cpu_info; |
124 | 122 | ||
125 | if ( !dev ) | 123 | if ( !dev ) |
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 3bd7f6e..e9b163a 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -114,22 +114,16 @@ struct z_button z_buttons_c700 [] = { | |||
114 | }; | 114 | }; |
115 | 115 | ||
116 | // FIXME This gets unnecessary complicated. We should think about splitting the Zaurus | 116 | // FIXME This gets unnecessary complicated. We should think about splitting the Zaurus |
117 | // class up into individual classes. We need three classes | 117 | // class up into individual classes. We would need three classes |
118 | // | 118 | // |
119 | // Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000) | 119 | // Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000) |
120 | // Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600) | 120 | // Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600) |
121 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000) | 121 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000, C1000) |
122 | // Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000) | 122 | // Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000) |
123 | // | ||
124 | // Only question right now is: Do we really need to do it? Because as soon | ||
125 | // as the OpenZaurus kernel is ready, there will be a unified interface for all | ||
126 | // Zaurus models (concerning apm, backlight, buttons, etc.) | ||
127 | // | ||
128 | // Comments? - mickeyl. | ||
129 | 123 | ||
130 | void Zaurus::init(const QString& cpu_info) | 124 | void Zaurus::init(const QString& cpu_info) |
131 | { | 125 | { |
132 | // Set the time to wait until the system is realy suspended | 126 | // Set the time to wait until the system is really suspended |
133 | // the delta between apm --suspend and sleeping | 127 | // the delta between apm --suspend and sleeping |
134 | setAPMTimeOut( 15000 ); | 128 | setAPMTimeOut( 15000 ); |
135 | 129 | ||
@@ -150,18 +144,14 @@ void Zaurus::init(const QString& cpu_info) | |||
150 | d->m_system = System_OpenZaurus; | 144 | d->m_system = System_OpenZaurus; |
151 | // sysver already gathered | 145 | // sysver already gathered |
152 | 146 | ||
153 | // OpenZaurus sometimes uses the embedix kernel, check if this is one | 147 | // OpenZaurus sometimes uses the 2.4 (embedix) kernel, check if this is one |
154 | FILE *uname = popen("uname -r", "r"); | 148 | FILE *uname = popen("uname -r", "r"); |
155 | QFile f; | 149 | QFile f; |
156 | QString line; | 150 | QString line; |
157 | if ( f.open(IO_ReadOnly, uname) ) { | 151 | if ( f.open(IO_ReadOnly, uname) ) { |
158 | QTextStream ts ( &f ); | 152 | QTextStream ts ( &f ); |
159 | line = ts. readLine(); | 153 | line = ts.readLine(); |
160 | int loc = line. find ( "embedix" ); | 154 | m_embedix = line.startsWith( "2.4." ); |
161 | if ( loc != -1 ) | ||
162 | m_embedix = true; | ||
163 | else | ||
164 | m_embedix = false; | ||
165 | f.close(); | 155 | f.close(); |
166 | } | 156 | } |
167 | pclose(uname); | 157 | pclose(uname); |
@@ -229,9 +219,9 @@ void Zaurus::init(const QString& cpu_info) | |||
229 | m_leds[0] = Led_Off; | 219 | m_leds[0] = Led_Off; |
230 | 220 | ||
231 | if ( m_embedix ) | 221 | if ( m_embedix ) |
232 | qDebug( "Zaurus::init() - Using the Embedix HAL on a %s", (const char*) d->m_modelstr ); | 222 | qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr ); |
233 | else | 223 | else |
234 | qDebug( "Zaurus::init() - Using the OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); | 224 | qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); |
235 | } | 225 | } |
236 | 226 | ||
237 | void Zaurus::initButtons() | 227 | void Zaurus::initButtons() |