summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp19
-rw-r--r--libopie/odevice.h1
2 files changed, 18 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index bc43c52..a33d4ad 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -711,14 +711,12 @@ int iPAQ::lightSensorResolution ( ) const
711 **************************************************/ 711 **************************************************/
712 712
713 713
714 714
715void Zaurus::init ( ) 715void Zaurus::init ( )
716{ 716{
717 d-> m_modelstr = "Zaurus SL5000";
718 d-> m_model = Model_Zaurus_SL5000;
719 d-> m_vendorstr = "Sharp"; 717 d-> m_vendorstr = "Sharp";
720 d-> m_vendor = Vendor_Sharp; 718 d-> m_vendor = Vendor_Sharp;
721 719
722 QFile f ( "/proc/filesystems" ); 720 QFile f ( "/proc/filesystems" );
723 721
724 if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { 722 if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) {
@@ -736,12 +734,29 @@ void Zaurus::init ( )
736 } 734 }
737 else { 735 else {
738 d-> m_systemstr = "Zaurus"; 736 d-> m_systemstr = "Zaurus";
739 d-> m_system = System_Zaurus; 737 d-> m_system = System_Zaurus;
740 } 738 }
741 739
740 f. setName ( "/proc/deviceinfo/product" );
741 if ( f. open ( IO_ReadOnly ) ) {
742 QTextStream ts ( &f );
743 QString model = ts. readLine ( );
744 f. close ( );
745 if ( model == "SL-5000D" ) {
746 d-> m_model = Model_Zaurus_SL5000;
747 d-> m_modelstr = "Zaurus SL-5000D";
748 } else if ( model == "SL-5500" ) {
749 d-> m_model = Model_Zaurus_SL5500;
750 d-> m_modelstr = "Zaurus SL-5500";
751 }
752 }
753 else {
754 d-> m_model = Model_Zaurus_SL5000;
755 d-> m_modelstr = "Zaurus SL-5000D (unverified)";
756 }
742 757
743 m_leds [0] = Led_Off; 758 m_leds [0] = Led_Off;
744} 759}
745 760
746#include <unistd.h> 761#include <unistd.h>
747#include <fcntl.h> 762#include <fcntl.h>
diff --git a/libopie/odevice.h b/libopie/odevice.h
index e50009c..86491d4 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -41,12 +41,13 @@ enum OModel {
41 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), 41 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ),
42 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), 42 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ),
43 43
44 Model_Zaurus = ( 2 << 24 ), 44 Model_Zaurus = ( 2 << 24 ),
45 45
46 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), 46 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ),
47 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ),
47}; 48};
48 49
49 enum OVendor { 50 enum OVendor {
50 Vendor_Unknown, 51 Vendor_Unknown,
51 52
52 Vendor_HP, 53 Vendor_HP,