mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
vz: give nice report if network device not found
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
3cea593f35
commit
2e4bed1b81
@ -3073,6 +3073,7 @@ prlsdkFindNetByMAC(PRL_HANDLE sdkdom, virMacAddrPtr mac)
|
||||
PRL_HANDLE adapter = PRL_INVALID_HANDLE;
|
||||
char adapterMac[PRL_MAC_STRING_BUFNAME];
|
||||
char expectedMac[PRL_MAC_STRING_BUFNAME];
|
||||
char virMac[VIR_MAC_STRING_BUFLEN];
|
||||
|
||||
prlsdkFormatMac(mac, expectedMac);
|
||||
|
||||
@ -3094,6 +3095,9 @@ prlsdkFindNetByMAC(PRL_HANDLE sdkdom, virMacAddrPtr mac)
|
||||
adapter = PRL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("No net with mac '%s'"), virMacAddrFormat(mac, virMac));
|
||||
|
||||
cleanup:
|
||||
PrlHandle_Free(adapter);
|
||||
return adapter;
|
||||
|
Loading…
Reference in New Issue
Block a user