diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-02-04 21:11:36 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-02-04 21:11:46 +0100 |
commit | 695807653073af9476185c769e4cc2d4fdb37804 (patch) | |
tree | 974b53c9505d6dbc1a398dfb13bdd11680fa8bc6 /tdecore/tdehw | |
parent | 97e220ed3976363d47712193d18c401dec4c9f36 (diff) | |
download | tdelibs-695807653073af9476185c769e4cc2d4fdb37804.tar.gz tdelibs-695807653073af9476185c769e4cc2d4fdb37804.zip |
Fix mountable flag for disk partitions
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ff469a69ff7951e429b5ce48187906aac5ad89f9)
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r-- | tdecore/tdehw/tdehardwaredevices.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp index 8e794b4b5..fc8b58fa2 100644 --- a/tdecore/tdehw/tdehardwaredevices.cpp +++ b/tdecore/tdehw/tdehardwaredevices.cpp @@ -2704,7 +2704,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 |