summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-03-31 20:03:31 (UTC)
committer mickeyl <mickeyl>2005-03-31 20:03:31 (UTC)
commit629c1c9a366f56e9d98940f8dcd0778d039f1421 (patch) (side-by-side diff)
treeb54e1da270ada28f0127585d4d9dcf46e36c3de1
parent44bfce59cd3cfb2fa6d75675dee5db5edb36e522 (diff)
downloadopie-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.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp24
2 files changed, 7 insertions, 19 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
@@ -115,14 +115,12 @@ struct default_button default_buttons [] = {
"opiemail", "newMail()" },
};
ODevice *ODevice::inst()
{
static ODevice *dev = 0;
-
- // rewrite this to only use /proc/cpuinfo or so
QString cpu_info;
if ( !dev )
{
QFile f( PATH_PROC_CPUINFO );
if ( f.open( IO_ReadOnly ) )
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
@@ -111,28 +111,22 @@ struct z_button z_buttons_c700 [] = {
{ Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"),
"devicebuttons/z_hinge3",
"QPE/Rotation", "rotateDefault()",0},
};
// FIXME This gets unnecessary complicated. We should think about splitting the Zaurus
-// class up into individual classes. We need three classes
+// class up into individual classes. We would need three classes
//
// Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000)
// Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600)
-// Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000)
+// Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000, C1000)
// Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000)
-//
-// Only question right now is: Do we really need to do it? Because as soon
-// as the OpenZaurus kernel is ready, there will be a unified interface for all
-// Zaurus models (concerning apm, backlight, buttons, etc.)
-//
-// Comments? - mickeyl.
void Zaurus::init(const QString& cpu_info)
{
- // Set the time to wait until the system is realy suspended
+ // Set the time to wait until the system is really suspended
// the delta between apm --suspend and sleeping
setAPMTimeOut( 15000 );
// generic distribution code already scanned /etc/issue at that point -
// embedix releases contain "Embedix <version> | Linux for Embedded Devices"
if ( d->m_sysverstr.contains( "embedix", false ) )
@@ -147,24 +141,20 @@ void Zaurus::init(const QString& cpu_info)
{
d->m_vendorstr = "OpenZaurus Team";
d->m_systemstr = "OpenZaurus";
d->m_system = System_OpenZaurus;
// sysver already gathered
- // OpenZaurus sometimes uses the embedix kernel, check if this is one
+ // OpenZaurus sometimes uses the 2.4 (embedix) kernel, check if this is one
FILE *uname = popen("uname -r", "r");
QFile f;
QString line;
if ( f.open(IO_ReadOnly, uname) ) {
QTextStream ts ( &f );
line = ts. readLine();
- int loc = line. find ( "embedix" );
- if ( loc != -1 )
- m_embedix = true;
- else
- m_embedix = false;
+ m_embedix = line.startsWith( "2.4." );
f.close();
}
pclose(uname);
}
// check the Zaurus model
@@ -226,15 +216,15 @@ void Zaurus::init(const QString& cpu_info)
d->m_rotation = Rot270;
break;
}
m_leds[0] = Led_Off;
if ( m_embedix )
- qDebug( "Zaurus::init() - Using the Embedix HAL on a %s", (const char*) d->m_modelstr );
+ qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr );
else
- qDebug( "Zaurus::init() - Using the OpenZaurus HAL on a %s", (const char*) d->m_modelstr );
+ qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr );
}
void Zaurus::initButtons()
{
if ( d->m_buttons )
return;