On Mon, Jul 20, 2009 at 01:42:02PM -0400, Laine Stump wrote:
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(-)
ACK
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(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|