[libvirt] [PATCH] qemu: hotplug: fix changeable media ejection
Bjoern Walk
bwalk at linux.vnet.ibm.com
Fri Jul 15 06:43:50 UTC 2016
Bjoern Walk <bwalk at linux.vnet.ibm.com> [2016-07-08, 12:34PM +0200]:
>Since return code is checked globally at the end of the function, let's
>make sure that we set it correctly at any point.
>
>This fixes a regression introduced in commit 0aa19f35 where the first
>command to eject changeable media would fail unconditionally.
>
>Signed-off-by: Bjoern Walk <bwalk at linux.vnet.ibm.com>
>Reviewed-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
>---
> src/qemu/qemu_hotplug.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>index c322543..789f18c 100644
>--- a/src/qemu/qemu_hotplug.c
>+++ b/src/qemu/qemu_hotplug.c
>@@ -240,7 +240,8 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
> /* If the tray is present and tray change event is supported wait for it to open. */
> if (diskPriv->tray &&
> virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_TRAY_MOVED)) {
>- if (qemuHotplugWaitForTrayEject(driver, vm, disk, driveAlias, force) < 0)
>+ rc = qemuHotplugWaitForTrayEject(driver, vm, disk, driveAlias, force);
>+ if (rc < 0)
> goto error;
> } else {
> /* otherwise report possible errors from the attempt to eject the media*/
>--
>2.6.6
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
>
Ping.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 896 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160715/59f77224/attachment-0001.sig>
More information about the libvir-list
mailing list