summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanoil Kotsev <deloptes@gmail.com>2025-04-08 22:05:46 +0000
committerEmanoil Kotsev <deloptes@gmail.com>2025-04-08 22:05:46 +0000
commit4a404fd1f411ca80c4c3b5054590bf072854b1ae (patch)
tree4a9f7efb069efbfc683b6df31868ec5ee554b1ea
parent032d7c4e4c3d74adb687e3c27a6afe22cefde972 (diff)
downloadtdelibs-4a404fd1f411ca80c4c3b5054590bf072854b1ae.tar.gz
tdelibs-4a404fd1f411ca80c4c3b5054590bf072854b1ae.zip
Print message about unclassified device only once
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp8
-rw-r--r--tdecore/tdehw/tdehardwaredevices.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index a9e9be9da..2471c8341 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -136,6 +136,7 @@ TDEHardwareDevices::TDEHardwareDevices() {
usb_id_map = 0;
pnp_id_map = 0;
dpy_id_map = 0;
+ m_unclassifiedDevices = TQStringList();
// Set up device list
m_deviceList.setAutoDelete( true ); // the list owns the objects
@@ -2419,7 +2420,12 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (device == 0) {
// Unhandled
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Other);
- printf("[FIXME] UNCLASSIFIED DEVICE name: %s type: %s subsystem: %s driver: %s [Node Path: %s] [Syspath: %s] [%s:%s]\n", devicename.ascii(), devicetype.ascii(), devicesubsystem.ascii(), devicedriver.ascii(), devicenode.ascii(), udev_device_get_syspath(dev), devicevendorid.ascii(), devicemodelid.ascii()); fflush(stdout);
+ if (!m_unclassifiedDevices.contains(devicename))
+ {
+ m_unclassifiedDevices.append(devicename);
+ printf("[FIXME] UNCLASSIFIED DEVICE name: %s type: %s subsystem: %s driver: %s [Node Path: %s] [Syspath: %s] [%s:%s]\n",
+ devicename.ascii(), devicetype.ascii(), devicesubsystem.ascii(), devicedriver.ascii(), devicenode.ascii(), udev_device_get_syspath(dev), devicevendorid.ascii(), devicemodelid.ascii()); fflush(stdout);
+ }
}
// Root devices are special
diff --git a/tdecore/tdehw/tdehardwaredevices.h b/tdecore/tdehw/tdehardwaredevices.h
index 4e4259dfc..ad3f30c71 100644
--- a/tdecore/tdehw/tdehardwaredevices.h
+++ b/tdecore/tdehw/tdehardwaredevices.h
@@ -306,6 +306,7 @@ class TDECORE_EXPORT TDEHardwareDevices : public TQObject
TDEDeviceIDMap* dpy_id_map;
TDECPUDeviceCache m_cpuByPathCache;
+ TQStringList m_unclassifiedDevices;
friend class TDEGenericDevice;
friend class TDEStorageDevice;