@@ -125,6 +125,7 @@ const char *qemu_get_vm_name(void);
#define QEMU_FILE_TYPE_BIOS 0
#define QEMU_FILE_TYPE_KEYMAP 1
char *qemu_find_file(int type, const char *name);
+int device_init_func(void *opaque, QemuOpts *opts, Error **errp);
/* OS specific functions */
void os_setup_early_signal_handling(void);
@@ -2297,7 +2297,7 @@ static int device_help_func(void *opaque, QemuOpts *opts, Error **errp)
return qdev_device_help(opts);
}
-static int device_init_func(void *opaque, QemuOpts *opts, Error **errp)
+int device_init_func(void *opaque, QemuOpts *opts, Error **errp)
{
Error *err = NULL;
DeviceState *dev;
This general routine is used to create most of the "-device" objects. Export it so that other modules can use it as well. Signed-off-by: Peter Xu <peterx@redhat.com> --- include/qemu-common.h | 1 + vl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)