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
This commit is contained in:
Pawel Jakub Dawidek 2009-09-07 20:10:33 +00:00
parent 343775c0b4
commit 5d1b2674f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196950

View File

@ -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
}
}