qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/4] qdev: Export qdev_get_device_class()


From: Peter Xu
Subject: [PATCH 3/4] qdev: Export qdev_get_device_class()
Date: Wed, 18 Aug 2021 15:43:16 -0400

It'll be used outside the current source file.

Signed-off-by: Peter Xu <peterx@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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]