summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-19 14:25:12 (UTC)
committer mickeyl <mickeyl>2005-05-19 14:25:12 (UTC)
commit77134583c00446fc74515889514571924e7471ed (patch) (side-by-side diff)
tree86cec13092a360991c3759301c3ecd9f6633cd22
parent743204c7f71fe785a1876d95c5d880cfdff44592 (diff)
downloadopie-77134583c00446fc74515889514571924e7471ed.zip
opie-77134583c00446fc74515889514571924e7471ed.tar.gz
opie-77134583c00446fc74515889514571924e7471ed.tar.bz2
ignore empty sockets
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp
index a924696..34e4477 100644
--- a/libopie2/opiecore/linux/opcmciasystem.cpp
+++ b/libopie2/opiecore/linux/opcmciasystem.cpp
@@ -73,22 +73,23 @@ void OPcmciaSystem::synchronize()
{
qWarning( "pcmcia info file not found or unaccessible" );
return;
}
QTextStream cardinfo( &cardinfofile );
while ( !cardinfo.atEnd() )
{
QString line = cardinfo.readLine();
- if ( line.startsWith( "Socket" ) )
+ // qDebug( "line = '%s'", (const char*) line );
+ if ( line.startsWith( "Socket" ) && ! line.contains( "empty" ) )
{
int mid = line.find( ':' );
QString name = line.right( line.length() - mid - 1 );
QString id = line.right( line.length() - mid + 1 );
- if ( mid ) _interfaces.insert( name, new OPcmciaCard( this, (const char*) id ) );
+ if ( mid ) _interfaces.insert( name.stripWhiteSpace(), new OPcmciaCard( this, (const char*) id.stripWhiteSpace() ) );
}
else
{
continue;
}
}
}