diff options
author | pjd <pjd@FreeBSD.org> | 2009-09-07 20:10:33 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2009-09-07 20:10:33 +0000 |
commit | 4b161aa66e03307c4466c9e3e4dc6f0a5256d787 (patch) | |
tree | 1023f27bbbc257decb331e23ba827ee8257eec51 /cddl | |
parent | 0f8362ba49feee6e33adb1dff4fb3d0f0dfae2e4 (diff) | |
download | FreeBSD-src-4b161aa66e03307c4466c9e3e4dc6f0a5256d787.zip FreeBSD-src-4b161aa66e03307c4466c9e3e4dc6f0a5256d787.tar.gz |
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
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 } } |