summaryrefslogtreecommitdiffstats
path: root/hw/core/hotplug-stubs.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-10-28 16:57:35 +0200
committerPhilippe Mathieu-Daudé2021-11-01 19:44:11 +0100
commit09112bef740853c9afd5318ecd0e93394648a3a6 (patch)
treebd564ad914495b2bb123da411e58542b02763a3c /hw/core/hotplug-stubs.c
parenthw/core: Extract hotplug-related functions to qdev-hotplug.c (diff)
downloadqemu-09112bef740853c9afd5318ecd0e93394648a3a6.tar.gz
qemu-09112bef740853c9afd5318ecd0e93394648a3a6.tar.xz
qemu-09112bef740853c9afd5318ecd0e93394648a3a6.zip
hw/core: Restrict hotplug to system emulation
Restrict hotplug to system emulation, add stubs for the other uses. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Yanan Wang <wangyanan55@huawei.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20211028150521.1973821-5-philmd@redhat.com>
Diffstat (limited to 'hw/core/hotplug-stubs.c')
-rw-r--r--hw/core/hotplug-stubs.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/hw/core/hotplug-stubs.c b/hw/core/hotplug-stubs.c
new file mode 100644
index 0000000000..7aadaa29bd
--- /dev/null
+++ b/hw/core/hotplug-stubs.c
@@ -0,0 +1,34 @@
+/*
+ * Hotplug handler stubs
+ *
+ * Copyright (c) Red Hat
+ *
+ * Authors:
+ * Philippe Mathieu-Daudé <philmd@redhat.com>,
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "qemu/osdep.h"
+#include "hw/qdev-core.h"
+
+HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev)
+{
+ return NULL;
+}
+
+void hotplug_handler_pre_plug(HotplugHandler *plug_handler,
+ DeviceState *plugged_dev,
+ Error **errp)
+{
+ g_assert_not_reached();
+}
+
+void hotplug_handler_plug(HotplugHandler *plug_handler,
+ DeviceState *plugged_dev,
+ Error **errp)
+{
+ g_assert_not_reached();
+}