diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-27 07:13:50 +0000 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-27 07:13:50 +0000 |
commit | 4730b89323e190353f4f5629632da3bde10367e5 (patch) | |
tree | 009abb950faa9b7b66c8b63f9bbcd43fcdeb9416 /tdecore | |
parent | 26a59d1ea793b04d202c2c8e7fc845eac35b529c (diff) | |
download | tdelibs-4730b89323e190353f4f5629632da3bde10367e5.tar.gz tdelibs-4730b89323e190353f4f5629632da3bde10367e5.zip |
Do not label swap devices as mountable or containing a filesystem
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index 8cf86d721..1b7a2c8ac 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -4311,7 +4311,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD diskstatus = diskstatus | TDEDiskDeviceStatus::Hotpluggable; } - if ((filesystemtype.upper() != "CRYPTO_LUKS") && (filesystemtype.upper() != "CRYPTO") && (!filesystemtype.isNull())) { + if ((filesystemtype.upper() != "CRYPTO_LUKS") && (filesystemtype.upper() != "CRYPTO") && (filesystemtype.upper() != "SWAP") && (!filesystemtype.isNull())) { diskstatus = diskstatus | TDEDiskDeviceStatus::ContainsFilesystem; } @@ -4328,6 +4328,10 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable; } } + // Swap partitions cannot be mounted + if (filesystemtype.upper() == "SWAP") { + 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)) { |