mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
Add bootindex for option roms.
Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
de1f34cb63
commit
2e55e84282
12 changed files with 60 additions and 24 deletions
11
vl.c
11
vl.c
|
@ -218,7 +218,7 @@ int cursor_hide = 1;
|
|||
int graphic_rotate = 0;
|
||||
uint8_t irq0override = 1;
|
||||
const char *watchdog;
|
||||
const char *option_rom[MAX_OPTION_ROMS];
|
||||
QEMUOptionRom option_rom[MAX_OPTION_ROMS];
|
||||
int nb_option_roms;
|
||||
int semihosting_enabled = 0;
|
||||
int old_param = 0;
|
||||
|
@ -2520,7 +2520,14 @@ int main(int argc, char **argv, char **envp)
|
|||
fprintf(stderr, "Too many option ROMs\n");
|
||||
exit(1);
|
||||
}
|
||||
option_rom[nb_option_roms] = optarg;
|
||||
opts = qemu_opts_parse(qemu_find_opts("option-rom"), optarg, 1);
|
||||
option_rom[nb_option_roms].name = qemu_opt_get(opts, "romfile");
|
||||
option_rom[nb_option_roms].bootindex =
|
||||
qemu_opt_get_number(opts, "bootindex", -1);
|
||||
if (!option_rom[nb_option_roms].name) {
|
||||
fprintf(stderr, "Option ROM file is not specified\n");
|
||||
exit(1);
|
||||
}
|
||||
nb_option_roms++;
|
||||
break;
|
||||
case QEMU_OPTION_semihosting:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue