summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-09-30 15:28:34 +0000
committerThierry Vignaud <tv@mandriva.org>2009-09-30 15:28:34 +0000
commitb1b284b79e64ad655138e5fb86b193ffddc59d1b (patch)
treedb15b611f88e565a4b1bd943767e11c8c2bfe46b
parent3d081a98c2ecbff8f755fe8beffee1ff0e1217a6 (diff)
downloadldetect-b1b284b79e64ad655138e5fb86b193ffddc59d1b.tar
ldetect-b1b284b79e64ad655138e5fb86b193ffddc59d1b.tar.gz
ldetect-b1b284b79e64ad655138e5fb86b193ffddc59d1b.tar.bz2
ldetect-b1b284b79e64ad655138e5fb86b193ffddc59d1b.tar.xz
ldetect-b1b284b79e64ad655138e5fb86b193ffddc59d1b.zip
split out CONFIG_SPACE_ZIZE (needed for next commits)
-rw-r--r--pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pci.c b/pci.c
index 168191e..921be58 100644
--- a/pci.c
+++ b/pci.c
@@ -11,6 +11,8 @@
#include <dirent.h>
#include "common.h"
+#define CONFIG_SPACE_ZIZE 64
+
static char *proc_pci_path_default = "/proc/bus/pci/devices";
char* proc_pci_path = NULL;
@@ -81,7 +83,7 @@ extern struct pciusb_entries pci_probe(void) {
if (!found)
continue;
}
- read(devf, &buf, 0x30); /* these files're 256 bytes but we only need first 48 bytes*/
+ read(devf, &buf, CONFIG_SPACE_ZIZE); /* these files're 256 bytes but we only need first 48 bytes*/
e->class_id = dev->device_class;
/* we divide by 2 because we address the array as a word array since we read a word */
e->subvendor = bufi[PCI_SUBSYSTEM_VENDOR_ID/2]; // == (u16)!(buf[PCI_SUBSYSTEM_VENDOR_ID] | (buf[PCI_SUBSYSTEM_VENDOR_ID+1] << 8))