- int ret = cbfs_copyfile(file, (void*)RomEnd, max_rom() - RomEnd);
- if (ret > 0)
- init_optionrom((void*)RomEnd, 0, isvga);
- }
-}
-
-static void
-run_qemu_roms(const char *prefix, int isvga)
-{
- struct QemuCfgFile entry;
- int plen = strlen(prefix);
- int rc, dlen;
-
- rc = qemu_cfg_first_file(&entry);
- while (rc > 0) {
- if (memcmp(prefix, entry.name, plen) == 0) {
- dlen = qemu_cfg_read_file(&entry, (void*)RomEnd, max_rom() - RomEnd);
- if (dlen > 0) {
- dprintf(1, "init qemu rom: %s\n", entry.name);
- init_optionrom((void*)RomEnd, 0, isvga);
- }
+ struct rom_header *rom = (void*)RomEnd;
+ int ret = romfile_copy(file, rom, max_rom() - RomEnd);
+ if (ret > 0) {
+ setRomSource(sources, rom, file);
+ init_optionrom(rom, 0, isvga);