summaryrefslogtreecommitdiff
path: root/usr/src/lib/libipmp/common/ipmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libipmp/common/ipmp.c')
-rw-r--r--usr/src/lib/libipmp/common/ipmp.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/usr/src/lib/libipmp/common/ipmp.c b/usr/src/lib/libipmp/common/ipmp.c
index b9a7984889..cf9c3c7c3c 100644
--- a/usr/src/lib/libipmp/common/ipmp.c
+++ b/usr/src/lib/libipmp/common/ipmp.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* IPMP general interfaces (PSARC/2002/615).
*/
@@ -34,6 +31,8 @@
#include <stdlib.h>
#include <locale.h>
#include <unistd.h>
+#include <string.h>
+#include <errno.h>
#include "ipmp_impl.h"
@@ -92,13 +91,15 @@ static char *errmsgs[IPMP_NERR] = {
"operation failed", /* 1 IPMP_FAILURE */
"minimum failover redundancy not met", /* 2 IPMP_EMINRED */
"failback disabled", /* 3 IPMP_EFBDISABLED */
- "unable to completely fail back", /* 4 IPMP_EFBPARTIAL */
+ "unknown IPMP data address", /* 4 IPMP_EUNKADDR */
"invalid argument", /* 5 IPMP_EINVAL */
"out of memory", /* 6 IPMP_ENOMEM */
"cannot contact in.mpathd", /* 7 IPMP_ENOMPATHD */
"unknown IPMP group", /* 8 IPMP_EUNKGROUP */
"interface is not using IPMP", /* 9 IPMP_EUNKIF */
- "unable to communicate with in.mpathd" /* 10 IPMP_EPROTO */
+ "unable to communicate with in.mpathd", /* 10 IPMP_EPROTO */
+ "interface has duplicate hardware address"
+ /* 11 IPMP_EHWADDRDUP */
};
/*
@@ -110,5 +111,8 @@ ipmp_errmsg(int error)
if (error >= IPMP_NERR || error < 0)
return (dgettext(TEXT_DOMAIN, "<unknown error>"));
+ if (error == IPMP_FAILURE)
+ return (strerror(errno));
+
return (dgettext(TEXT_DOMAIN, errmsgs[error]));
}