/freebsd/tests/sys/fs/fusefs/ |
H A D | statfs.cc | 46 struct statfs statbuf; in TEST_F() local 65 struct statfs statbuf; in TEST_F() local 74 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F() 97 struct statfs statbuf; in TEST_F() local 134 struct statfs statbuf; in TEST_F() local 156 EXPECT_EQ(1024ul, statbuf.f_bsize); in TEST_F() 162 EXPECT_EQ(100ul, statbuf.f_bfree); in TEST_F() 163 EXPECT_EQ(200l, statbuf.f_bavail); in TEST_F() 164 EXPECT_EQ(5ul, statbuf.f_files); in TEST_F() 165 EXPECT_EQ(6l, statbuf.f_ffree); in TEST_F() [all …]
|
H A D | mount.cc | 95 struct statfs statbuf; in TEST_F() local 99 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_F() 100 ASSERT_STREQ("http://something", statbuf.f_mntfromname); in TEST_F() 105 struct statfs statbuf; in TEST_F() local 110 ASSERT_STREQ("fusefs.myfs", statbuf.f_fstypename); in TEST_F() 116 struct statfs statbuf; in TEST_P() local 142 newflags = (statbuf.f_flags | MNT_UPDATE) ^ flag; in TEST_P() 150 EXPECT_FALSE((newflags ^ statbuf.f_flags) & flag); in TEST_P() 156 struct statfs statbuf; in TEST_P() local 177 newflags = (statbuf.f_flags | MNT_UPDATE) ^ flag; in TEST_P() [all …]
|
/freebsd/sys/contrib/zstd/programs/ |
H A D | util.c | 137 stat_t statbuf; in UTIL_isRegularFile() local 138 return UTIL_stat(infilename, &statbuf) && UTIL_isRegularFileStat(&statbuf); in UTIL_isRegularFile() 208 stat_t statbuf; in UTIL_isDirectory() local 209 return UTIL_stat(infilename, &statbuf) && UTIL_isDirectoryStat(&statbuf); in UTIL_isDirectory() 250 stat_t statbuf; in UTIL_isFIFO() local 251 if (UTIL_stat(infilename, &statbuf) && UTIL_isFIFOStat(&statbuf)) return 1; in UTIL_isFIFO() 264 (void)statbuf; in UTIL_isFIFOStat() 275 (void)statbuf; in UTIL_isBlockDevStat() 283 stat_t statbuf; in UTIL_isLink() local 293 stat_t statbuf; in UTIL_getFileSize() local [all …]
|
H A D | util.h | 130 int UTIL_stat(const char* filename, stat_t* statbuf); 137 int UTIL_setFileStat(const char* filename, const stat_t* statbuf); 145 int UTIL_utime(const char* filename, const stat_t *statbuf); 152 int UTIL_isRegularFileStat(const stat_t* statbuf); 153 int UTIL_isDirectoryStat(const stat_t* statbuf); 154 int UTIL_isFIFOStat(const stat_t* statbuf); 155 int UTIL_isBlockDevStat(const stat_t* statbuf); 156 U64 UTIL_getFileSizeStat(const stat_t* statbuf); 163 int UTIL_chmod(char const* filename, const stat_t* statbuf, mode_t permissions);
|
/freebsd/tools/test/stress2/testcases/mmap/ |
H A D | mmap.c | 98 struct stat statbuf; in test() local 115 if (fstat(fdin, &statbuf) < 0) in test() 118 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1) in test() 125 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) == in test() 129 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, in test() 133 memcpy(dst, src, statbuf.st_size); in test() 135 if (munmap(src, statbuf.st_size) == -1) in test() 139 if (munmap(dst, statbuf.st_size) == -1) in test()
|
/freebsd/tools/test/stress2/misc/ |
H A D | nfs12.sh | 92 struct stat statbuf; 110 if (fstat(fdin, &statbuf) < 0) 113 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1) 120 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) == 124 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, 128 memcpy(dst, src, statbuf.st_size); 130 if (munmap(src, statbuf.st_size) == -1) 134 if (munmap(dst, statbuf.st_size) == -1)
|
H A D | vunref.sh | 141 struct stat statbuf; 153 if (fstat(fdin, &statbuf) < 0) 156 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1) 163 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) == 167 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, 171 memcpy(dst, src, statbuf.st_size); 173 if (munmap(src, statbuf.st_size) == -1) 177 if (munmap(dst, statbuf.st_size) == -1)
|
H A D | holdcnt02.sh | 129 struct stat statbuf; 141 if (fstat(fd, &statbuf) < 0) 143 if (statbuf.st_size < maxsize) { 165 struct stat statbuf; 182 if (fstat(fd, &statbuf) < 0) 184 if (statbuf.st_size >= maxsize) { 189 len = statbuf.st_size; 194 n = statbuf.st_size / ps;
|
H A D | holdcnt03.sh | 130 struct stat statbuf; 142 if (fstat(fd, &statbuf) < 0) 144 if (statbuf.st_size < maxsize) { 166 struct stat statbuf; 183 if (fstat(fd, &statbuf) < 0) 185 if (statbuf.st_size >= maxsize) { 190 len = statbuf.st_size; 194 n = statbuf.st_size / ps;
|
H A D | holdcnt05.sh | 134 struct stat statbuf; 149 if (fstat(fd, &statbuf) < 0) 151 if (statbuf.st_size < maxsize) { 169 struct stat statbuf; 190 if (fstat(fd, &statbuf) < 0) 192 if (statbuf.st_size >= maxsize) { 197 len = statbuf.st_size; 202 n = statbuf.st_size / ps;
|
H A D | holdcnt0.sh | 145 struct stat statbuf; 160 if (fstat(fd, &statbuf) < 0) 162 if (statbuf.st_size < maxsize) { 180 struct stat statbuf; 201 if (fstat(fd, &statbuf) < 0) 203 if (statbuf.st_size >= maxsize) { 208 len = statbuf.st_size; 213 n = statbuf.st_size / ps;
|
H A D | holdcnt04.sh | 135 struct stat statbuf; 150 if (fstat(fd, &statbuf) < 0) 152 if (statbuf.st_size < maxsize) { 170 struct stat statbuf; 191 if (fstat(fd, &statbuf) < 0) 193 if (statbuf.st_size >= maxsize) { 198 len = statbuf.st_size; 203 n = statbuf.st_size / ps;
|
H A D | nfsdelegation.sh | 103 struct stat statbuf; 129 if (fstat(fdout, &statbuf) < 0) 132 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE | 136 dst[statbuf.st_size] = 1; 139 if (munmap(dst, statbuf.st_size) == -1)
|
/freebsd/sys/contrib/openzfs/lib/libzutil/os/freebsd/ |
H A D | zutil_import_os.c | 106 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()
|
/freebsd/usr.sbin/cron/cron/ |
H A D | database.c | 41 struct stat statbuf, syscron_stat, st; in load_database() local 62 if (stat(SPOOL_DIR, &statbuf) < OK) { in load_database() 72 maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); in load_database() 173 &statbuf, &new_db, old_db); in load_database() 238 struct stat *statbuf, cron_db *new_db, cron_db *old_db) in process_crontab() argument 260 if (fstat(crontab_fd, statbuf) < OK) { in process_crontab() 271 if (u->mtime == statbuf->st_mtime) { in process_crontab() 292 u->mtime = statbuf->st_mtime; in process_crontab()
|
/freebsd/tests/sys/cddl/zfs/tests/exec/ |
H A D | mmap_exec.c | 41 struct stat statbuf; in main() local 56 if (fstat(fd, &statbuf) < 0) { in main() 61 if (mmap(0, statbuf.st_size, in main()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | mmap_exec.c | 42 struct stat statbuf; in main() local 58 if (fstat(fd, &statbuf) < 0) { in main() 64 if (mmap(0, statbuf.st_size, in main()
|
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/ |
H A D | zutil_import_os.c | 106 struct stat64 statbuf; in zpool_open_func() local 120 if (stat64(rn->rn_name, &statbuf) != 0 || in zpool_open_func() 121 (!S_ISREG(statbuf.st_mode) && !S_ISBLK(statbuf.st_mode)) || in zpool_open_func() 122 (S_ISREG(statbuf.st_mode) && statbuf.st_size < SPA_MINDEVSIZE)) in zpool_open_func() 618 struct stat64 statbuf; in zpool_label_disk_wait() local 623 if (stat64(name, &statbuf) == 0 && errno == 0) in zpool_label_disk_wait() 654 struct stat64 statbuf; in zpool_label_disk_wait() 661 if ((stat64(path, &statbuf) == 0) && (errno == 0)) { in zpool_label_disk_wait()
|
/freebsd/contrib/llvm-project/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 478 __sanitizer_syscall_pre_impl_stat((long)(filename), (long)(statbuf)) 504 __sanitizer_syscall_pre_impl_fstat((long)(fd), (long)(statbuf)) 516 __sanitizer_syscall_pre_impl_newfstat((long)(fd), (long)(statbuf)) 528 __sanitizer_syscall_pre_impl_fstat64((long)(fd), (long)(statbuf)) 2298 void __sanitizer_syscall_pre_impl_fstat(long fd, long statbuf); 2302 long statbuf); 2305 long statbuf); 2306 void __sanitizer_syscall_pre_impl_newfstat(long fd, long statbuf); 2312 long statbuf); 2313 void __sanitizer_syscall_pre_impl_fstat64(long fd, long statbuf); [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zpool/ |
H A D | zpool_vdev.c | 198 memset(statbuf, 0, sizeof (*statbuf)); in is_shorthand_path() 275 struct stat64 statbuf; in make_leaf_vdev() local 325 &statbuf, &wholedisk); in make_leaf_vdev() 357 } else if (S_ISREG(statbuf.st_mode)) { in make_leaf_vdev() 575 struct stat64 statbuf; in get_replication() local 647 err = fstat64_blk(fd, &statbuf); in get_replication() 650 err = stat64(path, &statbuf); in get_replication() 654 statbuf.st_size == 0 || in get_replication() 658 size = statbuf.st_size; in get_replication() 971 struct stat64 statbuf; in make_disks() local [all …]
|
/freebsd/contrib/ncurses/ncurses/tinfo/ |
H A D | write_entry.c | 191 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/tests/sys/file/ |
H A D | fspacectl_test.c | 49 struct stat statbuf; in fill() local 52 if (fstat(fd, &statbuf) == -1) in fill() 54 blocksize = statbuf.st_blksize; in fill() 91 struct stat statbuf; in check_content_dealloc() local 171 if (fstat(fd, &statbuf) == -1) in check_content_dealloc() 173 if (statbuf.st_size != file_sz) in check_content_dealloc()
|
/freebsd/sys/contrib/openzfs/cmd/zinject/ |
H A D | translate.c | 85 struct stat64 *statbuf) in parse_pathname() argument 100 if (getextmntent(fullpath, &mp, statbuf) != 0) { in parse_pathname() 223 struct stat64 statbuf; in translate_record() local 268 if (parse_pathname(object, dataset, path, &statbuf) != 0) in translate_record() 277 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
|
/freebsd/sys/contrib/openzfs/lib/libspl/os/linux/ |
H A D | getmntany.c | 107 getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf) in getextmntent() argument 124 if (stat64(path, statbuf) != 0) { in getextmntent() 143 statbuf->st_dev) { in getextmntent()
|
/freebsd/sys/contrib/openzfs/lib/libspl/os/freebsd/ |
H A D | getmntany.c | 42 getextmntent(const char *path, struct extmnttab *entry, struct stat64 *statbuf) in getextmntent() argument 51 if (stat64(path, statbuf) != 0) { in getextmntent()
|