From a358a3af4558a24398a541951cad7a6c458df72b Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 19 May 2017 08:35:16 +0200 Subject: usb: Deprecate the legacy -usbdevice option The '-usbdevice' option is considered as deprecated nowadays and we might want to remove these options in a future version of QEMU. So mark this options as deprecated in the documenation and print out a warning if it is used to tell the user what to use instead. While we're at it, improve also some other minor USB-related spots in qemu-options.hx that were not up to date anymore. Signed-off-by: Thomas Huth Reviewed-by: Paolo Bonzini Message-id: 1495175716-12735-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 3465121..88d24d6 100644 --- a/vl.c +++ b/vl.c @@ -3759,6 +3759,8 @@ int main(int argc, char **argv, char **envp) 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); -- cgit v1.1 From b813bed1ab064e0198f68a9e745da3caaf9c8e47 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 19 May 2017 08:36:43 +0200 Subject: usb: Deprecate HMP commands usb_add and usb_del The commands 'device_add' and 'device_del' should be used nowadays instead. Signed-off-by: Thomas Huth Reviewed-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Message-id: 1495175803-12830-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 88d24d6..92d1310 100644 --- a/vl.c +++ b/vl.c @@ -1436,6 +1436,9 @@ static int usb_parse(const char *cmdline) void hmp_usb_add(Monitor *mon, const QDict *qdict) { const char *devname = qdict_get_str(qdict, "devname"); + + error_report("usb_add is deprecated, please use device_add instead"); + if (usb_device_add(devname) < 0) { error_report("could not add USB device '%s'", devname); } @@ -1444,6 +1447,9 @@ void hmp_usb_add(Monitor *mon, const QDict *qdict) void hmp_usb_del(Monitor *mon, const QDict *qdict) { const char *devname = qdict_get_str(qdict, "devname"); + + error_report("usb_del is deprecated, please use device_del instead"); + if (usb_device_del(devname) < 0) { error_report("could not delete USB device '%s'", devname); } -- cgit v1.1