diff options
| author | Emanoil Kotsev <deloptes@gmail.com> | 2025-04-08 22:05:46 +0000 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-09 09:37:56 +0900 |
| commit | 7f262311af64d2a517f56e88acf82fc4ae263977 (patch) | |
| tree | 168970c966b5439302c2c4c98d3a4a80612f8992 | |
| parent | 98213ace5a4082a8c9fa53b782caae4ad8dee260 (diff) | |
| download | tdelibs-7f262311.tar.gz tdelibs-7f262311.zip | |
Print message about unclassified device only once
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
(cherry picked from commit 4a404fd1f411ca80c4c3b5054590bf072854b1ae)
| -rw-r--r-- | tdecore/tdehw/tdehardwaredevices.cpp | 8 | ||||
| -rw-r--r-- | tdecore/tdehw/tdehardwaredevices.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp index 59db6d0ae..91cc91cf7 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; |
