Lines Matching refs:mnt

177 static int add_mount(const char *source, const char *mnt, const char *type,
180 return fuse_mnt_add_mount(progname, source, mnt, type, opts);
183 static int may_unmount(const char *mnt, int quiet)
208 if (!found && strcmp(entp->mnt_dir, mnt) == 0 &&
240 progname, mnt, mtab);
275 const char *mnt = a[1];
333 fprintf(stderr, "%s: %s not mounted\n", progname, mnt);
358 static int check_is_mount(const char *last, const char *mnt, const char *type)
362 const char *a[3] = { last, mnt, type };
435 static int unmount_fuse_locked(const char *mnt, int quiet, int lazy)
443 res = may_unmount(mnt, quiet);
448 copy = strdup(mnt);
463 progname, mnt, strerror(errno));
477 return fuse_mnt_remove_mount(progname, mnt);
480 static int unmount_fuse(const char *mnt, int quiet, int lazy)
485 res = unmount_fuse_locked(mnt, quiet, lazy);
518 static int add_mount(const char *source, const char *mnt, const char *type,
522 (void) mnt;
528 static int unmount_fuse(const char *mnt, int quiet, int lazy)
531 return fuse_mnt_umount(progname, mnt, mnt, lazy);
769 static int do_mount(const char *mnt, const char **typep, mode_t rootmode,
895 res = mount_notrunc(source, mnt, type, flags, optbuf);
906 res = mount_notrunc(source, mnt, type, flags, optbuf);
912 res = mount_notrunc(source, mnt, type, flags, optbuf);
945 const char *mnt = *mntp;
946 const char *origmnt = mnt;
950 res = lstat(mnt, stbuf);
953 progname, mnt, strerror(errno));
962 res = chdir(mnt);
969 mnt = *mntp = ".";
970 res = lstat(mnt, stbuf);
984 res = access(mnt, W_OK);
992 *mountpoint_fd = open(mnt, O_WRONLY);
995 progname, mnt, strerror(errno));
1002 progname, mnt, strerror(errno));
1008 progname, mnt);
1017 progname, mnt);
1029 progname, mnt, strerror(errno));
1128 static int mount_fuse(const char *mnt, const char *opts, const char **type)
1136 const char *real_mnt = mnt;
1173 res = add_mount(source, mnt, *type, mnt_opts);
1231 * fusermount typically has the s-bit set - initial open of `mnt` was as root
1233 * Try opening `mnt` again with uid and guid of the calling process.
1235 static int recheck_ENOTCONN_as_owner(const char *mnt)
1253 int fd = open(mnt, O_RDONLY);
1285 static int should_auto_unmount(const char *mnt, const char *type)
1292 copy = strdup(mnt);
1300 if (check_is_mount(last, mnt, type) == -1)
1303 fd = open(mnt, O_RDONLY);
1313 result = recheck_ENOTCONN_as_owner(mnt);
1352 char *mnt;
1433 mnt = fuse_mnt_resolve_path(progname, origmnt);
1434 if (mnt != NULL) {
1442 if (mnt == NULL)
1471 fd = mount_fuse(mnt, opts, &type);
1477 umount2(mnt, MNT_DETACH); /* lazy umount */
1483 free(mnt);
1519 if (!should_auto_unmount(mnt, type)) {
1525 res = unmount_fuse(mnt, quiet, lazy);
1527 res = umount2(mnt, lazy ? UMOUNT_DETACH : 0);
1531 progname, mnt, strerror(errno));
1538 free(mnt);
1543 free(mnt);