Fix mountable flag for disk partitions

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ff469a69ff)
pull/16/head
Slávek Banko 9 years ago
parent 97e220ed39
commit 6958076530

@ -2704,7 +2704,11 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable; diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
} }
// Partition tables cannot be mounted // 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; diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
} }
// If certain disk types do not report the presence of a filesystem, they are likely not mountable // If certain disk types do not report the presence of a filesystem, they are likely not mountable

Loading…
Cancel
Save