aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 9f1013ecfd..8154898673 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1044,12 +1044,22 @@ static void do_ioport_read(int count, int format, int size, int addr, int has_in
suffix, addr, size * 2, val);
}
+/* boot_set handler */
+static QEMUBootSetHandler *qemu_boot_set_handler = NULL;
+static void *boot_opaque;
+
+void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque)
+{
+ qemu_boot_set_handler = func;
+ boot_opaque = opaque;
+}
+
static void do_boot_set(const char *bootdevice)
{
int res;
if (qemu_boot_set_handler) {
- res = qemu_boot_set_handler(bootdevice);
+ res = qemu_boot_set_handler(boot_opaque, bootdevice);
if (res == 0)
term_printf("boot device list now set to %s\n", bootdevice);
else