Home
last modified time | relevance | path

Searched refs:mnt (Results 1 – 25 of 86) sorted by relevance

1234

/third_party/musl/src/misc/
Dmntent.c22 struct mntent *getmntent_r(FILE *f, struct mntent *mnt, char *linebuf, int buflen) in getmntent_r() argument
26 mnt->mnt_freq = 0; in getmntent_r()
27 mnt->mnt_passno = 0; in getmntent_r()
44 &mnt->mnt_freq, &mnt->mnt_passno); in getmntent_r()
52 mnt->mnt_fsname = linebuf+n[0]; in getmntent_r()
53 mnt->mnt_dir = linebuf+n[2]; in getmntent_r()
54 mnt->mnt_type = linebuf+n[4]; in getmntent_r()
55 mnt->mnt_opts = linebuf+n[6]; in getmntent_r()
57 return mnt; in getmntent_r()
62 static struct mntent mnt; in getmntent() local
[all …]
/third_party/ltp/testcases/kernel/mce-test/kvm/host/
Dhost_run.sh139 mnt=`mktemp -d`
142 mount_err=`mount -oloop,offset=$offset $image $mnt 2>&1`
145 echo "mount image to $mnt"
153 rm -rf $mnt
168 rm -rf $mnt
177 rm -rf $mnt
180 mount /dev/mapper/${vg}-${lv} $mnt
184 rm -rf $mnt
187 echo "mount LVM image to $mnt"
193 umount $mnt
[all …]
/third_party/ntfs-3g/libfuse-lite/
Dmount_util.c37 static int mtab_needs_update(const char *mnt) in mtab_needs_update() argument
42 if (strncmp(mnt, _PATH_MOUNTED, strlen(mnt)) == 0 && in mtab_needs_update()
43 _PATH_MOUNTED[strlen(mnt)] == '/') in mtab_needs_update()
54 const char *mnt, const char *type, const char *opts) in fuse_mnt_add_mount() argument
60 if (!mtab_needs_update(mnt)) in fuse_mnt_add_mount()
93 fsname, mnt, NULL, &env); in fuse_mnt_add_mount()
109 int fuse_mnt_umount(const char *progname, const char *mnt, int lazy) in fuse_mnt_umount() argument
115 if (!mtab_needs_update(mnt)) in fuse_mnt_umount()
129 execle("/sbin/umount", "/sbin/umount", mnt, in fuse_mnt_umount()
132 execle("/sbin/umount", "/sbin/umount", "-f", mnt, in fuse_mnt_umount()
[all …]
Dfusermount.c163 static int add_mount(const char *source, const char *mnt, const char *type, in add_mount() argument
166 return fuse_mnt_add_mount(progname, source, mnt, type, opts); in add_mount()
196 static int add_mount(const char *source, const char *mnt, const char *type, in add_mount() argument
200 (void) mnt; in add_mount()
337 static int do_mount(const char *mnt, char **typep, mode_t rootmode, in do_mount() argument
429 res = mount(source, mnt, type, flags, optbuf); in do_mount()
433 res = mount(source, mnt, type, flags, optbuf); in do_mount()
472 const char *mnt = *mntp; in check_perm() local
473 const char *origmnt = mnt; in check_perm()
475 res = stat(mnt, stbuf); in check_perm()
[all …]
Dmount_util.h12 const char *mnt, const char *type, const char *opts);
13 int fuse_mnt_umount(const char *progname, const char *mnt, int lazy);
19 int fuse_mnt_check_empty(const char *progname, const char *mnt,
Dmount.c481 static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, in fuse_mount_sys() argument
492 if (!mnt) { in fuse_mount_sys()
497 res = lstat(mnt, &stbuf); in fuse_mount_sys()
500 mnt, strerror(errno)); in fuse_mount_sys()
505 res = fuse_mnt_check_empty("fuse", mnt, stbuf.st_mode, stbuf.st_size); in fuse_mount_sys()
547 res = mount(source, mnt, MS_OPTIONSTR|mo->flags, type, NULL, 0, in fuse_mount_sys()
560 res = mount(source, mnt, MS_OPTIONSTR|mo->flags, type, NULL, 0, in fuse_mount_sys()
585 umount2(mnt, 2); /* lazy umount */ in fuse_mount_sys()
/third_party/ltp/testcases/kernel/controllers/memcg/control/
Dmemcg_control_test.sh85 echo "$ACTIVE_MEM_LIMIT" > $TST_PATH/mnt/$TST_NUM/memory.limit_in_bytes
86 echo "$TOT_MEM_LIMIT" > $TST_PATH/mnt/$TST_NUM/memory.memsw.limit_in_bytes
120 if [ -e $TST_PATH/mnt ]; then
121 umount $TST_PATH/mnt 2> /dev/null
122 rm -rf $TST_PATH/mnt
130 mkdir $TST_PATH/mnt
131 mount -t cgroup -o memory cgroup $TST_PATH/mnt 2> /dev/null
134 rmdir $TST_PATH/mnt
141 echo 1 > mnt/memory.use_hierarchy 2> /dev/null
147 mkdir $TST_PATH/mnt/$TST_NUM
[all …]
/third_party/NuttX/fs/mount/
Dfs_umount.c79 BOOL fs_in_use(struct Mount *mnt, const char *target) in fs_in_use() argument
90 return VnodeInUseIter(mnt); in fs_in_use()
98 struct Mount *mnt = NULL; in umount() local
153 mnt = mountpt_vnode->originMount; in umount()
154 if (!mnt) in umount()
159 covered_vnode = mnt->vnodeBeCovered; in umount()
170 if (mnt->ops == NULL || mnt->ops->Unmount == NULL) in umount()
179 if (fs_in_use(mnt, target)) in umount()
185 ret = VnodeFreeAll(mnt); in umount()
191 ret = mnt->ops->Unmount(mnt, &blkdrvr_vnode); in umount()
[all …]
Dfs_mount.c150 struct Mount* mnt = NULL; in mount() local
283 mnt = MountAlloc(mountpt_vnode, (struct MountOps*)mops); in mount()
288 ret = ZpfsPrepare(source, target, mnt); in mount()
297 mnt->mountFlags = mountflags; in mount()
300 ret = mops->Mount(mnt, device, data); in mount()
320 mnt->vnodeBeCovered->flag |= VNODE_FLAG_MOUNT_ORIGIN; in mount()
321 mnt->vnodeCovered->flag |= VNODE_FLAG_MOUNT_NEW; in mount()
322 mnt->vnodeCovered->filePath = strdup(mountpt_vnode->filePath); in mount()
323 mnt->vnodeDev = device; in mount()
324 mnt->ops = mops; in mount()
[all …]
Dfs_foreachmountpoint.c55 struct Mount *mnt = NULL; in foreach_mountpoint() local
58 LOS_DL_LIST_FOR_EACH_ENTRY(mnt, mntList, struct Mount, mountList) in foreach_mountpoint()
60 if (mnt->ops->Statfs != NULL) in foreach_mountpoint()
62 ret = mnt->ops->Statfs(mnt, &statBuf); in foreach_mountpoint()
65 (void)handler(mnt->devName, mnt->pathName, &statBuf, arg); in foreach_mountpoint()
Dfs_sync.c57 struct Mount *mnt = NULL; in sync() local
61 LOS_DL_LIST_FOR_EACH_ENTRY(mnt, mntList, struct Mount, mountList) in sync()
63 if (mnt->ops->Sync != NULL) in sync()
65 ret = mnt->ops->Sync(mnt); in sync()
68 PRINT_ERR("sync failed, %s, %s\n", mnt->pathName, strerror(-ret)); in sync()
/third_party/ltp/testcases/kernel/fs/fs_bind/bind/
Dfs_bind23.sh15 fs_bind_makedir private mnt
16 fs_bind_makedir rshared mnt/1
18 mkdir mnt/2 mnt/1/abc
19 EXPECT_PASS mount --bind mnt/1 mnt/2
20 EXPECT_PASS mount --bind "$FS_BIND_DISK1" mnt/1/abc
22 fs_bind_check mnt/1/abc mnt/2/abc "$FS_BIND_DISK1"
29 EXPECT_PASS mount --move mnt tmp1/3
/third_party/libfuse/util/
Dfusermount.c177 static int add_mount(const char *source, const char *mnt, const char *type, in add_mount() argument
180 return fuse_mnt_add_mount(progname, source, mnt, type, opts); in add_mount()
183 static int may_unmount(const char *mnt, int quiet) in may_unmount() argument
208 if (!found && strcmp(entp->mnt_dir, mnt) == 0 && in may_unmount()
240 progname, mnt, mtab); in may_unmount()
275 const char *mnt = a[1]; in check_is_mount_child() local
333 fprintf(stderr, "%s: %s not mounted\n", progname, mnt); in check_is_mount_child()
358 static int check_is_mount(const char *last, const char *mnt, const char *type) in check_is_mount() argument
362 const char *a[3] = { last, mnt, type }; in check_is_mount()
435 static int unmount_fuse_locked(const char *mnt, int quiet, int lazy) in unmount_fuse_locked() argument
[all …]
/third_party/libfuse/lib/
Dmount_util.c37 #define umount2(mnt, flags) unmount(mnt, ((flags) == 2) ? MNT_FORCE : 0) argument
41 #define mtab_needs_update(mnt) 0 argument
43 static int mtab_needs_update(const char *mnt) in mtab_needs_update() argument
49 if (strncmp(mnt, _PATH_MOUNTED, strlen(mnt)) == 0 && in mtab_needs_update()
50 _PATH_MOUNTED[strlen(mnt)] == '/') in mtab_needs_update()
89 const char *mnt, const char *type, const char *opts) in add_mount() argument
121 "-f", "-t", type, "-o", opts, fsname, mnt, NULL, &env); in add_mount()
140 const char *mnt, const char *type, const char *opts) in fuse_mnt_add_mount() argument
142 if (!mtab_needs_update(mnt)) in fuse_mnt_add_mount()
145 return add_mount(progname, fsname, mnt, type, opts); in fuse_mnt_add_mount()
[all …]
Dmount.c41 #define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0) argument
448 static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, in fuse_mount_sys() argument
459 if (!mnt) { in fuse_mount_sys()
464 res = stat(mnt, &stbuf); in fuse_mount_sys()
467 mnt, strerror(errno)); in fuse_mount_sys()
508 res = mount(source, mnt, type, mo->flags, mo->kernel_opts); in fuse_mount_sys()
519 res = mount(source, mnt, type, mo->flags, mo->kernel_opts); in fuse_mount_sys()
544 char *newmnt = fuse_mnt_resolve_path("fuse", mnt); in fuse_mount_sys()
562 umount2(mnt, 2); /* lazy umount */ in fuse_mount_sys()
Dmount_util.h12 const char *mnt, const char *type, const char *opts);
13 int fuse_mnt_remove_mount(const char *progname, const char *mnt);
/third_party/NuttX/fs/vfs/
Dfs_statfs.c59 struct Mount *mnt = NULL; in statfs() local
84 mnt = vnode->originMount; in statfs()
85 if (mnt == NULL || mnt->ops == NULL || mnt->ops->Statfs == NULL) in statfs()
92 ret = mnt->ops->Statfs(mnt, buf); in statfs()
/third_party/ltp/lib/
Dtst_path_has_mnt_flags.c31 struct mntent *mnt; in tst_path_has_mnt_flags_() local
57 while ((mnt = getmntent(f))) { in tst_path_has_mnt_flags_()
59 if (!strcmp(mnt->mnt_fsname, "rootfs")) in tst_path_has_mnt_flags_()
62 prefix_len = strlen(mnt->mnt_dir); in tst_path_has_mnt_flags_()
64 if (strncmp(path, mnt->mnt_dir, prefix_len) == 0 in tst_path_has_mnt_flags_()
71 if (hasmntopt(mnt, flags[i]) != NULL) in tst_path_has_mnt_flags_()
/third_party/ltp/testcases/kdump/
Drunkdump.sh63 mount "${EXT3_PART}" /mnt
66 COREDIR=/mnt"${COREDIR}"
71 mount -L "${EXT3_LABEL}" /mnt
74 COREDIR=/mnt"${COREDIR}"
79 mount "/dev/disk/by-uuid/${EXT3_UID}" /mnt
82 COREDIR=/mnt"${COREDIR}"
113 mount "${NFS_PATH}" /mnt
116 COREDIR=/mnt"${COREDIR}"
/third_party/ltp/testcases/open_posix_testsuite/include/
Dnoatime.h49 struct mntent *mnt; in mounted_noatime() local
61 while ((mnt = getmntent(f))) { in mounted_noatime()
63 if (!strcmp(mnt->mnt_fsname, "rootfs")) in mounted_noatime()
66 prefix = strpref(path, mnt->mnt_dir); in mounted_noatime()
70 has_noatime = hasmntopt(mnt, "noatime") != NULL; in mounted_noatime()
/third_party/selinux/libselinux/src/
Dinit.c31 static int verify_selinuxmnt(const char *mnt) in verify_selinuxmnt() argument
37 rc = statfs(mnt, &sfbuf); in verify_selinuxmnt()
42 rc = statvfs(mnt, &vfsbuf); in verify_selinuxmnt()
45 set_selinuxmnt(mnt); in verify_selinuxmnt()
140 void set_selinuxmnt(const char *mnt) in set_selinuxmnt() argument
142 selinux_mnt = strdup(mnt); in set_selinuxmnt()
/third_party/e2fsprogs/
D0005-resize2fs-resize2fs-disk-hardlinks-will-be-error.patch8 when you get to tmpfs, file!=mnt->mnt_fsname, therefore, the
9 stat(mnt->mnt_fsname, &st_buf) branch is used, however, the values of
17 mkdir /root/mnt
36 struct mntent *mnt;
43 if (stat(mnt->mnt_fsname, &st_buf) == 0) {
49 + if (stat(mnt->mnt_dir, &dir_st_buf) != 0)
54 if (check_loop_mounted(mnt->mnt_fsname,
/third_party/libfuse/xfstests/
Dlocal.config2 export TEST_DIR=/mnt/test
4 export SCRATCH_MNT=/mnt/scratch
11 SCRATCH_SOURCE=/mnt/src/scratch
12 TEST_SOURCE=/mnt/src/test
/third_party/ntfs-3g/libntfs-3g/
Dvolume.c1494 struct mntent *mnt; in ntfs_mntent_check() local
1516 while ((mnt = getmntent(f))) { in ntfs_mntent_check()
1517 if (!ntfs_realpath_canonicalize(mnt->mnt_fsname, real_fsname)) in ntfs_mntent_check()
1523 if (!mnt) in ntfs_mntent_check()
1526 if (!strcmp(mnt->mnt_dir, "/")) in ntfs_mntent_check()
1529 if (hasmntopt(mnt, "ro") && !hasmntopt(mnt, "rw")) in ntfs_mntent_check()
1548 struct mnttab *mnt = NULL; in ntfs_mntent_check() local
1557 mnt = (struct mnttab*)ntfs_malloc(MNT_LINE_MAX + 1); in ntfs_mntent_check()
1558 if (!real_fsname || !mnt) { in ntfs_mntent_check()
1570 while (!getmntent(f, mnt)) { in ntfs_mntent_check()
[all …]
/third_party/ltp/testcases/kernel/io/ltp-aiodio/
Daiocp.c75 struct mntent *mnt; in dev_block_size_by_path() local
89 while ((mnt = getmntent(f))) { in dev_block_size_by_path()
91 if (mnt->mnt_fsname[0] != '/') in dev_block_size_by_path()
94 prefix_len = strlen(mnt->mnt_dir); in dev_block_size_by_path()
97 !strncmp(path, mnt->mnt_dir, prefix_len)) { in dev_block_size_by_path()
99 strncpy(dev_name, mnt->mnt_fsname, sizeof(dev_name)); in dev_block_size_by_path()

1234