mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: hotplug: Report error if we hit tray status timeout
If we exceed the timeout waiting for the tray status to change, we don't report an error. Fix it
This commit is contained in:
parent
84120af628
commit
1fad65d49a
@ -224,7 +224,13 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
||||
goto error;
|
||||
|
||||
while (disk->tray_status != VIR_DOMAIN_DISK_TRAY_OPEN) {
|
||||
if (virDomainObjWaitUntil(vm, now + CHANGE_MEDIA_TIMEOUT) != 0)
|
||||
int wait_rc = virDomainObjWaitUntil(vm, now + CHANGE_MEDIA_TIMEOUT);
|
||||
if (wait_rc > 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("timed out waiting for "
|
||||
"disk tray status update"));
|
||||
}
|
||||
if (wait_rc != 0)
|
||||
goto error;
|
||||
}
|
||||
} while (rc < 0);
|
||||
|
Loading…
Reference in New Issue
Block a user