On Fri, Aug 23, 2013 at 12:38:11PM +0200, Fred A. Kemp wrote: > From: "Fred A. Kemp" <anonym@xxxxxxxxxx> > > Add an attribute named 'removable' to the 'target' element of disks, > which controls the removable flag. For instance, on a Linux guest it > controls the value of /sys/block/$dev/removable. This option is only > valid for USB disks (i.e. bus='usb'), and its default value is 'off', > which is the same behaviour as before. > > To achieve this, 'removable=on' (or 'off') is appended to the '-device > usb-storage' parameter sent to qemu when adding a USB disk via > '-disk'. A capability flag QEMU_CAPS_USB_STORAGE_REMOVABLE was added > to keep track if this option is supported by the qemu version used. > > Bug: https://bugzilla.redhat.com/show_bug.cgi?id=922495 > --- > docs/formatdomain.html.in | 8 +++-- > docs/schemas/domaincommon.rng | 8 +++++ > src/conf/domain_conf.c | 31 ++++++++++++++++++-- > src/conf/domain_conf.h | 1 + > src/qemu/qemu_capabilities.c | 8 +++++ > src/qemu/qemu_capabilities.h | 1 + > src/qemu/qemu_command.c | 17 +++++++++++ > tests/qemuhelpdata/qemu-1.2.0-device | 11 +++++++ > tests/qemuhelpdata/qemu-kvm-1.2.0-device | 11 +++++++ > tests/qemuhelptest.c | 6 ++-- > .../qemuxml2argv-disk-usb-device-removable.args | 8 +++++ > .../qemuxml2argv-disk-usb-device-removable.xml | 27 +++++++++++++++++ > tests/qemuxml2argvtest.c | 3 ++ > 13 files changed, 133 insertions(+), 7 deletions(-) > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device-removable.args > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device-removable.xml ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list