summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain Ainsworth <zerooa@googlemail.com>2009-04-18 06:38:46 +0200
committerMatthieu Herrb <matthieu.herrb@laas.fr>2009-04-18 06:38:46 +0200
commita7f8e58d44716a01f4a8dc9826996a0fa78e4196 (patch)
tree631781cee14b3756dd1d7332322d51fe0c002a63
parentbe748a7b512bf5597e162694a3b1769132938fe1 (diff)
openbsd_pci.c: use the correct size when mapping the legacy vga rom.
fixes errors (and probably bugs) on intel hardware (at the least). Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
-rw-r--r--src/openbsd_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
index b83c35c..e954144 100644
--- a/src/openbsd_pci.c
+++ b/src/openbsd_pci.c
@@ -135,8 +135,8 @@ pci_device_openbsd_read_rom(struct pci_device *device, void *buffer)
if (bios == MAP_FAILED)
return errno;
- memcpy(buffer, bios, device->rom_size);
- munmap(bios, device->rom_size);
+ memcpy(buffer, bios, rom_size);
+ munmap(bios, rom_size);
if (pci_rom) {
/* Restore PCI config space */