aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-12-08 13:35:07 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-12-11 21:32:47 +0000
commit2e55e84282c545aeab8f5c9dd52a8073deaf3dbc (patch)
tree7fdff0cb2027337a402dfb2f1687840c552a8e76 /vl.c
parentde1f34cb6351c028ebcc61fea9fa78008ca1a529 (diff)
downloadqemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.zip
qemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.tar.gz
qemu-2e55e84282c545aeab8f5c9dd52a8073deaf3dbc.tar.bz2
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>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index dadc161..844d6a5 100644
--- a/vl.c
+++ b/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: