mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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_WAR_NO_INTERFACE, /* failed to start interface driver */
|
||||||
VIR_ERR_NO_INTERFACE, /* interface driver not running */
|
VIR_ERR_NO_INTERFACE, /* interface driver not running */
|
||||||
VIR_ERR_INVALID_INTERFACE, /* invalid interface object */
|
VIR_ERR_INVALID_INTERFACE, /* invalid interface object */
|
||||||
|
VIR_ERR_MULTIPLE_INTERFACES, /* more than one matching interface found */
|
||||||
} virErrorNumber;
|
} virErrorNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1056,6 +1056,12 @@ virErrorMsg(virErrorNumber error, const char *info)
|
|||||||
else
|
else
|
||||||
errmsg = _("invalid interface pointer in %s");
|
errmsg = _("invalid interface pointer in %s");
|
||||||
break;
|
break;
|
||||||
|
case VIR_ERR_MULTIPLE_INTERFACES:
|
||||||
|
if (info == NULL)
|
||||||
|
errmsg = _("multiple matching interfaces found");
|
||||||
|
else
|
||||||
|
errmsg = _("multiple matching interfaces found: %s");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return (errmsg);
|
return (errmsg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user