summaryrefslogtreecommitdiffstats
path: root/pciusb.c
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-26 13:49:06 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-26 13:49:06 +0000
commit5e8e8d8cf3084be0218b34dc10049222bf2a42dd (patch)
treed0ebf772aee80a7bbcad815b1744f2015cdc7811 /pciusb.c
parentb8c364035dfd4d9265259f3d8a8a7edfe0442b8a (diff)
downloadldetect-5e8e8d8cf3084be0218b34dc10049222bf2a42dd.tar
ldetect-5e8e8d8cf3084be0218b34dc10049222bf2a42dd.tar.gz
ldetect-5e8e8d8cf3084be0218b34dc10049222bf2a42dd.tar.bz2
ldetect-5e8e8d8cf3084be0218b34dc10049222bf2a42dd.tar.xz
ldetect-5e8e8d8cf3084be0218b34dc10049222bf2a42dd.zip
(pciusb_find_modules) add "descr_lookup" parameter to enable/disable description lookup
Diffstat (limited to 'pciusb.c')
-rw-r--r--pciusb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pciusb.c b/pciusb.c
index 949aeee..c47a229 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -9,7 +9,7 @@
#include <string.h>
#include "common.h"
-extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciusbtable) {
+extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciusbtable, const descr_lookup descr_lookup) {
fh f;
char buf[2048];
int line;
@@ -51,7 +51,7 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
e->module = strndup(p,q-p-1);
}
/* special case for buggy 0x0 usb entry */
- if (2 < strlen(q+2) && vendor != 0 && device != 0 && e->class_ != 0x90000d) { /* Hub class */
+ if (descr_lookup == LOAD && 2 < strlen(q+2) && vendor != 0 && device != 0 && e->class_ != 0x90000d) { /* Hub class */
ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/
e->text = strndup(q+2, strlen(q)-4);
}