[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/KDE/4.10] solid/solid/backends/udisks2: don't return invalid CryptoBackingDevice
From: Lukáš Tinkl <lukas () kde ! org>
Date: 2012-11-01 21:34:34
Message-ID: 20121101213434.7D235A6078 () git ! kde ! org
[Download RAW message or body]
Git commit 92a1d01b7f36e0711d9b9f75de228c5cd5cdeacb by Lukáš Tinkl.
Committed on 01/11/2012 at 22:32.
Pushed by lukas into branch 'KDE/4.10'.
don't return invalid CryptoBackingDevice
that is before the cleartext slave is mounted; fixes encrypted storage
not being displayed in the Device Notifier
M +8 -4 solid/solid/backends/udisks2/udisksdevice.cpp
http://commits.kde.org/kdelibs/92a1d01b7f36e0711d9b9f75de228c5cd5cdeacb
diff --git a/solid/solid/backends/udisks2/udisksdevice.cpp \
b/solid/solid/backends/udisks2/udisksdevice.cpp index a3f780f..270128b 100644
--- a/solid/solid/backends/udisks2/udisksdevice.cpp
+++ b/solid/solid/backends/udisks2/udisksdevice.cpp
@@ -644,9 +644,13 @@ QString Device::parentUdi() const
{
QString parent;
- if (isEncryptedContainer())
- parent = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
- else if (propertyExists("Drive")) // block
+ if (isEncryptedContainer()) {
+ QString path = prop("CryptoBackingDevice").value<QDBusObjectPath>().path();
+ if (!path.isEmpty() && path != "/")
+ parent = path;
+ }
+
+ if (propertyExists("Drive")) // block
parent = prop("Drive").value<QDBusObjectPath>().path();
else if (propertyExists("Table")) // partition
parent = prop("Table").value<QDBusObjectPath>().path();
@@ -669,7 +673,7 @@ void Device::checkCache(const QString &key) const
if (reply.isValid()) {
m_cache.insert(key, reply);
} else {
- qWarning() << "got invalid reply for cache:" << key;
+ qDebug() << "got invalid reply for cache:" << key;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic