summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/storage.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/library/storage.cpp b/library/storage.cpp
index 35e0255..937908d 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -83,9 +83,9 @@ const FileSystem *StorageInfo::fileSystemOf( const QString &filename )
void StorageInfo::cardMessage( const QCString& msg, const QByteArray& )
{
if ( msg == "mtabChanged()" )
- update();
+ update();
}
// cause of the lack of a d pointer we need
// to store informations in a config file :(
void StorageInfo::update()
@@ -103,10 +103,11 @@ void StorageInfo::update()
if ( mntfp ) {
while ( (me = getmntent( mntfp )) != 0 ) {
QString fs = me->mnt_fsname;
if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd"
- || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd"
- || fs.left(5)=="tmpfs" )
+ || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd"
+ || fs.left( 14 ) == "/dev/mmc/part1"
+ || fs.left(5)=="tmpfs" )
{
n++;
curdisks.append(fs);
curopts.append( me->mnt_opts );
@@ -131,10 +132,10 @@ void StorageInfo::update()
QStringList::ConstIterator fsit=curfs.begin();
QStringList::ConstIterator optsIt=curopts.begin();
for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) {
QString opts = *optsIt;
-
- QString disk = *it;
+
+ QString disk = *it;
QString humanname;
bool removable = FALSE;
if ( isCF(disk) ) {
humanname = tr("CF Card");
@@ -143,8 +144,11 @@ void StorageInfo::update()
humanname = tr("Hard Disk");
} else if ( disk.left(9) == "/dev/mmcd" ) {
humanname = tr("SD Card");
removable = TRUE;
+ } else if ( disk.left( 14 ) == "/dev/mmc/part1" ) {
+ humanname = tr("MMC Card");
+ removable = TRUE;
} else if ( disk.left(7) == "/dev/hd" )
humanname = tr("Hard Disk") + " " + disk;
else if ( disk.left(7) == "/dev/sd" )
humanname = tr("SCSI Hard Disk") + " " + disk;