Lines Matching refs:mountpoint
32 * mountpoint.
123 * Search the sharetab for the given mountpoint and protocol, returning
127 is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto)
139 /* the mountpoint is the first entry on each line */
144 if (strcmp(buf, mountpoint) == 0) {
210 * in 'where' with the current mountpoint, and return 1. Otherwise, we return
235 * mountpoint in 'buf'.
274 char mountpoint[ZFS_MAXPROPLEN];
289 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
293 if (lstat(mountpoint, &buf) != 0) {
294 if (mkdirp(mountpoint, 0755) != 0) {
296 "failed to create mountpoint"));
299 mountpoint));
305 * Determine if the mountpoint is empty. If so, refuse to perform the
312 !dir_is_empty(mountpoint)) {
316 dgettext(TEXT_DOMAIN, "cannot mount '%s'"), mountpoint));
321 if (zmount(zfs_get_name(zhp), mountpoint, flags,
330 "mountpoint or dataset is busy"));
355 libzfs_mnttab_add(hdl, zfs_get_name(zhp), mountpoint,
364 unmount_one(libzfs_handle_t *hdl, const char *mountpoint, int flags)
366 if (umount2(mountpoint, flags) != 0) {
370 mountpoint));
380 zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags)
387 if (mountpoint != NULL || ((zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) &&
390 * mountpoint may have come from a call to
395 if (mountpoint == NULL)
398 mntpt = zfs_strdup(hdl, mountpoint);
419 * Unmount this filesystem and any children inheriting the mountpoint property.
420 * To do this, just act like we're changing the mountpoint property, but don't
475 char *mountpoint;
478 if (!zfs_is_mounted(zhp, &mountpoint))
481 if ((rc = is_shared(zhp->zfs_hdl, mountpoint, proto))
484 *where = mountpoint;
486 free(mountpoint);
489 free(mountpoint);
733 char mountpoint[ZFS_MAXPROPLEN];
741 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
775 share = zfs_sa_find_share(hdl->libzfs_sharehdl, mountpoint);
787 NULL, NULL, mountpoint,
798 mountpoint);
820 error = fsshare(ZFS_EXPORTS_PATH, mountpoint, "");
822 error = fsshare(ZFS_EXPORTS_PATH, mountpoint, shareopts);
857 * Unshare a filesystem by mountpoint.
860 unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
868 * Mountpoint could get trashed if libshare calls getmntany
872 mntpt = zfs_strdup(hdl, mountpoint);
907 err = fsunshare(ZFS_EXPORTS_PATH, mountpoint);
922 zfs_unshare_proto(zfs_handle_t *zhp, const char *mountpoint,
931 if (mountpoint != NULL)
932 mountpoint = mntpt = zfs_strdup(hdl, mountpoint);
934 if (mountpoint != NULL || ((zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) &&
938 if (mountpoint == NULL)
960 zfs_unshare_nfs(zfs_handle_t *zhp, const char *mountpoint)
962 return (zfs_unshare_proto(zhp, mountpoint, nfs_only));
966 zfs_unshare_smb(zfs_handle_t *zhp, const char *mountpoint)
968 return (zfs_unshare_proto(zhp, mountpoint, smb_only));
1009 zfs_unshareall_bypath(zfs_handle_t *zhp, const char *mountpoint)
1011 return (zfs_unshare_proto(zhp, mountpoint, share_all_proto));
1015 * Remove the mountpoint associated with the current dataset, if necessary.
1018 * - The mountpoint is not 'none' or 'legacy'
1019 * - The mountpoint is non-empty
1020 * - The mountpoint is the default or inherited
1028 char mountpoint[ZFS_MAXPROPLEN];
1031 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint),
1043 (void) rmdir(mountpoint);
1129 * datasets and mountpoints within the pool, and sort them by mountpoint. Once
1153 * Sort the datasets by mountpoint.
1288 * mountpoint, so failure is not fatal.
1297 * mountpoint.