summaryrefslogtreecommitdiff
path: root/libopie
authoreilers <eilers>2003-11-17 17:32:06 (UTC)
committer eilers <eilers>2003-11-17 17:32:06 (UTC)
commitd46685864bb18ffa82d5dac4fcfb1ae96471e89a (patch) (side-by-side diff)
treeab5e53d5d777aea2b8baf62eeca8cd9d5605bbcf /libopie
parente8bba52dc9443d3aadcc2c221fa62ba37ea5c712 (diff)
downloadopie-d46685864bb18ffa82d5dac4fcfb1ae96471e89a.zip
opie-d46685864bb18ffa82d5dac4fcfb1ae96471e89a.tar.gz
opie-d46685864bb18ffa82d5dac4fcfb1ae96471e89a.tar.bz2
Shit .. missed a wrong ")".. Odevice compiles now.. !
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 58254a7..71ed9e4 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1478,97 +1478,97 @@ int iPAQ::readLightSensor ( )
::close ( fd );
}
return val;
}
int iPAQ::lightSensorResolution ( ) const
{
return 256;
}
/**************************************************
*
* Zaurus
*
**************************************************/
// Check whether this device is the sharp zaurus..
bool Zaurus::isZaurus()
{
// If the special devices by embedix exist, it is quite simple: it is a Zaurus !
if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ) ){
return true;
}
// On non-embedix kernels, we have to look closer.
bool is_zaurus = false;
QFile f ( "/proc/cpuinfo" );
if ( f. open ( IO_ReadOnly ) ) {
QString model;
QFile f ( "/proc/cpuinfo" );
QTextStream ts ( &f );
QString line;
while( line = ts. readLine ( ) ) {
if ( line. left ( 8 ) == "Hardware" )
break;
}
int loc = line. find ( ":" );
if ( loc != -1 )
model = line. mid ( loc + 2 ). simplifyWhiteSpace( );
if ( model == "Sharp-Collie"
|| model == "Collie"
|| model == "SHARP Corgi"
|| model == "SHARP Shepherd"
|| model == "SHARP Poodle"
- || model == "SHARP Husky" )
+ || model == "SHARP Husky"
)
is_zaurus = true;
}
return is_zaurus;
}
void Zaurus::init ( )
{
d-> m_vendorstr = "Sharp";
d-> m_vendor = Vendor_Sharp;
m_embedix = true; // Not openzaurus means: It has an embedix kernel !
// QFile f ( "/proc/filesystems" );
QString model;
// It isn't a good idea to check the system configuration to
// detect the distribution !
// Otherwise it may happen that any other distribution is detected as openzaurus, just
// because it uses a jffs2 filesystem..
// (eilers)
// if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) {
QFile f ("/etc/oz_version");
if ( f.exists() ){
d-> m_vendorstr = "OpenZaurus Team";
d-> m_systemstr = "OpenZaurus";
d-> m_system = System_OpenZaurus;
if ( f. open ( IO_ReadOnly )) {
QTextStream ts ( &f );
d-> m_sysverstr = ts. readLine ( );//. mid ( 10 );
f. close ( );
}
// Openzaurus sometimes uses the embedix kernel!
// => Check whether this is an embedix kernel
FILE *uname = popen("uname -r", "r");
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;
f. close ( );