[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/solid/solid/backends/hal
From:       Ambroz Bizjak <ambro () b4ever ! net>
Date:       2008-10-30 18:52:20
Message-ID: 1225392740.010573.15108.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 877945 by abizjak:

backport alternative fs drivers support from revision 877943


 M  +20 -3     halstorageaccess.cpp  


--- branches/KDE/4.1/kdelibs/solid/solid/backends/hal/halstorageaccess.cpp \
#877944:877945 @@ -233,9 +233,27 @@
     QDBusMessage msg = \
                QDBusMessage::createMethodCall("org.freedesktop.Hal", udi,
                                                       \
"org.freedesktop.Hal.Device.Volume",  "Mount");
-    QStringList options;
+
+    // HAL 0.5.12 supports using alternative drivers for the same \
filesystem. +    // This is mainly used to integrate the ntfs-3g driver.
+    // Unfortunately, the primary driver gets used unless we
+    // specify some other driver (fstype) to the Mount method.
+    // TODO: Allow the user to choose the driver.
+
+    QString fstype = m_device->property("volume.fstype").toString();
     QStringList halOptions = \
m_device->property("volume.mount.valid_options").toStringList();  
+    QString alternativePreferred = \
m_device->property("volume.fstype.alternative.preferred").toString(); +    \
if (!alternativePreferred.isEmpty()) { +        QStringList \
alternativeFstypes = \
m_device->property("volume.fstype.alternative").toStringList(); +        if \
(alternativeFstypes.contains(alternativePreferred)) { +            fstype = \
alternativePreferred; +            halOptions = \
m_device->property("volume.mount."+fstype+".valid_options").toStringList(); \
+        } +    }
+
+    QStringList options;
+
 #ifdef Q_OS_FREEBSD
     QString uid="-u=";
 #else
@@ -245,7 +263,6 @@
         options << uid+QString::number(::getuid());
     }
 
-    QString fstype=m_device->property("volume.fstype").toString();
 #ifdef Q_OS_FREEBSD
     char *cType;
     if ( fstype=="vfat" && halOptions.contains("-L=")) {
@@ -275,7 +292,7 @@
 #endif
 
 
-    msg << "" << "" << options;
+    msg << "" << fstype << options;
 
     return c.callWithCallback(msg, this,
                               SLOT(slotDBusReply(const QDBusMessage &)),


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic