summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-01-27 23:05:06 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-01-27 23:05:20 +0100
commit107e863644c853db9239eae62e3ad62758f0d724 (patch)
tree17e94f30b3a8b7690ab0e58b124df83de42cd3f3 /tdecore/tdehw
parent28a390d6e009560cc0515ca47f3d6f112c7983ba (diff)
downloadtdelibs-107e863644c853db9239eae62e3ad62758f0d724.tar.gz
tdelibs-107e863644c853db9239eae62e3ad62758f0d724.zip
Classify flash drives as HDD in tdehwlib
This relates to Bug 2473 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 6a2a9de49cc8987d0f43bc1076db81771fe2f50e)
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 1ad200c68..89d9232ee 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1040,16 +1040,19 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
if ((disktypestring.upper() == "COMPACT_FLASH")
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH_CF")) == "1")) {
disktype = disktype | TDEDiskDeviceType::CompactFlash;
+ disktype = disktype | TDEDiskDeviceType::HDD;
}
if ((disktypestring.upper() == "MEMORY_STICK")
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH_MS")) == "1")) {
disktype = disktype | TDEDiskDeviceType::MemoryStick;
+ disktype = disktype | TDEDiskDeviceType::HDD;
}
if ((disktypestring.upper() == "SMART_MEDIA")
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH_SM")) == "1")) {
disktype = disktype | TDEDiskDeviceType::SmartMedia;
+ disktype = disktype | TDEDiskDeviceType::HDD;
}
if ((disktypestring.upper() == "SD_MMC")
@@ -1057,11 +1060,13 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH_SDHC")) == "1")
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH_MMC")) == "1")) {
disktype = disktype | TDEDiskDeviceType::SDMMC;
+ disktype = disktype | TDEDiskDeviceType::HDD;
}
if ((disktypestring.upper() == "FLASHKEY")
- || (TQString(udev_device_get_property_value(dev, " ID_DRIVE_FLASH")) == "1")) {
+ || (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLASH")) == "1")) {
disktype = disktype | TDEDiskDeviceType::Flash;
+ disktype = disktype | TDEDiskDeviceType::HDD;
}
if (disktypestring.upper() == "OPTICAL") {