Allow bootdevice change from the monitor
(Gildas Le Nadan)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4333 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/monitor.c b/monitor.c
index fab3f71..236b827 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1019,6 +1019,21 @@
suffix, addr, size * 2, val);
}
+static void do_boot_set(const char *bootdevice)
+{
+ int res;
+
+ if (qemu_boot_set_handler) {
+ res = qemu_boot_set_handler(bootdevice);
+ if (res == 0)
+ term_printf("boot device list now set to %s\n", bootdevice);
+ else
+ term_printf("setting boot device list failed with error %i\n", res);
+ } else {
+ term_printf("no function defined to set boot device list for this architecture\n");
+ }
+}
+
static void do_system_reset(void)
{
qemu_system_reset_request();
@@ -1369,6 +1384,8 @@
"addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
{ "pmemsave", "lis", do_physical_memory_save,
"addr size file", "save to disk physical memory dump starting at 'addr' of size 'size'", },
+ { "boot_set", "s", do_boot_set,
+ "bootdevice", "define new values for the boot device list" },
#if defined(TARGET_I386)
{ "nmi", "i", do_inject_nmi,
"cpu", "inject an NMI on the given CPU", },