From 3b4366de399b384d715c631d32f024c2bde3a38a Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Fri, 20 Jun 2008 16:25:06 +0000 Subject: Add an opaque parameter to boot_set API, move function to monitor.c git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4763 c046a42c-6fe2-441c-8c8c-71466251a162 --- monitor.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 9f1013e..8154898 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 -- cgit v1.1