From 4b161aa66e03307c4466c9e3e4dc6f0a5256d787 Mon Sep 17 00:00:00 2001 From: pjd Date: Mon, 7 Sep 2009 20:10:33 +0000 Subject: 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 --- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c index 84a8a57..76ab7ac 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c @@ -172,6 +172,7 @@ is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto) *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 char *mountpoint, zfs_share_proto_t proto) return (0); } } +#else + if (proto == PROTO_NFS) + return (SHARED_NFS); +#endif } } -- cgit v1.1