Home
last modified time | relevance | path

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

1234

/freebsd-13.1/tests/sys/fs/fusefs/
H A Dstatfs.cc48 struct statfs statbuf; in TEST_F() local
67 struct statfs statbuf; in TEST_F() local
76 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F()
99 struct statfs statbuf; in TEST_F() local
136 struct statfs statbuf; in TEST_F() local
158 EXPECT_EQ(1024ul, statbuf.f_bsize); in TEST_F()
164 EXPECT_EQ(100ul, statbuf.f_bfree); in TEST_F()
165 EXPECT_EQ(200l, statbuf.f_bavail); in TEST_F()
166 EXPECT_EQ(5ul, statbuf.f_files); in TEST_F()
167 EXPECT_EQ(6l, statbuf.f_ffree); in TEST_F()
[all …]
H A Dmount.cc70 struct statfs statbuf; in TEST_P() local
95 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_P()
96 newflags = (statbuf.f_flags | MNT_UPDATE) ^ flag; in TEST_P()
99 build_iovec(&iov, &iovlen, "fspath", (void*)statbuf.f_mntonname, -1); in TEST_P()
103 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_P()
104 EXPECT_FALSE((newflags ^ statbuf.f_flags) & flag); in TEST_P()
110 struct statfs statbuf; in TEST_P() local
130 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_P()
131 newflags = (statbuf.f_flags | MNT_UPDATE) ^ flag; in TEST_P()
143 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_P()
[all …]
H A Dfallocate.cc171 struct statfs statbuf; in TEST_F() local
200 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_F()
201 newflags = statbuf.f_flags | MNT_UPDATE | MNT_RDONLY; in TEST_F()
202 build_iovec(&iov, &iovlen, "fstype", (void*)statbuf.f_fstypename, -1); in TEST_F()
203 build_iovec(&iov, &iovlen, "fspath", (void*)statbuf.f_mntonname, -1); in TEST_F()
/freebsd-13.1/contrib/opie/libopie/
H A Dlock.c95 struct stat statbuf[2]; variable
118 if (lstat(__opie_lockfilename, &statbuf[0]) < 0)
121 if (statbuf[0].st_uid) {
128 if (!S_ISDIR(statbuf[0].st_mode)) {
135 if ((statbuf[0].st_mode & 0777) != 00700) {
147 if (!lstat(__opie_lockfilename, &statbuf[0]))
148 if (!S_ISREG(statbuf[0].st_mode))
154 if (statbuf[0].st_ino != statbuf[1].st_ino)
156 if (statbuf[0].st_mode != statbuf[1].st_mode)
200 if (fstat(fh, &statbuf[1]) < 0)
[all …]
/freebsd-13.1/sys/contrib/zstd/programs/
H A Dutil.c137 stat_t statbuf; in UTIL_isRegularFile() local
138 return UTIL_stat(infilename, &statbuf) && UTIL_isRegularFileStat(&statbuf); in UTIL_isRegularFile()
154 if (statbuf == NULL) { in UTIL_chmod()
203 stat_t statbuf; in UTIL_isDirectory() local
204 return UTIL_stat(infilename, &statbuf) && UTIL_isDirectoryStat(&statbuf); in UTIL_isDirectory()
245 stat_t statbuf; in UTIL_isFIFO() local
246 if (UTIL_stat(infilename, &statbuf) && UTIL_isFIFOStat(&statbuf)) return 1; in UTIL_isFIFO()
259 (void)statbuf; in UTIL_isFIFOStat()
267 stat_t statbuf; in UTIL_isLink() local
277 stat_t statbuf; in UTIL_getFileSize() local
[all …]
H A Dutil.h129 int UTIL_stat(const char* filename, stat_t* statbuf);
136 int UTIL_setFileStat(const char* filename, const stat_t* statbuf);
143 int UTIL_isRegularFileStat(const stat_t* statbuf);
144 int UTIL_isDirectoryStat(const stat_t* statbuf);
145 int UTIL_isFIFOStat(const stat_t* statbuf);
146 U64 UTIL_getFileSizeStat(const stat_t* statbuf);
153 int UTIL_chmod(char const* filename, const stat_t* statbuf, mode_t permissions);
/freebsd-13.1/usr.sbin/cron/cron/
H A Ddatabase.c46 struct stat statbuf; local
67 if (stat(SPOOL_DIR, &statbuf) < OK) {
77 maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime);
176 &statbuf, &new_db, old_db);
251 process_crontab(uname, fname, tabname, statbuf, new_db, old_db) in process_crontab() argument
255 struct stat *statbuf;
279 if (fstat(crontab_fd, statbuf) < OK) {
290 if (u->mtime == statbuf->st_mtime) {
311 u->mtime = statbuf->st_mtime;
/freebsd-13.1/sys/contrib/openzfs/lib/libzutil/os/freebsd/
H A Dzutil_import_os.c106 struct stat64 statbuf; in zpool_open_func() local
136 if (fstat64(fd, &statbuf) != 0) in zpool_open_func()
141 if (S_ISREG(statbuf.st_mode)) { in zpool_open_func()
143 if (statbuf.st_size < SPA_MINDEVSIZE) { in zpool_open_func()
146 } else if (S_ISCHR(statbuf.st_mode) || S_ISBLK(statbuf.st_mode)) { in zpool_open_func()
H A Dzutil_device_path_os.c105 struct stat64 statbuf; in zpool_label_disk_wait() local
112 if ((stat64(path, &statbuf) == 0) && (errno == 0)) { in zpool_label_disk_wait()
/freebsd-13.1/tests/sys/cddl/zfs/tests/exec/
H A Dmmap_exec.c43 struct stat statbuf; in main() local
58 if (fstat(fd, &statbuf) < 0) { in main()
63 if (mmap(0, statbuf.st_size, in main()
/freebsd-13.1/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_exec/
H A Dmmap_exec.c42 struct stat statbuf; in main() local
58 if (fstat(fd, &statbuf) < 0) { in main()
64 if (mmap(0, statbuf.st_size, in main()
/freebsd-13.1/sys/contrib/openzfs/cmd/zvol_id/
H A Dzvol_id_main.c60 struct stat64 statbuf; in main() local
70 ret = stat64(dev_name, &statbuf); in main()
76 dev_minor = minor(statbuf.st_rdev); in main()
/freebsd-13.1/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c106 struct stat64 statbuf; in zpool_open_func() local
131 if (stat64(rn->rn_name, &statbuf) != 0 || in zpool_open_func()
132 (!S_ISREG(statbuf.st_mode) && !S_ISBLK(statbuf.st_mode))) in zpool_open_func()
151 if (S_ISREG(statbuf.st_mode) && statbuf.st_size < SPA_MINDEVSIZE) { in zpool_open_func()
644 struct stat64 statbuf; in zpool_label_disk_wait() local
649 if (stat64(name, &statbuf) == 0 && errno == 0) in zpool_label_disk_wait()
680 struct stat64 statbuf; in zpool_label_disk_wait()
687 if ((stat64(path, &statbuf) == 0) && (errno == 0)) { in zpool_label_disk_wait()
/freebsd-13.1/sys/contrib/openzfs/cmd/zinject/
H A Dtranslate.c85 struct stat64 *statbuf) in parse_pathname() argument
100 if (getextmntent(fullpath, &mp, statbuf) != 0) { in parse_pathname()
222 struct stat64 statbuf; in translate_record() local
267 if (parse_pathname(object, dataset, path, &statbuf) != 0) in translate_record()
276 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
/freebsd-13.1/contrib/llvm-project/compiler-rt/include/sanitizer/
H A Dlinux_syscall_hooks.h477 #define __sanitizer_syscall_pre_stat(filename, statbuf) \ argument
499 #define __sanitizer_syscall_pre_lstat(filename, statbuf) \ argument
503 #define __sanitizer_syscall_pre_fstat(fd, statbuf) \ argument
505 #define __sanitizer_syscall_post_fstat(res, fd, statbuf) \ argument
507 #define __sanitizer_syscall_pre_newstat(filename, statbuf) \ argument
515 #define __sanitizer_syscall_pre_newfstat(fd, statbuf) \ argument
523 #define __sanitizer_syscall_pre_stat64(filename, statbuf) \ argument
527 #define __sanitizer_syscall_pre_fstat64(fd, statbuf) \ argument
2295 long statbuf);
2305 long statbuf);
[all …]
/freebsd-13.1/sys/contrib/openzfs/cmd/zpool/
H A Dzpool_vdev.c199 memset(statbuf, 0, sizeof (*statbuf)); in is_shorthand_path()
276 struct stat64 statbuf; in make_leaf_vdev() local
326 &statbuf, &wholedisk); in make_leaf_vdev()
567 struct stat64 statbuf; in get_replication() local
639 err = fstat64_blk(fd, &statbuf); in get_replication()
642 err = stat64(path, &statbuf); in get_replication()
646 statbuf.st_size == 0 || in get_replication()
647 statbuf.st_size == MAXOFFSET_T) in get_replication()
650 size = statbuf.st_size; in get_replication()
943 struct stat64 statbuf; in make_disks() local
[all …]
/freebsd-13.1/contrib/ncurses/ncurses/tinfo/
H A Dwrite_entry.c191 struct stat statbuf; in make_db_root()
193 if ((rc = stat(path, &statbuf)) < 0) { in make_db_root()
201 } else if (!(S_ISDIR(statbuf.st_mode))) { in make_db_root()
285 struct stat statbuf; in _nc_write_entry()
421 stat(filename, &statbuf) >= 0 in _nc_write_entry()
422 && statbuf.st_mtime >= start_time) { in _nc_write_entry()
430 if (statbuf.st_nlink > 1) { in _nc_write_entry()
445 if (stat(filename, &statbuf) < 0 in _nc_write_entry()
446 || (start_time = statbuf.st_mtime) == 0) { in _nc_write_entry()
475 } else if (stat(linkname, &statbuf) >= 0 && in _nc_write_entry()
[all …]
/freebsd-13.1/sys/contrib/openzfs/lib/libspl/os/linux/
H A Dgetmntany.c106 getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf) argument
123 if (stat64(path, statbuf) != 0) {
146 statbuf->st_dev) {
/freebsd-13.1/sys/contrib/openzfs/lib/libspl/os/freebsd/
H A Dgetmntany.c41 getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf) in getextmntent() argument
50 if (stat64(path, statbuf) != 0) { in getextmntent()
/freebsd-13.1/stand/ficl/
H A Dfileaccess.c152 struct stat statbuf; in ficlFileStatus() local
161 if (stat(filename, &statbuf) == 0) in ficlFileStatus()
168 stackPushINT(pVM->pStack, statbuf.st_mode); in ficlFileStatus()
191 struct stat statbuf; in fileSize() local
192 statbuf.st_size = -1; in fileSize()
193 if (fstat(fileno(f), &statbuf) != 0) in fileSize()
195 return statbuf.st_size; in fileSize()
/freebsd-13.1/contrib/less/
H A Dfilename.c1010 struct stat statbuf; local
1012 r = stat(filename, &statbuf);
1013 isdir = (r >= 0 && S_ISDIR(statbuf.st_mode));
1053 struct stat statbuf; local
1055 r = stat(filename, &statbuf);
1062 } else if (!S_ISREG(statbuf.st_mode))
1084 struct stat statbuf; local
1086 if (fstat(f, &statbuf) >= 0)
1087 return ((POSITION) statbuf.st_size);
/freebsd-13.1/usr.sbin/cron/crontab/
H A Dcrontab.c324 struct stat statbuf, fsbuf; local
374 if (stat(Filename, &statbuf) < 0) {
381 if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino)
448 if (stat(Filename, &statbuf) < 0) {
452 if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino)
/freebsd-13.1/usr.sbin/ypserv/
H A Dyp_access.c319 struct stat statbuf; local
329 if (stat(dompath, &statbuf) < 0 || !S_ISDIR(statbuf.st_mode))
/freebsd-13.1/sys/contrib/openzfs/module/zcommon/
H A Dzfeature_common.c178 struct stat64 statbuf; in zfs_mod_supported_impl() local
179 supported = !!(stat64(path, &statbuf) == 0); in zfs_mod_supported_impl()
205 struct stat64 statbuf; in zfs_mod_supported() local
206 if ((stat64(ZFS_SYSFS_DIR, &statbuf) == 0) && in zfs_mod_supported()
/freebsd-13.1/tools/regression/fsx/
H A Dfsx.c401 struct stat statbuf; in check_size() local
404 if (fstat(fd, &statbuf)) { in check_size()
406 statbuf.st_size = -1; in check_size()
409 if (file_size != statbuf.st_size || file_size != size_by_seek) { in check_size()
412 (unsigned long long)statbuf.st_size, in check_size()
422 struct stat statbuf; in check_trunc_hack() local
426 fstat(fd, &statbuf); in check_trunc_hack()
427 if (statbuf.st_size != (off_t)100000) { in check_trunc_hack()

1234