openbsd_pci.c: use the correct size when mapping the legacy vga rom.
authorOwain Ainsworth <zerooa@googlemail.com>
Sat, 18 Apr 2009 04:38:46 +0000 (06:38 +0200)
committerMatthieu Herrb <matthieu.herrb@laas.fr>
Sat, 18 Apr 2009 04:38:46 +0000 (06:38 +0200)
fixes errors (and probably bugs) on intel hardware (at the least).

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
src/openbsd_pci.c

index b83c35c..e954144 100644 (file)
@@ -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 */