author | mickeyl <mickeyl> | 2005-05-13 09:15:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-13 09:15:37 (UTC) |
commit | b010c50f099d197c0a89755eeef4dc1e40559a83 (patch) (side-by-side diff) | |
tree | 8225bcb4ec5c12a16183382a6dc350490831f97b | |
parent | 6d8b3f413347126d49fec3283dba42db9fc2c858 (diff) | |
download | opie-b010c50f099d197c0a89755eeef4dc1e40559a83.zip opie-b010c50f099d197c0a89755eeef4dc1e40559a83.tar.gz opie-b010c50f099d197c0a89755eeef4dc1e40559a83.tar.bz2 |
/proc/cpuinfo format is architecture dependent :/
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp index b463e43..7e8aee8 100644 --- a/noncore/settings/sysinfo/devicesinfo.cpp +++ b/noncore/settings/sysinfo/devicesinfo.cpp @@ -95,129 +95,129 @@ DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) view = new DevicesView( this ); layout->addWidget( view, 100 ); stack = new QWidgetStack( this ); layout->addWidget( stack, 70 ); } DevicesInfo::~DevicesInfo() { } void DevicesInfo::setDetailsWidget( QWidget* w ) { if ( details ) { qDebug( "hiding widget '%s' ('%s')", details->name(), details->className() ); stack->removeWidget( w ); } stack->addWidget( details = w, 40 ); stack->raiseWidget( details ); } //================================================================================================= Category::Category( DevicesView* parent, const QString& name ) :OListViewItem( parent, name ) { odebug << "Category '" << name << "' inserted. Scanning for devices..." << oendl; } Category::~Category() { } //================================================================================================= CpuCategory::CpuCategory( DevicesView* parent ) :Category( parent, "1. Central Processing Unit" ) { } CpuCategory::~CpuCategory() { } void CpuCategory::populate() { odebug << "CpuCategory::populate()" << oendl; QFile cpuinfofile( "/proc/cpuinfo" ); if ( !cpuinfofile.exists() || !cpuinfofile.open( IO_ReadOnly ) ) { new CpuDevice( this, "ERROR: /proc/cpuinfo not found or unaccessible" ); return; } QTextStream cpuinfo( &cpuinfofile ); int cpucount = 0; CpuDevice* dev = 0; while ( !cpuinfo.atEnd() ) { QString line = cpuinfo.readLine(); odebug << "got line '" << line << "'" << oendl; - if ( line.startsWith( "processor" ) ) + if ( line.lower().startsWith( "processor" ) ) { dev = new CpuDevice( this, QString( "CPU #%1" ).arg( cpucount++ ) ); dev->addInfo( line ); } else { if ( dev ) dev->addInfo( line ); } } } //================================================================================================= InputCategory::InputCategory( DevicesView* parent ) :Category( parent, "2. Input Subsystem" ) { } InputCategory::~InputCategory() { } void InputCategory::populate() { odebug << "InputCategory::populate()" << oendl; OInputSystem* sys = OInputSystem::instance(); OInputSystem::DeviceIterator it = sys->iterator(); while ( it.current() ) { OInputDevice* dev = it.current(); new InputDevice( this, dev->identity() ); ++it; } } //================================================================================================= CardsCategory::CardsCategory( DevicesView* parent ) :Category( parent, "3. Removable Cards" ) { } CardsCategory::~CardsCategory() { } void CardsCategory::populate() { odebug << "CardsCategory::populate()" << oendl; QString fileName; if ( QFile::exists( "/var/run/stab" ) ) { fileName = "/var/run/stab"; } else if ( QFile::exists( "/var/state/pcmcia/stab" ) ) { fileName = "/var/state/pcmcia/stab"; } else { fileName = "/var/lib/pcmcia/stab"; } QFile cardinfofile( fileName ); if ( !cardinfofile.exists() || !cardinfofile.open( IO_ReadOnly ) ) { new CardDevice( this, "ERROR: pcmcia info file not found or unaccessible" ); return; } QTextStream cardinfo( &cardinfofile ); while ( !cardinfo.atEnd() ) { QString line = cardinfo.readLine(); odebug << "got line '" << line << "'" << oendl; if ( line.startsWith( "Socket" ) ) { |