Markus Armbruster 31376776d0 usb-storage: Fix how legacy init handles option ID clash
usb_msd_init() calls qemu_opts_create() with a made-up ID and false
fail_if_exists.  If the ID already exists, it happily messes up those
options, then fails drive_new(), because the BlockDriverState with
that ID already exists, too.

Reproducer: -drive if=none,id=usb0,format=raw -usbdevice disk:tmp.qcow2

Pass true fail_if_exists to qemu_opts_create(), and if it fails, try
the next made-up ID.

The reproducer now succeeds, and creates an usb-storage device with ID
usb1.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-09-22 09:55:55 +02:00
..
2014-08-29 12:51:44 +02:00
2014-06-02 16:29:00 +02:00
2014-06-02 16:29:00 +02:00
2014-04-22 12:40:57 +02:00
2014-08-15 18:54:06 +04:00
2014-08-15 18:54:06 +04:00
2014-02-20 15:25:05 +00:00
2013-08-30 20:14:39 +02:00
2014-08-29 12:52:13 +02:00
2013-02-19 12:30:05 +01:00
2013-06-20 16:39:52 +02:00