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 <pet...@redhat.com> --- include/qemu-common.h | 1 + vl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index d218821..0e6bb3b 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -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); diff --git a/vl.c b/vl.c index 0b4ed52..b97b32a 100644 --- a/vl.c +++ b/vl.c @@ -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; -- 2.7.4