summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-02-04 21:11:36 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-02-04 21:11:36 +0100
commitff469a69ff7951e429b5ce48187906aac5ad89f9 (patch)
treee863e496b691b1187d963adca11e588dc802b6cb
parent613eadbbc35a25f19c205c32eeeb0b890d468aa6 (diff)
downloadtdelibs-ff469a69ff7951e429b5ce48187906aac5ad89f9.tar.gz
tdelibs-ff469a69ff7951e429b5ce48187906aac5ad89f9.zip
Fix mountable flag for disk partitions
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 4da8382ae..cf11d8b6b 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2758,7 +2758,11 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
}
// Partition tables cannot be mounted
- if (TQString(udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != "") {
+ if ((TQString(udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != "")
+ && ((TQString(udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")).isEmpty())
+ || (TQString(udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")) == "0x5")
+ || (TQString(udev_device_get_property_value(dev, "ID_PART_ENTRY_TYPE")) == "0xf")
+ || (TQString(udev_device_get_property_value(dev, "ID_FS_USAGE")).upper() == "RAID"))) {
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
}
// If certain disk types do not report the presence of a filesystem, they are likely not mountable