lkml.org 
[lkml]   [2002]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Cleware Linux Info
Hi,

i assume you try to search for a particular HID device by its serial
number.

> 1. The struct hiddev_devinfo lacks the serial number. In the usb
> structure, the
> index of the string is available, but not the number itself.

I don't think it's the right way to scan through all devices and query for
the serial number (even if it were available). This would be a very
expensive operation on systems with devfs as modprobe would be called on
each try to open an unavailable device (I know some ALSA utils
occasionally do the same, but it's still a bad thing).

IMHO, the right way would be to scan /proc/bus/usb/devices for the device
with the desired serial number and then open the corresponding
hiddev device.

However, it looks like the information about the corresponding
hiddev device is not included in /proc/bus/usb/devices (at least on
2.4.19). Is there a way to get the device name without scanning through
all hiddev devices and scan for the USB dev num instead (would be as bad
as scanning for the serial number in the first place).

--jochen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.067 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site