diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-09-30 15:28:34 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-09-30 15:28:34 +0000 |
commit | b1b284b79e64ad655138e5fb86b193ffddc59d1b (patch) | |
tree | db15b611f88e565a4b1bd943767e11c8c2bfe46b | |
parent | 3d081a98c2ecbff8f755fe8beffee1ff0e1217a6 (diff) | |
download | ldetect-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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)) |