Home
last modified time | relevance | path

Searched refs:mntbuf (Results 1 – 20 of 20) sorted by relevance

/freebsd/usr.sbin/autofs/
H A Dautomount.c87 find_statfs(const struct statfs *mntbuf, int nitems, const char *mountpoint) in find_statfs() argument
92 if (strcmp(mntbuf[i].f_mntonname, mountpoint) == 0) in find_statfs()
93 return (mntbuf + i); in find_statfs()
144 const char *prefix, const struct statfs *mntbuf, int nitems) in mount_if_not_already() argument
156 sb = find_statfs(mntbuf, nitems, mountpoint); in mount_if_not_already()
185 struct statfs *mntbuf; in mount_unmount() local
189 nitems = getmntinfo(&mntbuf, MNT_WAIT); in mount_unmount()
196 if (strcmp(mntbuf[i].f_fstypename, "autofs") != 0) { in mount_unmount()
198 mntbuf[i].f_mntonname); in mount_unmount()
202 n = node_find(root, mntbuf[i].f_mntonname); in mount_unmount()
[all …]
H A Dautounmountd.c102 struct statfs *mntbuf; in refresh_automounted() local
105 nitems = getmntinfo(&mntbuf, MNT_WAIT); in refresh_automounted()
115 if (strcmp(mntbuf[i].f_fstypename, "autofs") == 0) { in refresh_automounted()
117 mntbuf[i].f_mntonname); in refresh_automounted()
121 if ((mntbuf[i].f_flags & MNT_AUTOMOUNTED) == 0) { in refresh_automounted()
123 mntbuf[i].f_mntonname); in refresh_automounted()
127 af = automounted_find(mntbuf[i].f_fsid); in refresh_automounted()
130 "(FSID:%d:%d)", mntbuf[i].f_mntonname, in refresh_automounted()
131 mntbuf[i].f_fsid.val[0], mntbuf[i].f_fsid.val[1]); in refresh_automounted()
132 af = automounted_add(mntbuf[i].f_fsid, in refresh_automounted()
[all …]
/freebsd/lib/libc/gen/
H A Dgetmntinfo.c46 static struct statfs *mntbuf; in getmntinfo() local
53 if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo()
55 while (tries++ < MAX_TRIES && bufsize <= mntsize * sizeof(*mntbuf)) { in getmntinfo()
56 bufsize = (mntsize * SCALING_FACTOR) * sizeof(*mntbuf); in getmntinfo()
57 if ((mntbuf = reallocf(mntbuf, bufsize)) == NULL) in getmntinfo()
59 if ((mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo()
62 *mntbufp = mntbuf; in getmntinfo()
63 if (mntsize > (bufsize / sizeof(*mntbuf))) in getmntinfo()
64 return (bufsize / sizeof(*mntbuf)); in getmntinfo()
H A Dgetmntinfo-compat11.c43 static struct freebsd11_statfs *mntbuf; in freebsd11_getmntinfo() local
51 (mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo()
54 if (mntbuf) in freebsd11_getmntinfo()
55 free(mntbuf); in freebsd11_getmntinfo()
57 if ((mntbuf = (struct freebsd11_statfs *)malloc(bufsize)) == 0) in freebsd11_getmntinfo()
59 if ((mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo()
62 *mntbufp = mntbuf; in freebsd11_getmntinfo()
/freebsd/contrib/netbsd-tests/fs/nfs/nfsservice/
H A Dgetmntinfo.c62 static struct statvfs *mntbuf; local
72 (mntsize = getvfsstat(mntbuf, bufsize, flags)) == -1)
75 if (mntbuf)
76 free(mntbuf);
78 if ((mntbuf = malloc(bufsize)) == NULL)
80 if ((mntsize = getvfsstat(mntbuf, bufsize, flags)) == -1)
83 *mntbufp = mntbuf;
/freebsd/bin/df/
H A Ddf.c104 struct statfs *mntbuf; in main() local
195 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in main()
196 mntsize = regetmntinfo(&mntbuf, mntsize); in main()
199 mntbuf = malloc(argc * sizeof(*mntbuf)); in main()
200 if (mntbuf == NULL) in main()
253 mntbuf[mntsize++] = statfsbuf; in main()
258 if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) { in main()
259 update_maxwidths(&maxwidths, &mntbuf[i]); in main()
261 addstat(&totalbuf, &mntbuf[i]); in main()
265 if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) in main()
[all …]
/freebsd/sbin/mount/
H A Dmount.c208 struct statfs *mntbuf; in main() local
296 if ((mntsize = getmntinfo(&mntbuf, in main()
317 ismounted(fs, mntbuf, mntsize)) in main()
320 mntbuf->f_flags); in main()
329 if (checkvfsname(mntbuf[i].f_fstypename, vfslist)) in main()
332 putfsent(&mntbuf[i]); in main()
339 if (checkvfsname(mntbuf[i].f_fstypename, in main()
343 (mntbuf[i].f_flags & MNT_IGNORE) != 0) in main()
346 prmount(&mntbuf[i]); in main()
360 if ((mntbuf = getmntpoint(*argv)) == NULL) in main()
[all …]
H A Dgetmntopts.c159 struct statfs *mntbuf, *statfsp; in getmntpoint() local
169 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in getmntpoint()
171 statfsp = &mntbuf[i]; in getmntpoint()
/freebsd/sys/contrib/openzfs/lib/libspl/os/linux/
H A Dgetmntany.c67 struct mntent mntbuf; in _sol_getmntent() local
70 ret = getmntent_r(fp, &mntbuf, buf, BUFSIZE); in _sol_getmntent()
73 mgetp->mnt_special = mntbuf.mnt_fsname; in _sol_getmntent()
74 mgetp->mnt_mountp = mntbuf.mnt_dir; in _sol_getmntent()
75 mgetp->mnt_fstype = mntbuf.mnt_type; in _sol_getmntent()
76 mgetp->mnt_mntopts = mntbuf.mnt_opts; in _sol_getmntent()
/freebsd/usr.sbin/snapinfo/
H A Dsnapinfo.c58 struct statfs *mntbuf; in main() local
101 fscount = getmntinfo(&mntbuf, MNT_WAIT); in main()
103 if (!strncmp(mntbuf[n].f_fstypename, "ufs", 3)) { in main()
104 if (all || strcmp(path, mntbuf[n].f_mntonname) == 0) { in main()
105 find_snapshot(&mntbuf[n]); in main()
/freebsd/contrib/hyperv/tools/
H A Dhv_vss_daemon.c52 struct statfs *mntbuf, *statfsp; in check() local
56 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in check()
63 statfsp = &mntbuf[i]; in check()
80 struct statfs *mntbuf, *statfsp; in freeze() local
91 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in freeze()
98 statfsp = &mntbuf[i]; in freeze()
/freebsd/usr.sbin/rpc.umntall/
H A Drpc.umntall.c225 struct statfs *mntbuf; in is_mounted() local
237 if ((mntbuf = malloc(bufsize)) == NULL) in is_mounted()
239 mntsize = getfsstat(mntbuf, (long)bufsize, MNT_NOWAIT); in is_mounted()
241 if (strcmp(mntbuf[i].f_mntfromname, name) == 0) { in is_mounted()
242 free(mntbuf); in is_mounted()
246 free(mntbuf); in is_mounted()
/freebsd/sbin/bectl/
H A Dbectl_jail.c210 struct statfs *mntbuf; in bectl_jail_cleanup() local
219 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in bectl_jail_cleanup()
221 if (strncmp(mountpoint, mntbuf[i].f_mntonname, searchlen) == 0 && in bectl_jail_cleanup()
222 mntbuf[i].f_type != MNTTYPE_ZFS) { in bectl_jail_cleanup()
224 if (unmount(mntbuf[i].f_mntonname, 0) != 0) { in bectl_jail_cleanup()
226 mntbuf[i].f_mntonname); in bectl_jail_cleanup()
/freebsd/sbin/umount/
H A Dumount.c90 struct statfs *mntbuf, *sfs; in main() local
158 if ((mntsize = mntinfo(&mntbuf)) <= 0) in main()
165 sfs = &mntbuf[mntsize]; in main()
173 free(mntbuf); in main()
488 static struct statfs *mntbuf; in getmntentry() local
495 if ((mntsize = mntinfo(&mntbuf)) <= 0) in getmntentry()
512 sfs = &mntbuf[i]; in getmntentry()
609 mntinfo(struct statfs **mntbuf) in mntinfo() argument
622 *mntbuf = origbuf; in mntinfo()
/freebsd/tools/test/stress2/misc/
H A Dufssuspend.sh42 struct statfs *mntbuf, *statfsp;
53 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
60 statfsp = &mntbuf[i];
/freebsd/sbin/dump/
H A Dmain.c633 struct statfs *mntbuf; in getmntpt() local
635 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in getmntpt()
637 if (!strcmp(mntbuf[i].f_mntfromname, name)) { in getmntpt()
638 *mntflagsp = mntbuf[i].f_flags; in getmntpt()
639 return (mntbuf[i].f_mntonname); in getmntpt()
/freebsd/contrib/netbsd-tests/bin/df/
H A Dgetmntinfo.c208 getmntinfo(struct statvfs **mntbuf, int flags) in getmntinfo() argument
216 *mntbuf = allstatvfs; in getmntinfo()
/freebsd/usr.bin/nfsstat/
H A Dnfsstat.c139 struct statfs *mntbuf; in main() local
157 mntlen = getmntinfo(&mntbuf, MNT_NOWAIT); in main()
159 if (strcmp(mntbuf->f_fstypename, "nfs") == 0) { in main()
161 mntbuf->f_mntonname; in main()
167 mntbuf->f_mntfromname, in main()
168 mntbuf->f_mntonname, buf); in main()
173 mntbuf++; in main()
/freebsd/lib/libugidfw/
H A Dugidfw.c66 struct statfs *mntbuf; in bsde_rule_to_string() local
333 numfs = getmntinfo(&mntbuf, MNT_NOWAIT); in bsde_rule_to_string()
336 &mntbuf[i].f_fsid) == 0) in bsde_rule_to_string()
339 i == numfs ? "???" : mntbuf[i].f_mntonname); in bsde_rule_to_string()
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_common_interceptors.inc4458 __sanitizer_mntent *mntbuf, char *buf, int buflen) {
4460 COMMON_INTERCEPTOR_ENTER(ctx, getmntent_r, fp, mntbuf, buf, buflen);
4461 __sanitizer_mntent *res = REAL(getmntent_r)(fp, mntbuf, buf, buflen);