changeset 11009:014f9009059b

6674410 dladm_walk_datalink_id() and dladm_walk() can spuriously return failure
author Cathy Zhou <Cathy.Zhou@Sun.COM>
date Mon, 09 Nov 2009 10:39:49 -0800
parents a22f9e01151a
children 594a15c2a6ad
files usr/src/lib/libdladm/common/libdlmgmt.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libdladm/common/libdlmgmt.c	Mon Nov 09 10:13:06 2009 -0800
+++ b/usr/src/lib/libdladm/common/libdlmgmt.c	Mon Nov 09 10:39:49 2009 -0800
@@ -277,8 +277,11 @@
 		    sizeof (getnext), &retval, sizeof (retval))) !=
 		    DLADM_STATUS_OK) {
 			/*
-			 * done with walking
+			 * Done with walking. If no next datalink is found,
+			 * return success.
 			 */
+			if (status == DLADM_STATUS_NOTFOUND)
+				status = DLADM_STATUS_OK;
 			break;
 		}