tcpdump mailing list archives

libpcap USB support: udevinfo not available


From: Peter Volkov <pva () gentoo org>
Date: Tue, 11 May 2010 12:01:54 +0400

Hello.

I'm looking for suggestion on how to fix following configure test in
libpcap:

ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`

It is broken at least in two aspects:

1. udevinfo command does not exits with recent udevd any more and afaiu
'udevadm info --query name --path /sys/class/usb_device/usbmon'
should be used instead.
2. I have linux 2.6.33 and I have usbmon loaded (devices /dev/usbmon0
were created). At the same time /sys/class/usb_device/usbmon does not
exist on my system (even /sys/class/usb_device does not exist). Do you
have ideas what could case this. BTW, failed to google any references to
"/sys/class/usb_device/usbmon" at all...

Although it's rather trivial to fix udevinfo call I think this check
should not exist at all. It is quite common to build package on one
system and deploy on another,thus it is always bad idea to check system
capabilities during build. I guess simple solution would be to use
usbmon as default name and provide means (probably with environment
variable) to set different name, if required. Do we really need to set
some different device name (not usbmonN)? How it's better to fix this
issue?


With best regards,
-- 
Peter.


-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: