aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/bus-stub.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-04-08 17:53:22 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-04-18 11:17:27 +0200
commit89857312f3245e589b161eb535261bae7b7fcce2 (patch)
tree25abcd2e268c4eb5c1c78f848b70b7aa26e274c8 /hw/usb/bus-stub.c
parentd4d0ebb7da0489a2fff8c7150a38fa897ca3eea5 (diff)
downloadqemu-89857312f3245e589b161eb535261bae7b7fcce2.zip
qemu-89857312f3245e589b161eb535261bae7b7fcce2.tar.gz
qemu-89857312f3245e589b161eb535261bae7b7fcce2.tar.bz2
hw/usb: move stubs out of stubs/
Since the USB stubs are needed exactly when the Kconfig symbols are not enabled, they can be placed in hw/usb/ and conditionalized on CONFIG_USB. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240408155330.522792-11-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/usb/bus-stub.c')
-rw-r--r--hw/usb/bus-stub.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/hw/usb/bus-stub.c b/hw/usb/bus-stub.c
new file mode 100644
index 0000000..fcabe84
--- /dev/null
+++ b/hw/usb/bus-stub.c
@@ -0,0 +1,28 @@
+/*
+ * QEMU USB device emulation stubs
+ *
+ * Copyright (C) 2021 Philippe Mathieu-Daudé <f4bug@amsat.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "qapi/error.h"
+#include "qapi/qapi-commands-machine.h"
+#include "sysemu/sysemu.h"
+#include "monitor/monitor.h"
+#include "hw/usb.h"
+
+USBDevice *usbdevice_create(const char *driver)
+{
+ error_report("Support for USB devices not built-in");
+
+ return NULL;
+}
+
+HumanReadableText *qmp_x_query_usb(Error **errp)
+{
+ error_setg(errp, "Support for USB devices not built-in");
+ return NULL;
+}