提交 0b317d61 编写于 作者: P Peter Krempa

qemu: managedsave: Don't spam logs with warnings about corrupted image

Even successful start of a VM from a managed save image would spam the
logs with the following message:

Unable to restore from managed state [path]. Maybe the file is
corrupted?

Re-arrange the logic to output the warning only when the image is
corrupted.

The flaw was introduced in commit cfc28c66.
上级 92dc2dab
...@@ -6080,14 +6080,14 @@ qemuDomainObjStart(virConnectPtr conn, ...@@ -6080,14 +6080,14 @@ qemuDomainObjStart(virConnectPtr conn,
VIR_WARN("Failed to remove the managed state %s", managed_save); VIR_WARN("Failed to remove the managed state %s", managed_save);
else else
vm->hasManagedSave = false; vm->hasManagedSave = false;
}
if (ret > 0) { goto cleanup;
VIR_WARN("Ignoring incomplete managed state %s", managed_save); } else if (ret < 0) {
} else {
VIR_WARN("Unable to restore from managed state %s. " VIR_WARN("Unable to restore from managed state %s. "
"Maybe the file is corrupted?", managed_save); "Maybe the file is corrupted?", managed_save);
goto cleanup; goto cleanup;
} else {
VIR_WARN("Ignoring incomplete managed state %s", managed_save);
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册