diff options
-rw-r--r-- | libldetect-private.h | 3 | ||||
-rw-r--r-- | pci.c | 2 | ||||
-rw-r--r-- | usb.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/libldetect-private.h b/libldetect-private.h index 400b846..9addd46 100644 --- a/libldetect-private.h +++ b/libldetect-private.h @@ -1,2 +1,5 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciusbtable, int no_subid); extern void pciusb_initialize(struct pciusb_entry *e); + +#define MAX_DEVICES 100 +#define BUF_SIZE 512 @@ -12,7 +12,7 @@ extern struct pciusb_entries pci_probe(int probe_type) { char buf[512]; unsigned short devbusfn; unsigned int id; - struct pciusb_entry t[100]; + struct pciusb_entry t[MAX_DEVICES]; struct pciusb_entries r; if (!(f = fopen("/proc/bus/pci/devices", "r"))) exit(1); @@ -11,7 +11,7 @@ extern struct pciusb_entries usb_probe(void) { char buf[512]; int line; const char *file = "/proc/bus/usb/devices"; - struct pciusb_entry t[100]; + struct pciusb_entry t[MAX_DEVICES]; struct pciusb_entries r; struct pciusb_entry *e = NULL; |