summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-07-25 19:10:28 +0200
committerSlávek Banko <[email protected]>2013-07-25 19:10:28 +0200
commitc039fefba9c761a1d7648ce038ed885e98b9e6b2 (patch)
tree0fe395c52815864c2c30a992ecc33ee9af9766da
parent8debd5d94c54a30d92f9e3dd6d75142c88d2f0f3 (diff)
downloadtdelibs-c039fefba9c761a1d7648ce038ed885e98b9e6b2.tar.gz
tdelibs-c039fefba9c761a1d7648ce038ed885e98b9e6b2.zip
Add hardware clasification rules for virtio devices
-rw-r--r--tdecore/tdehardwaredevices.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index f7f90664d..69e7856cb 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -3821,6 +3821,17 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
// This might pick up thermal sensors
if (!device) device = new TDESensorDevice(TDEGenericDeviceType::OtherSensor);
}
+ else if (devicesubsystem == "virtio") {
+ if (devicedriver == "virtio_blk") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::SCSI);
+ }
+ if (devicedriver == "virtio_net") {
+ if (!device) device = new TDENetworkDevice(TDEGenericDeviceType::Network);
+ }
+ if (devicedriver == "virtio_balloon") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM);
+ }
+ }
}
// Try to at least generally classify unclassified devices