From 76b1ece23346ca02fcdb87756b71ddd0f6f570c1 Mon Sep 17 00:00:00 2001 From: oga Date: Fri, 17 Apr 2009 09:03:14 +0000 Subject: [PATCH] Use the correct size when mapping the legacy vga rom. fixes errors (and probably bugs) on intel hardware (at the least). ok matthieu@ --- lib/libpciaccess/src/openbsd_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libpciaccess/src/openbsd_pci.c b/lib/libpciaccess/src/openbsd_pci.c index b83c35c3f..e9541443e 100644 --- a/lib/libpciaccess/src/openbsd_pci.c +++ b/lib/libpciaccess/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 */