]> xenbits.xensource.com Git - libvirt.git/commit
Fix CDROM media change for QEMU when using -device syntax
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 15 Apr 2010 10:35:07 +0000 (11:35 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 15 Apr 2010 17:09:42 +0000 (18:09 +0100)
commitc4896d378b921ba6471562d7b17641be121c19d6
treee5e04bbb6388897eba9bf6c57d067edb69e0c978
parentdb336caa581fedbc729f4e177fa858968564db86
Fix CDROM media change for QEMU when using -device syntax

Disk devices in QEMU have two parts, the guest device and the host
backend driver. Historically these two parts have had the same
"unique" name. With the switch to using -device though, they now
have separate names. Thus when changing CDROM media, for guests
using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX
constant

* src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function
  qemuDeviceDriveHostAlias() for building a host backend alias
* src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine
  the host backend alias for performing eject/change commands in the
  monitor
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c