Closed onimatrix81 closed 9 years ago
It's going into stderr.
lsusb 2>/dev/null
Hi @onimatrix81,
I just pushed a fix (77436df916b1af045b8d7aa7b956694e185bb731) to make it so libudev-compat applications will only print debugging output if the LIBUDEV_COMPAT_DEBUG
environment variable is set.
Example:
$ lsusb
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
With debugging:
$ LIBUDEV_COMPAT_DEBUG=1 lsusb
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-0:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1980ba0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-0:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1'
05549: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x19855f0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0'
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Hope this helps!
Was going to suggest doing just that and forgot to do so. Thx, it was a bit annoying to null stderr sometimes :)
This issues status should be "fixed" I think.
Fixed :D
What is this extra debug-sort of information that libudev-compat prints out when running, say lsusb. 09523: [libudev-device.c:0851] udev_device_new_from_syspath: device 0x1437f30 has devpath '/devices/pci0000:00/0000:00:1a.0/usb1/1-1'
There's a lot of those line in standard output before the actual output of lsusb. Not that I really care but it's not very good for programs that expect certain output =).