mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Add an error code for conflicting mac addresses
* include/libvirt/virterror.h src/virterror.c: if a driver's virInterfaceLookupByMACString() function finds more than one interface with the desired MAC Address, this new error is raised.
This commit is contained in:
parent
b2fd033cd5
commit
6eeca586d4
@ -163,6 +163,7 @@ typedef enum {
|
||||
VIR_WAR_NO_INTERFACE, /* failed to start interface driver */
|
||||
VIR_ERR_NO_INTERFACE, /* interface driver not running */
|
||||
VIR_ERR_INVALID_INTERFACE, /* invalid interface object */
|
||||
VIR_ERR_MULTIPLE_INTERFACES, /* more than one matching interface found */
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
|
@ -1056,6 +1056,12 @@ virErrorMsg(virErrorNumber error, const char *info)
|
||||
else
|
||||
errmsg = _("invalid interface pointer in %s");
|
||||
break;
|
||||
case VIR_ERR_MULTIPLE_INTERFACES:
|
||||
if (info == NULL)
|
||||
errmsg = _("multiple matching interfaces found");
|
||||
else
|
||||
errmsg = _("multiple matching interfaces found: %s");
|
||||
break;
|
||||
}
|
||||
return (errmsg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user