mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
esx: Report error in esxVI_LookupVirtualMachineByName
When reviewing 00d9edfe2f39f60b40 I've changed proposed patch and made it to not report error if no domain is found. This is wrong and the original patch was okay. Thing is, both callers pass occurrence = OptionalItem so no error message overwriting is done as I thought initially. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7bdd06b4e1
commit
5feb9f9420
@ -3014,8 +3014,11 @@ esxVI_LookupVirtualMachineByName(esxVI_Context *ctx, const char *name,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem)
|
||||
if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem) {
|
||||
virReportError(VIR_ERR_NO_DOMAIN,
|
||||
_("Could not find domain with name '%s'"), name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user