diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-13 13:41:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-13 13:41:11 +0000 |
commit | a25e48640b4d11cdb4d83cb878af082a00df59b9 (patch) | |
tree | 30efb75a523539baee9d0df3af92549f3c45f2a6 /usb.c | |
parent | 30b8e72afa22a7ff5a72370e4dc0cfbe0a329ada (diff) | |
download | ldetect-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); } |