summaryrefslogtreecommitdiffstats
path: root/usb.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-13 13:41:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-13 13:41:11 +0000
commita25e48640b4d11cdb4d83cb878af082a00df59b9 (patch)
tree30efb75a523539baee9d0df3af92549f3c45f2a6 /usb.c
parent30b8e72afa22a7ff5a72370e4dc0cfbe0a329ada (diff)
downloadldetect-a25e48640b4d11cdb4d83cb878af082a00df59b9.tar
ldetect-a25e48640b4d11cdb4d83cb878af082a00df59b9.tar.gz
ldetect-a25e48640b4d11cdb4d83cb878af082a00df59b9.tar.bz2
ldetect-a25e48640b4d11cdb4d83cb878af082a00df59b9.tar.xz
ldetect-a25e48640b4d11cdb4d83cb878af082a00df59b9.zip
use the sub-category for usb probing
Diffstat (limited to 'usb.c')
-rw-r--r--usb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usb.c b/usb.c
index d1fab02..84b54d5 100644
--- a/usb.c
+++ b/usb.c
@@ -30,10 +30,9 @@ extern struct pciusb_entries usb_probe(void) {
pciusb_initialize(e);
}
} else if (e && buf[0] == 'I' && e->class == 0) {
- int class, prot = 0;
- if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%*02x Prot=%02x", &class, &prot) == 2) {
- /* we fake a class based on class and proto, subclass unneeded? */
- e->class = class * 0x100 + prot;
+ int class, sub, prot = 0;
+ if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class, &sub, &prot) == 3) {
+ e->class = (class * 0x100 + sub) * 0x100 + prot;
} else {
fprintf(stderr, "%s %d: unknown ``I'' line\n", file, line);
}