summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-03-24 01:55:08 -0500
committerTimothy Pearson <[email protected]>2013-03-24 01:55:08 -0500
commit7d6a98f9b3e39a3966ae3d2fdccb00277b4896d1 (patch)
tree911f7c243e027b30dfc6e91bafed30b62927324c
parentc4c38ddf0fa6918eaa6232dd337652775f6157f7 (diff)
downloadtdelibs-7d6a98f9b3e39a3966ae3d2fdccb00277b4896d1.tar.gz
tdelibs-7d6a98f9b3e39a3966ae3d2fdccb00277b4896d1.zip
Update hardware classification rules with new devices
-rw-r--r--tdecore/tdehardwaredevices.cpp35
1 files changed, 30 insertions, 5 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 60f3efde9..418326bf0 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -3068,7 +3068,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_
TQStringList hardware_info_directories(TDEGlobal::dirs()->resourceDirs("data"));
TQString hardware_info_directory_suffix("tdehwlib/deviceclasses/");
TQString hardware_info_directory;
-
+
// Scan the hardware_info_directory for configuration files
// For each one, open it with TDEConfig() and apply its rules to classify the device
// FIXME
@@ -3078,19 +3078,19 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDeviceByExternalRules(udev_
for ( TQStringList::Iterator it = hardware_info_directories.begin(); it != hardware_info_directories.end(); ++it ) {
hardware_info_directory = (*it);
hardware_info_directory += hardware_info_directory_suffix;
-
+
if (TDEGlobal::dirs()->exists(hardware_info_directory)) {
TQDir d(hardware_info_directory);
d.setFilter( TQDir::Files | TQDir::Hidden );
-
+
const TQFileInfoList *list = d.entryInfoList();
TQFileInfoListIterator it( *list );
TQFileInfo *fi;
-
+
while ((fi = it.current()) != 0) {
if (fi->extension(false) == "hwclass") {
bool match = true;
-
+
// Open the rules file
TDEConfig rulesFile(fi->absFilePath(), true, false);
rulesFile.setGroup("Conditions");
@@ -3476,6 +3476,13 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (devicesubsystem == "scsi_device")
|| (devicesubsystem == "scsi_generic")
|| (devicesubsystem == "scsi")
+ || (devicetypestring_alt == "sas_target")
+ || (devicesubsystem == "sas_host")
+ || (devicesubsystem == "sas_port")
+ || (devicesubsystem == "sas_device")
+ || (devicesubsystem == "sas_generic")
+ || (devicesubsystem == "sas_phy")
+ || (devicesubsystem == "sas_end_device")
|| (devicesubsystem == "spi_transport")
|| (devicesubsystem == "spi_host")
|| (devicesubsystem == "ata_port")
@@ -3485,6 +3492,21 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (devicesubsystem == "ata")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
+ if (devicesubsystem == "infiniband") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Peripheral);
+ }
+ if ((devicesubsystem == "infiniband_cm")
+ || (devicesubsystem == "infiniband_mad")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
+ }
+ if ((devicesubsystem == "enclosure")
+ || (devicesubsystem == "clocksource")
+ || (devicesubsystem == "amba")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
+ }
+ if (devicesubsystem == "ipmi_si") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Mainboard);
+ }
if (devicesubsystem == "misc") {
if (devicedriver.startsWith("tpm_")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Cryptography);
@@ -3571,6 +3593,9 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (devicesubsystem == "rfkill") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
+ if (devicesubsystem == "machinecheck") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
+ }
if (devicesubsystem == "pnp") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::PNP);
}