This was replaced by the '-device usb-DEV' option. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- 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)) { -- 2.29.2