aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-20 16:25:06 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-20 16:25:06 +0000
commit3b4366de399b384d715c631d32f024c2bde3a38a (patch)
tree7d06569d95945d6cea73503360fd30188677a5c5 /monitor.c
parent3f05d3dc14a76fb62a1eda5c53dde0074ce1d1e1 (diff)
downloadqemu-3b4366de399b384d715c631d32f024c2bde3a38a.zip
qemu-3b4366de399b384d715c631d32f024c2bde3a38a.tar.gz
qemu-3b4366de399b384d715c631d32f024c2bde3a38a.tar.bz2
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
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 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