Markus Armbruster c24e7517ee scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial
scsi_bus_legacy_add_drive() creates either a scsi-disk or a
scsi-generic device.  It sets property "serial" to argument serial
unless null.  Crashes with scsi-generic, because it doesn't have such
the property.

Only usb_msd_initfn_storage() passes non-null serial.  Reproducer:

    $ qemu-system-x86_64 -nodefaults -display none -S -usb \
    -drive if=none,file=/dev/sg1,id=usb-drv0 \
    -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123
    qemu-system-x86_64: -device usb-storage,id=usb-msd0,drive=usb-drv0,serial=123: Property '.serial' not found
    Aborted (core dumped)

Fix by handling exactly like "removable": set the property only when
it exists.

Cc: qemu-stable@nongnu.org
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-09-12 08:46:21 +02:00
2013-08-30 15:48:43 +02:00
2013-04-18 13:50:53 +02:00
2013-07-09 13:38:56 -05:00
2013-07-30 23:11:07 +01:00
2013-08-07 12:48:00 -05:00
2013-07-26 22:01:31 +02:00
2013-09-03 12:33:32 -05:00
2013-07-30 23:11:07 +01:00
2013-09-03 12:25:55 +02:00
2013-09-03 12:25:55 +02:00
2013-09-03 12:25:55 +02:00
2013-09-06 15:25:10 +02:00
2013-05-03 13:58:09 +02:00
2012-09-07 09:02:44 +03:00
2013-07-18 08:17:42 -07:00
2013-09-05 09:40:31 -05:00
2013-09-03 12:25:55 +02:00
2013-09-06 15:25:08 +02:00
2013-09-06 15:25:08 +02:00
2013-09-11 14:46:52 -05:00
2013-09-02 09:08:29 -07:00
2013-09-03 12:25:55 +02:00
2013-09-03 12:25:55 +02:00
2013-09-03 12:25:55 +02:00
2013-09-03 12:25:55 +02:00
2013-07-23 02:41:31 +02:00
2013-07-15 09:49:00 +02:00
2013-02-21 16:17:31 -06:00
2013-09-03 12:25:55 +02:00
2013-08-12 09:15:12 -05:00
2013-06-14 15:33:10 +01:00
2013-09-03 12:25:55 +02:00
2013-09-01 19:03:43 +04:00
2013-09-03 12:33:32 -05:00
2013-09-06 15:25:08 +02:00
2013-05-18 16:35:12 +04:00
2013-09-06 15:25:09 +02:00
2013-09-06 15:25:08 +02:00
2013-07-19 12:52:03 +04:00
2013-05-01 13:06:07 +02:00
2013-09-02 09:08:29 -07:00
2013-09-10 11:14:08 +02:00
2013-09-03 12:25:55 +02:00
2013-08-15 15:41:13 -05:00
2013-08-27 14:21:16 +02:00
2013-04-08 18:13:10 +02:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
No description provided
Readme 518 MiB
Languages
C 83%
C++ 7.7%
Python 3%
Dylan 2.2%
Shell 1.8%
Other 2.1%