It'll be used outside the current source file. Signed-off-by: Peter Xu <pet...@redhat.com> --- include/monitor/qdev.h | 2 ++ softmmu/qdev-monitor.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/monitor/qdev.h b/include/monitor/qdev.h index eaa947d73a..a783ad35b9 100644 --- a/include/monitor/qdev.h +++ b/include/monitor/qdev.h @@ -2,12 +2,14 @@ #define MONITOR_QDEV_H /*** monitor commands ***/ +#include "hw/qdev-core.h" void hmp_info_qtree(Monitor *mon, const QDict *qdict); void hmp_info_qdm(Monitor *mon, const QDict *qdict); void qmp_device_add(QDict *qdict, QObject **ret_data, Error **errp); int qdev_device_help(QemuOpts *opts); +DeviceClass *qdev_get_device_class(const char **driver, Error **errp); DeviceState *qdev_device_add(QemuOpts *opts, Error **errp); void qdev_set_id(DeviceState *dev, const char *id); diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 8602164082..610745467c 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -220,7 +220,7 @@ static const char *find_typename_by_alias(const char *alias) return NULL; } -static DeviceClass *qdev_get_device_class(const char **driver, Error **errp) +DeviceClass *qdev_get_device_class(const char **driver, Error **errp) { ObjectClass *oc; DeviceClass *dc; -- 2.31.1