This code is used if a driver's virInterfaceLookupByMACString() function finds more than one interface with the desired MAC Address. --- include/libvirt/virterror.h | 1 + src/virterror.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 1092896..f587fbf 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -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; /** diff --git a/src/virterror.c b/src/virterror.c index d284fb8..7d0f2e9 100644 --- a/src/virterror.c +++ b/src/virterror.c @@ -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); } -- 1.6.0.6 -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list