diff mbox

[for-2.10,2/5] util: export device_init_func()

Message ID 1490945793-21276-3-git-send-email-peterx@redhat.com
State New
Headers show

Commit Message

Peter Xu March 31, 2017, 7:36 a.m. UTC
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(-)
diff mbox

Patch

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;