Do not flag disk devices/partitions as mountable if a partition table is present under the given device/partition

This relates to Bug 2232
pull/16/head
Timothy Pearson 10 years ago
parent e0b1bfb014
commit 08d4e3062c

@ -2631,6 +2631,10 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
if (filesystemtype.upper() == "SWAP") {
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
}
// Partition tables cannot be mounted
if (TQString(udev_device_get_property_value(dev, "ID_PART_TABLE_TYPE")) != "") {
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
}
// If certain disk types do not report the presence of a filesystem, they are likely not mountable
if ((disktype & TDEDiskDeviceType::HDD) || (disktype & TDEDiskDeviceType::Optical)) {
if (!(diskstatus & TDEDiskDeviceStatus::ContainsFilesystem)) {

Loading…
Cancel
Save