Use the correct size when mapping the legacy vga rom.

fixes errors (and probably bugs) on intel hardware (at the least).

ok matthieu@
This commit is contained in:
oga 2009-04-17 09:03:14 +00:00
parent 706b7bf86f
commit 76b1ece233

View 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 */