3109 libshare_nfs: findopt() should return index
authorVitaliy Gusev <gusev.vitaliy@nexenta.com>
Tue, 28 Aug 2012 20:28:15 -0500
changeset 13859 2170bf12ab3f
parent 13858 271108bf13d7
child 13860 0b5d8823b20a
3109 libshare_nfs: findopt() should return index Reviewed by: Eric Schrock <[email protected]> Approved by: Richard Lowe <[email protected]>
usr/src/lib/libshare/nfs/libshare_nfs.c
--- a/usr/src/lib/libshare/nfs/libshare_nfs.c	Tue Aug 28 20:12:52 2012 -0500
+++ b/usr/src/lib/libshare/nfs/libshare_nfs.c	Tue Aug 28 20:28:15 2012 -0500
@@ -22,6 +22,9 @@
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
 
 /*
  * NFS specific functions
@@ -252,7 +255,7 @@
 	if (name != NULL) {
 		for (i = 0; optdefs[i].tag != NULL; i++) {
 			if (strcmp(optdefs[i].tag, name) == 0)
-				return (i);
+				return (optdefs[i].index);
 		}
 		if (findcharset(name))
 			return (OPT_CHARSET_MAP);