qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option


From: Paolo Bonzini
Subject: Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option
Date: Wed, 24 Feb 2021 14:25:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 24/02/21 14:11, Daniel P. Berrangé wrote:
This was replaced by the '-device usb-DEV' option.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

This is probably used in many tutorial as "-usbdevice tablet" (for example https://wiki.gentoo.org/wiki/QEMU/Options).

Paolo

---
  docs/system/deprecated.rst       |  9 -------
  docs/system/removed-features.rst |  9 +++++++
  softmmu/vl.c                     | 42 --------------------------------
  3 files changed, 9 insertions(+), 51 deletions(-)

diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 611adf60f7..c577cc97c4 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -21,15 +21,6 @@ deprecated.
  System emulator command line arguments
  --------------------------------------
-``-usbdevice`` (since 2.10.0)
-'''''''''''''''''''''''''''''
-
-The ``-usbdevice DEV`` argument is now a synonym for setting
-the ``-device usb-DEV`` argument instead. The deprecated syntax
-would automatically enable USB support on the machine type.
-If using the new syntax, USB support must be explicitly
-enabled via the ``-machine usb=on`` argument.
-
  ``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
  '''''''''''''''''''''''''''''''''''''''''''''''''''''''
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index dc63581fe5..74d022babf 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -50,6 +50,15 @@ by the ``tls-authz`` and ``sasl-authz`` options.
  The ``pretty=on|off`` switch has no effect for HMP monitors and
  its use is rejected.
+``-usbdevice`` (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+The ``-usbdevice DEV`` argument was now a synonym for setting
+the ``-device usb-DEV`` argument instead. The removed syntax
+would automatically enable USB support on the machine type.
+When using the new syntax, USB support must be explicitly
+enabled via the ``-machine usb=on`` argument.
+
  QEMU Machine Protocol (QMP) commands
  ------------------------------------
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b219ce1f35..c31061cc09 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -743,34 +743,6 @@ static void configure_msg(QemuOpts *opts)
  }
-/***********************************************************/
-/* USB devices */
-
-static int usb_device_add(const char *devname)
-{
-    USBDevice *dev = NULL;
-
-    if (!machine_usb(current_machine)) {
-        return -1;
-    }
-
-    dev = usbdevice_create(devname);
-    if (!dev)
-        return -1;
-
-    return 0;
-}
-
-static int usb_parse(const char *cmdline)
-{
-    int r;
-    r = usb_device_add(cmdline);
-    if (r < 0) {
-        error_report("could not add USB device '%s'", cmdline);
-    }
-    return r;
-}
-
  /***********************************************************/
  /* machine registration */
@@ -1267,7 +1239,6 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty) struct device_config {
      enum {
-        DEV_USB,       /* -usbdevice     */
          DEV_SERIAL,    /* -serial        */
          DEV_PARALLEL,  /* -parallel      */
          DEV_DEBUGCON,  /* -debugcon */
@@ -2484,12 +2455,6 @@ static void qemu_create_cli_devices(void)
      qemu_opts_foreach(qemu_find_opts("fw_cfg"),
                        parse_fw_cfg, fw_cfg_find(), &error_fatal);
- /* init USB devices */
-    if (machine_usb(current_machine)) {
-        if (foreach_device_config(DEV_USB, usb_parse) < 0)
-            exit(1);
-    }
-
      /* init generic devices */
      rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE);
      qemu_opts_foreach(qemu_find_opts("device"),
@@ -3182,13 +3147,6 @@ void qemu_init(int argc, char **argv, char **envp)
                  olist = qemu_find_opts("machine");
                  qemu_opts_parse_noisily(olist, "usb=on", false);
                  break;
-            case QEMU_OPTION_usbdevice:
-                error_report("'-usbdevice' is deprecated, please use "
-                             "'-device usb-...' instead");
-                olist = qemu_find_opts("machine");
-                qemu_opts_parse_noisily(olist, "usb=on", false);
-                add_device_config(DEV_USB, optarg);
-                break;
              case QEMU_OPTION_device:
                  if (!qemu_opts_parse_noisily(qemu_find_opts("device"),
                                               optarg, true)) {





reply via email to

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