Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1942367
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_conf.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7044701fac..e21b9fb946 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15781,38 +15781,45 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net)
if (matchidx < 0) {
if (MACAddrSpecified && PCIAddrSpecified) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found on "
+ _("no device matching MAC address %s and alias %s found
on "
VIR_PCI_DEVICE_ADDRESS_FMT),
virMacAddrFormat(&net->mac, mac),
+ NULLSTR(net->info.alias),
net->info.addr.pci.domain,
net->info.addr.pci.bus,
net->info.addr.pci.slot,
net->info.addr.pci.function);
} else if (MACAddrSpecified && CCWAddrSpecified) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found on "
+ _("no device matching MAC address %s and alias %s found
on "
VIR_CCW_DEVICE_ADDRESS_FMT),
virMacAddrFormat(&net->mac, mac),
+ NULLSTR(net->info.alias),
net->info.addr.ccw.cssid,
net->info.addr.ccw.ssid,
net->info.addr.ccw.devno);
} else if (PCIAddrSpecified) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device found on "
VIR_PCI_DEVICE_ADDRESS_FMT),
+ _("no device matching alias %s found on "
+ VIR_PCI_DEVICE_ADDRESS_FMT),
+ NULLSTR(net->info.alias),
net->info.addr.pci.domain,
net->info.addr.pci.bus,
net->info.addr.pci.slot,
net->info.addr.pci.function);
} else if (CCWAddrSpecified) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device found on "
VIR_CCW_DEVICE_ADDRESS_FMT),
+ _("no device matching alias %s found on "
+ VIR_CCW_DEVICE_ADDRESS_FMT),
+ NULLSTR(net->info.alias),
net->info.addr.ccw.cssid,
net->info.addr.ccw.ssid,
net->info.addr.ccw.devno);
} else if (MACAddrSpecified) {
virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found"),
- virMacAddrFormat(&net->mac, mac));
+ _("no device matching MAC address %s and alias %s
found"),
+ virMacAddrFormat(&net->mac, mac),
+ NULLSTR(net->info.alias));
} else {
virReportError(VIR_ERR_DEVICE_MISSING, "%s",
_("no matching device found"));
--
2.31.1