summaryrefslogtreecommitdiff
path: root/src/bios_reader
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-03-16 19:41:54 -0700
committerEric Anholt <eric@anholt.net>2007-03-16 19:41:54 -0700
commit9d6d9ace4bd3180a4484321c3b96a83bc4adaf84 (patch)
tree3985aecab7fcf383463993a52ab865d87da8556c /src/bios_reader
parenta117bc9e3eb824f2056ee6416859ea3ab1fdcc30 (diff)
Move vendor ID check in the utils to after pci_device_probe.
Even current libpciaccess seems to require this.
Diffstat (limited to 'src/bios_reader')
-rw-r--r--src/bios_reader/bios_dumper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bios_reader/bios_dumper.c b/src/bios_reader/bios_dumper.c
index 071419bc..c0dbdcf8 100644
--- a/src/bios_reader/bios_dumper.c
+++ b/src/bios_reader/bios_dumper.c
@@ -60,15 +60,15 @@ int main(int argc, char **argv)
if (dev == NULL)
errx(1, "Couldn't find graphics card");
- if (dev->vendor_id != 0x8086)
- errx(1, "Graphics card is non-intel");
-
err = pci_device_probe(dev);
if (err != 0) {
fprintf(stderr, "Couldn't probe graphics card: %s\n", strerror(err));
exit(1);
}
+ if (dev->vendor_id != 0x8086)
+ errx(1, "Graphics card is non-intel");
+
bios = malloc(dev->rom_size);
if (bios == NULL)
errx(1, "Couldn't allocate memory for BIOS data\n");