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 | 76e30d0f13a8eb1f4dee86273b50b17b81dad9f4 (patch) | |
tree | 283ca815fad48064469d10374648d0696cef1ea7 /vl.c | |
parent | ef3adf68f802da54b2096da8aa3ce97bde54be2e (diff) |
Move boot_set callback backend
Move registration function for the boot_set callback handler and provide
qemu_boot_set so that it can also be used outside the monitor code.
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 | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -274,6 +274,9 @@ static QEMUTimer *nographic_timer; uint8_t qemu_uuid[16]; +static QEMUBootSetHandler *boot_set_handler; +static void *boot_set_opaque; + /***********************************************************/ /* x86 ISA bus support */ @@ -2356,6 +2359,20 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque) return drives_table_idx; } +void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque) +{ + boot_set_handler = func; + boot_set_opaque = opaque; +} + +int qemu_boot_set(const char *boot_devices) +{ + if (!boot_set_handler) { + return -EINVAL; + } + return boot_set_handler(boot_set_opaque, boot_devices); +} + static int parse_bootdevices(char *devices) { /* We just do some generic consistency checks */ |