[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/48] monitor/usb: register 'info usbhost' dynamically
From: |
Paolo Bonzini |
Subject: |
[PULL 36/48] monitor/usb: register 'info usbhost' dynamically |
Date: |
Thu, 8 Jul 2021 17:17:36 +0200 |
From: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <20210624103836.2382472-33-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hmp-commands-info.hx | 1 -
hw/usb/host-libusb.c | 1 +
hw/usb/host-stub.c | 40 ----------------------------------------
hw/usb/meson.build | 4 +---
4 files changed, 2 insertions(+), 44 deletions(-)
delete mode 100644 hw/usb/host-stub.c
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index fb59c27200..ce42aef47a 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -368,7 +368,6 @@ ERST
.args_type = "",
.params = "",
.help = "show host USB devices",
- .cmd = hmp_info_usbhost,
},
SRST
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index e6d21aa8e1..2b7f87872c 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1781,6 +1781,7 @@ static TypeInfo usb_host_dev_info = {
static void usb_host_register_types(void)
{
type_register_static(&usb_host_dev_info);
+ monitor_register_hmp("usbhost", true, hmp_info_usbhost);
}
type_init(usb_host_register_types)
diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c
deleted file mode 100644
index bbe69baa39..0000000000
--- a/hw/usb/host-stub.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Stub host USB redirector
- *
- * Copyright (c) 2005 Fabrice Bellard
- *
- * Copyright (c) 2008 Max Krasnyansky
- * Support for host device auto connect & disconnect
- * Major rewrite to support fully async operation
- *
- * Copyright 2008 TJ <linux@tjworld.net>
- * Added flexible support for /dev/bus/usb /sys/bus/usb/devices in
addition
- * to the legacy /proc/bus/usb USB device discovery and handling
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "qemu/osdep.h"
-#include "hw/usb.h"
-#include "monitor/monitor.h"
-
-void hmp_info_usbhost(Monitor *mon, const QDict *qdict)
-{
- monitor_printf(mon, "USB host devices not supported\n");
-}
diff --git a/hw/usb/meson.build b/hw/usb/meson.build
index 4f24b5274d..817f3e027a 100644
--- a/hw/usb/meson.build
+++ b/hw/usb/meson.build
@@ -73,9 +73,7 @@ endif
# usb pass-through
softmmu_ss.add(when: ['CONFIG_USB', libusb],
- if_true: files('host-libusb.c'),
- if_false: files('host-stub.c'))
-softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c'))
+ if_true: files('host-libusb.c'))
softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true:
files('xen-usb.c'))
--
2.31.1
- [PULL 28/48] modules: hook up modules.h to docs build, (continued)
- [PULL 28/48] modules: hook up modules.h to docs build, Paolo Bonzini, 2021/07/08
- [PULL 30/48] accel: add qtest module annotations, Paolo Bonzini, 2021/07/08
- [PULL 32/48] accel: add tcg module annotations, Paolo Bonzini, 2021/07/08
- [PULL 35/48] usb: drop usb_host_dev_is_scsi_storage hook, Paolo Bonzini, 2021/07/08
- [PULL 37/48] usb: build usb-host as module, Paolo Bonzini, 2021/07/08
- [PULL 34/48] monitor: allow register hmp commands, Paolo Bonzini, 2021/07/08
- [PULL 33/48] accel: build tcg modular, Paolo Bonzini, 2021/07/08
- [PULL 26/48] modules: add module_obj() note to QOM docs, Paolo Bonzini, 2021/07/08
- [PULL 39/48] target/i386: Added MSRPM and IOPM size check, Paolo Bonzini, 2021/07/08
- [PULL 40/48] target/i386: Added DR6 and DR7 consistency checks, Paolo Bonzini, 2021/07/08
- [PULL 36/48] monitor/usb: register 'info usbhost' dynamically,
Paolo Bonzini <=
- [PULL 38/48] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically, Paolo Bonzini, 2021/07/08
- [PULL 45/48] hw/arm: add dependency on OR_IRQ for XLNX_VERSAL, Paolo Bonzini, 2021/07/08
- [PULL 48/48] configure: allow the selection of alternate config in the build, Paolo Bonzini, 2021/07/08
- [PULL 31/48] accel: build qtest modular, Paolo Bonzini, 2021/07/08
- [PULL 41/48] target/i386: fix exceptions for MOV to DR, Paolo Bonzini, 2021/07/08
- [PULL 43/48] meson: switch function tests from compilation to linking, Paolo Bonzini, 2021/07/08
- [PULL 44/48] meson: Introduce target-specific Kconfig, Paolo Bonzini, 2021/07/08
- [PULL 47/48] configs: rename default-configs to configs and reorganise, Paolo Bonzini, 2021/07/08