mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Improve error reporting from qemuDomainManagedSaveRemove
Report an error if unlink of the managedsave file fails.
This commit is contained in:
parent
a02579141e
commit
ed0bfd04f8
@ -3337,8 +3337,15 @@ qemuDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags)
|
||||
if (!(name = qemuDomainManagedSavePath(driver, vm)))
|
||||
goto cleanup;
|
||||
|
||||
ret = unlink(name);
|
||||
if (unlink(name) < 0) {
|
||||
virReportSystemError(errno,
|
||||
_("Failed to remove managed save file '%s'"),
|
||||
name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
vm->hasManagedSave = false;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(name);
|
||||
|
Loading…
Reference in New Issue
Block a user