diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-07-02 00:19:02 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-16 08:28:12 -0500 |
commit | 9538749118d47dfcd3ed45804736027d87ec054e (patch) | |
tree | 2655047bd51c44497b55e6f8a01a2d2a3bc855a8 /vl.c | |
parent | e0f084bfc941109047055e229d70695af11a0541 (diff) |
Add boot menu control via command line switch
Disable the lengthy BIOS prompt for selecting a boot device by default,
but let the user reenable it via '-boot menu=on'.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -254,6 +254,7 @@ const char *prom_envs[MAX_PROM_ENVS]; #endif int nb_drives_opt; struct drive_opt drives_opt[MAX_DRIVES]; +int boot_menu; int nb_numa_nodes; uint64_t node_mem[MAX_NODES]; @@ -5121,7 +5122,7 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_boot: { static const char * const params[] = { - "order", "once", NULL + "order", "once", "menu", NULL }; char buf[sizeof(boot_devices)]; char *standard_boot_devices; @@ -5151,6 +5152,19 @@ int main(int argc, char **argv, char **envp) qemu_register_reset(restore_boot_devices, standard_boot_devices); } + if (get_param_value(buf, sizeof(buf), + "menu", optarg)) { + if (!strcmp(buf, "on")) { + boot_menu = 1; + } else if (!strcmp(buf, "off")) { + boot_menu = 0; + } else { + fprintf(stderr, + "qemu: invalid option value '%s'\n", + buf); + exit(1); + } + } } } break; |