summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-01 23:42:48 (UTC)
committer alwin <alwin>2005-03-01 23:42:48 (UTC)
commit374cb9f45664c307ab7d0ed88fea5e76631518d9 (patch) (side-by-side diff)
tree97d63c360117877ff26aca8fc6c61ebc14c528b5
parentbb6be9cbe75892a7cc1d7c234f1c48023f9c9592 (diff)
downloadopie-374cb9f45664c307ab7d0ed88fea5e76631518d9.zip
opie-374cb9f45664c307ab7d0ed88fea5e76631518d9.tar.gz
opie-374cb9f45664c307ab7d0ed88fea5e76631518d9.tar.bz2
mmc/sd cards may mounted via /dev/mmcblk* within linux 2.6
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/ostorageinfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiecore/ostorageinfo.cpp b/libopie2/opiecore/ostorageinfo.cpp
index 8fcf5fc..6c7c138 100644
--- a/libopie2/opiecore/ostorageinfo.cpp
+++ b/libopie2/opiecore/ostorageinfo.cpp
@@ -31,57 +31,58 @@
using namespace Opie::Core;
OStorageInfo::OStorageInfo( QObject *parent )
: StorageInfo( parent )
{
}
OStorageInfo::~OStorageInfo()
{
}
QString OStorageInfo::cfPath()const
{
QString r = "";
for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
{
if ( (*i)->disk().left( 8 ) == "/dev/hda" )
{
r = (*i)->path();
break;
}
}
return r;
}
QString OStorageInfo::sdPath()const
{
QString r = "";
for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
{
if ( (*i)->disk().left( 9 ) == "/dev/mmcd" )
{
r = (*i)->path();
break;
}
}
return r;
}
QString OStorageInfo::mmcPath()const
{
QString r = "";
for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
{
- if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1" )
+ if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1"||
+ (*i)->disk().left(11) == "/dev/mmcblk" )
{
r = (*i)->path();
break;
}
}
return r;
}