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:
parent
0f8362ba49
commit
4b161aa66e
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user