| /freebsd-12.1/usr.sbin/autofs/ |
| H A D | automount.c | 95 return (mntbuf + i); in find_statfs() 187 struct statfs *mntbuf; in mount_unmount() local 200 mntbuf[i].f_mntonname); in mount_unmount() 207 mntbuf[i].f_mntonname); in mount_unmount() 221 n->n_key, mntbuf, nitems); in mount_unmount() 227 "/", mntbuf, nitems); in mount_unmount() 263 struct statfs *mntbuf; in flush_caches() local 275 mntbuf[i].f_mntonname); in flush_caches() 286 struct statfs *mntbuf; in unmount_automounted() local 298 mntbuf[i].f_mntonname); in unmount_automounted() [all …]
|
| H A D | autounmountd.c | 107 struct statfs *mntbuf; in refresh_automounted() local 110 nitems = getmntinfo(&mntbuf, MNT_WAIT); in refresh_automounted() 122 mntbuf[i].f_mntonname); in refresh_automounted() 126 if ((mntbuf[i].f_flags & MNT_AUTOMOUNTED) == 0) { in refresh_automounted() 128 mntbuf[i].f_mntonname); in refresh_automounted() 132 af = automounted_find(mntbuf[i].f_fsid); in refresh_automounted() 135 "(FSID:%d:%d)", mntbuf[i].f_mntonname, in refresh_automounted() 136 mntbuf[i].f_fsid.val[0], mntbuf[i].f_fsid.val[1]); in refresh_automounted() 137 af = automounted_add(mntbuf[i].f_fsid, in refresh_automounted() 138 mntbuf[i].f_mntonname); in refresh_automounted() [all …]
|
| /freebsd-12.1/lib/libc/gen/ |
| H A D | getmntinfo.c | 50 static struct statfs *mntbuf; in getmntinfo() local 57 if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo() 59 while (tries++ < MAX_TRIES && bufsize <= mntsize * sizeof(*mntbuf)) { in getmntinfo() 60 bufsize = (mntsize * SCALING_FACTOR) * sizeof(*mntbuf); in getmntinfo() 61 if ((mntbuf = reallocf(mntbuf, bufsize)) == NULL) in getmntinfo() 63 if ((mntsize = getfsstat(mntbuf, bufsize, mode)) < 0) in getmntinfo() 66 *mntbufp = mntbuf; in getmntinfo() 67 if (mntsize > (bufsize / sizeof(*mntbuf))) in getmntinfo() 68 return (bufsize / sizeof(*mntbuf)); in getmntinfo()
|
| H A D | getmntinfo-compat11.c | 48 static struct freebsd11_statfs *mntbuf; in freebsd11_getmntinfo() local 56 (mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo() 59 if (mntbuf) in freebsd11_getmntinfo() 60 free(mntbuf); in freebsd11_getmntinfo() 62 if ((mntbuf = (struct freebsd11_statfs *)malloc(bufsize)) == 0) in freebsd11_getmntinfo() 64 if ((mntsize = freebsd11_getfsstat(mntbuf, bufsize, flags)) < 0) in freebsd11_getmntinfo() 67 *mntbufp = mntbuf; in freebsd11_getmntinfo()
|
| /freebsd-12.1/contrib/netbsd-tests/fs/nfs/nfsservice/ |
| H A D | getmntinfo.c | 62 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-12.1/sbin/mount/ |
| H A D | mount.c | 262 struct statfs *mntbuf; in main() local 344 if ((mntsize = getmntinfo(&mntbuf, in main() 367 mntbuf->f_flags); in main() 377 putfsent(&mntbuf[i]); in main() 387 prmount(&mntbuf[i]); in main() 412 mntbuf->f_mntonname) == 0) { in main() 418 mntbuf->f_fstypename) == 0) { in main() 426 mntbuf->f_flags); in main() 430 mntbuf->f_flags); in main() 708 struct statfs *mntbuf; in getmntpt() local [all …]
|
| /freebsd-12.1/bin/df/ |
| H A D | df.c | 125 struct statfs *mntbuf; in main() local 239 mntbuf = malloc(argc * sizeof(*mntbuf)); in main() 240 if (mntbuf == NULL) in main() 344 mntbuf[mntsize++] = statfsbuf; in main() 373 struct statfs *mntbuf; in getmntpt() local 378 return (mntbuf[i].f_mntonname); in getmntpt() 392 struct statfs *mntbuf; in regetmntinfo() local 397 mntbuf = *mntbufp; in regetmntinfo() 407 error = statfs(mntbuf[i].f_mntonname, &mntbuf[j]); in regetmntinfo() 412 mntbuf[i].f_mntonname); in regetmntinfo() [all …]
|
| /freebsd-12.1/usr.sbin/snapinfo/ |
| H A D | snapinfo.c | 60 struct statfs *mntbuf; in main() local 103 fscount = getmntinfo(&mntbuf, MNT_WAIT); in main() 105 if (!strncmp(mntbuf[n].f_fstypename, "ufs", 3)) { in main() 106 if (all || strcmp(path, mntbuf[n].f_mntonname) == 0) { in main() 107 find_snapshot(&mntbuf[n]); in main()
|
| /freebsd-12.1/contrib/hyperv/tools/ |
| H A D | hv_vss_daemon.c | 52 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-12.1/usr.sbin/rpc.umntall/ |
| H A D | rpc.umntall.c | 230 struct statfs *mntbuf; in is_mounted() local 242 if ((mntbuf = malloc(bufsize)) == NULL) in is_mounted() 244 mntsize = getfsstat(mntbuf, (long)bufsize, MNT_NOWAIT); in is_mounted() 246 if (strcmp(mntbuf[i].f_mntfromname, name) == 0) { in is_mounted() 247 free(mntbuf); in is_mounted() 251 free(mntbuf); in is_mounted()
|
| /freebsd-12.1/sbin/umount/ |
| H A D | umount.c | 93 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() 478 static struct statfs *mntbuf; in getmntentry() local 485 if ((mntsize = mntinfo(&mntbuf)) <= 0) in getmntentry() 502 sfs = &mntbuf[i]; in getmntentry() 600 mntinfo(struct statfs **mntbuf) in mntinfo() argument 613 *mntbuf = origbuf; in mntinfo()
|
| /freebsd-12.1/sbin/bectl/ |
| H A D | bectl_jail.c | 212 struct statfs *mntbuf; in bectl_jail_cleanup() local 221 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in bectl_jail_cleanup() 223 if (strncmp(mountpoint, mntbuf[i].f_mntonname, searchlen) == 0 && in bectl_jail_cleanup() 224 mntbuf[i].f_type != MNTTYPE_ZFS) { in bectl_jail_cleanup() 226 if (unmount(mntbuf[i].f_mntonname, 0) != 0) { in bectl_jail_cleanup() 228 mntbuf[i].f_mntonname); in bectl_jail_cleanup()
|
| /freebsd-12.1/sbin/fsck/ |
| H A D | fsutil.c | 163 struct statfs *mntbuf, *statfsp; in getmntpt() local 172 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in getmntpt() 174 statfsp = &mntbuf[i]; in getmntpt()
|
| /freebsd-12.1/sbin/dump/ |
| H A D | main.c | 623 struct statfs *mntbuf; in getmntpt() local 625 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in getmntpt() 627 if (!strcmp(mntbuf[i].f_mntfromname, name)) { in getmntpt() 628 *mntflagsp = mntbuf[i].f_flags; in getmntpt() 629 return (mntbuf[i].f_mntonname); in getmntpt()
|
| /freebsd-12.1/contrib/netbsd-tests/bin/df/ |
| H A D | getmntinfo.c | 208 getmntinfo(struct statvfs **mntbuf, int flags) in getmntinfo() argument 216 *mntbuf = allstatvfs; in getmntinfo()
|
| /freebsd-12.1/usr.bin/nfsstat/ |
| H A D | nfsstat.c | 157 struct statfs *mntbuf; in main() local 176 mntlen = getmntinfo(&mntbuf, MNT_NOWAIT); in main() 178 if (strcmp(mntbuf->f_fstypename, "nfs") == 0) { in main() 180 mntbuf->f_mntonname; in main() 186 mntbuf->f_mntfromname, in main() 187 mntbuf->f_mntonname, buf); in main() 192 mntbuf++; in main()
|
| /freebsd-12.1/sbin/fsck_ffs/ |
| H A D | main.c | 689 struct statfs *mntbuf, *statfsp; in getmntpt() local 698 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in getmntpt() 700 statfsp = &mntbuf[i]; in getmntpt()
|
| /freebsd-12.1/sbin/growfs/ |
| H A D | growfs.c | 1249 struct statfs *mntbuf, *statfsp; in dev_to_statfs() local 1262 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in dev_to_statfs() 1264 statfsp = &mntbuf[i]; in dev_to_statfs() 1282 struct statfs *mntbuf, *statfsp; in mountpoint_to_dev() local 1289 mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); in mountpoint_to_dev() 1291 statfsp = &mntbuf[i]; in mountpoint_to_dev()
|
| /freebsd-12.1/lib/libugidfw/ |
| H A D | ugidfw.c | 68 struct statfs *mntbuf; in bsde_rule_to_string() local 335 numfs = getmntinfo(&mntbuf, MNT_NOWAIT); in bsde_rule_to_string() 338 &(mntbuf[i].f_fsid), in bsde_rule_to_string() 339 sizeof(mntbuf[i].f_fsid)) == 0) in bsde_rule_to_string() 342 i == numfs ? "???" : mntbuf[i].f_mntonname); in bsde_rule_to_string()
|
| /freebsd-12.1/contrib/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_common_interceptors.inc | 4199 __sanitizer_mntent *mntbuf, char *buf, int buflen) { 4201 COMMON_INTERCEPTOR_ENTER(ctx, getmntent_r, fp, mntbuf, buf, buflen); 4202 __sanitizer_mntent *res = REAL(getmntent_r)(fp, mntbuf, buf, buflen);
|