Lines Matching refs:mountpoint

33  * mountpoint.
125 * Search the sharetab for the given mountpoint and protocol, returning
129 is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto)
141 /* the mountpoint is the first entry on each line */
146 if (strcmp(buf, mountpoint) == 0) {
267 * in 'where' with the current mountpoint, and return 1. Otherwise, we return
292 * mountpoint in 'buf'.
331 char mountpoint[ZFS_MAXPROPLEN];
346 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
350 if (lstat(mountpoint, &buf) != 0) {
351 if (mkdirp(mountpoint, 0755) != 0) {
353 "failed to create mountpoint"));
356 mountpoint));
361 * Determine if the mountpoint is empty. If so, refuse to perform the
368 !dir_is_empty(mountpoint)) {
372 dgettext(TEXT_DOMAIN, "cannot mount '%s'"), mountpoint));
376 if (mount(zfs_get_name(zhp), mountpoint, MS_OPTIONSTR | flags,
385 "mountpoint or dataset is busy"));
410 libzfs_mnttab_add(hdl, zfs_get_name(zhp), mountpoint,
419 unmount_one(libzfs_handle_t *hdl, const char *mountpoint, int flags)
421 if (umount2(mountpoint, flags) != 0) {
425 mountpoint));
435 zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags)
442 if (mountpoint != NULL || ((zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) &&
445 * mountpoint may have come from a call to
450 if (mountpoint == NULL)
453 mntpt = zfs_strdup(hdl, mountpoint);
474 * Unmount this filesystem and any children inheriting the mountpoint property.
475 * To do this, just act like we're changing the mountpoint property, but don't
530 char *mountpoint;
533 if (!zfs_is_mounted(zhp, &mountpoint))
536 if ((rc = is_shared(zhp->zfs_hdl, mountpoint, proto))
539 *where = mountpoint;
541 free(mountpoint);
544 free(mountpoint);
769 char mountpoint[ZFS_MAXPROPLEN];
778 if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
809 share = zfs_sa_find_share(hdl->libzfs_sharehdl, mountpoint);
821 NULL, NULL, mountpoint,
831 mountpoint);
876 * Unshare a filesystem by mountpoint.
879 unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
890 mntpt = zfs_strdup(hdl, 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.