Skip to content
Snippets Groups Projects
Commit 09112bef authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé
Browse files

hw/core: Restrict hotplug to system emulation


Restrict hotplug to system emulation, add stubs for the other uses.

Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarYanan Wang <wangyanan55@huawei.com>
Acked-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Message-Id: <20211028150521.1973821-5-philmd@redhat.com>
parent 81c7b381
No related branches found
No related tags found
No related merge requests found
/*
* 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();
}
# core qdev-related obj files, also used by *-user and unit tests
hwcore_ss.add(files(
'bus.c',
'hotplug.c',
'qdev-properties.c',
'qdev.c',
'reset.c',
......@@ -11,8 +10,17 @@ hwcore_ss.add(files(
'irq.c',
'clock.c',
'qdev-clock.c',
'qdev-hotplug.c',
))
if have_system
hwcore_ss.add(files(
'hotplug.c',
'qdev-hotplug.c',
))
else
hwcore_ss.add(files(
'hotplug-stubs.c',
))
endif
common_ss.add(files('cpu-common.c'))
softmmu_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment