svn commit: r196950 - head/cddl/contrib/opensolaris/lib/libzfs/common

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Sep 7 20:10:33 UTC 2009


Author: pjd
Date: Mon Sep  7 20:10:33 2009
New Revision: 196950
URL: http://svn.freebsd.org/changeset/base/196950

Log:
  Fix detection of file system being shared. After this change commands like:
  
  	# zfs unshare -a
  	# zfs destroy foo/bar
  	# zfs rename foo/bar foo/baz
  
  should properly remove exported file systems.
  
  MFC after:	3 days

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c	Mon Sep  7 19:43:13 2009	(r196949)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c	Mon Sep  7 20:10:33 2009	(r196950)
@@ -172,6 +172,7 @@ is_shared(libzfs_handle_t *hdl, const ch
 
 		*tab = '\0';
 		if (strcmp(buf, mountpoint) == 0) {
+#if defined(sun)
 			/*
 			 * the protocol field is the third field
 			 * skip over second field
@@ -194,6 +195,10 @@ is_shared(libzfs_handle_t *hdl, const ch
 					return (0);
 				}
 			}
+#else
+			if (proto == PROTO_NFS)
+				return (SHARED_NFS);
+#endif
 		}
 	}
 


More information about the svn-src-head mailing list