mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: hotplug: consolidate media change code paths
Use qemuDomainAttachDeviceDiskLive to change the media in qemuDomainChangeDiskLive as the former function already does all the necessary steps to prepare the new medium. This also allows us to turn qemuDomainChangeEjectableMedia static. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -120,7 +120,7 @@ testQemuHotplugAttach(virDomainObjPtr vm,
|
||||
/* conn in only used for storage pool and secrets lookup so as long
|
||||
* as we don't use any of them, passing NULL should be safe
|
||||
*/
|
||||
ret = qemuDomainAttachDeviceDiskLive(&driver, vm, dev);
|
||||
ret = qemuDomainAttachDeviceDiskLive(&driver, vm, dev, false);
|
||||
break;
|
||||
case VIR_DOMAIN_DEVICE_CHR:
|
||||
ret = qemuDomainAttachChrDevice(&driver, vm, dev->data.chr);
|
||||
|
||||
Reference in New Issue
Block a user