/freebsd/tests/sys/fs/fusefs/ |
H A D | statfs.cc | 46 struct statfs statbuf; in TEST_F() local 55 ASSERT_NE(0, statfs("mountpoint", &statbuf)); in TEST_F() 65 struct statfs statbuf; in TEST_F() local 72 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_F() 74 EXPECT_EQ(getuid(), statbuf.f_owner); in TEST_F() 75 EXPECT_EQ(0, strcmp("fusefs", statbuf.f_fstypename)); in TEST_F() 76 EXPECT_EQ(0, strcmp("/dev/fuse", statbuf.f_mntfromname)); in TEST_F() 77 EXPECT_EQ(0, strcmp(mp, statbuf.f_mntonname)); in TEST_F() 97 struct statfs statbuf; in TEST_F() local 117 ASSERT_EQ(0, pthread_create(&th0, NULL, statfs_th, (void*)&statbuf)) 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 109 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_F() 110 ASSERT_STREQ("fusefs.myfs", statbuf.f_fstypename); in TEST_F() 116 struct statfs statbuf; in TEST_P() local 141 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_P() 142 newflags = (statbuf.f_flags | MNT_UPDATE) ^ flag; in TEST_P() 144 build_iovec(&iov, &iovlen, "fstype", (void*)statbuf.f_fstypename, -1); in TEST_P() [all …]
|
/freebsd/sys/contrib/zstd/programs/ |
H A D | util.c | 124 int UTIL_stat(const char* filename, stat_t* statbuf) in UTIL_stat() argument 127 return !_stat64(filename, statbuf); in UTIL_stat() 129 return !_stati64(filename, statbuf); in UTIL_stat() 131 return !stat(filename, statbuf); in UTIL_stat() 137 stat_t statbuf; in UTIL_isRegularFile() local 138 return UTIL_stat(infilename, &statbuf) && UTIL_isRegularFileStat(&statbuf); in UTIL_isRegularFile() 141 int UTIL_isRegularFileStat(const stat_t* statbuf) in UTIL_isRegularFileStat() argument 144 return (statbuf->st_mode & S_IFREG) != 0; in UTIL_isRegularFileStat() 146 return S_ISREG(statbuf->st_mode) != 0; in UTIL_isRegularFileStat() 151 int UTIL_chmod(char const* filename, const stat_t* statbuf, mode_t permissions) in UTIL_chmod() argument [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 | 477 #define __sanitizer_syscall_pre_stat(filename, statbuf) \ argument 478 __sanitizer_syscall_pre_impl_stat((long)(filename), (long)(statbuf)) 479 #define __sanitizer_syscall_post_stat(res, filename, statbuf) \ argument 480 __sanitizer_syscall_post_impl_stat(res, (long)(filename), (long)(statbuf)) 499 #define __sanitizer_syscall_pre_lstat(filename, statbuf) \ argument 500 __sanitizer_syscall_pre_impl_lstat((long)(filename), (long)(statbuf)) 501 #define __sanitizer_syscall_post_lstat(res, filename, statbuf) \ argument 502 __sanitizer_syscall_post_impl_lstat(res, (long)(filename), (long)(statbuf)) 503 #define __sanitizer_syscall_pre_fstat(fd, statbuf) \ argument 504 __sanitizer_syscall_pre_impl_fstat((long)(fd), (long)(statbuf)) [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zpool/ |
H A D | zpool_vdev.c | 186 struct stat64 *statbuf, boolean_t *wholedisk) in is_shorthand_path() argument 193 if (*wholedisk || (stat64(path, statbuf) == 0)) in is_shorthand_path() 198 memset(statbuf, 0, sizeof (*statbuf)); in is_shorthand_path() 275 struct stat64 statbuf; in make_leaf_vdev() local 303 if (!wholedisk && (stat64(path, &statbuf) != 0)) { in make_leaf_vdev() 325 &statbuf, &wholedisk); in make_leaf_vdev() 355 if (wholedisk || S_ISBLK(statbuf.st_mode)) { 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() [all …]
|
/freebsd/contrib/ncurses/ncurses/tinfo/ |
H A D | write_entry.c | 199 struct stat statbuf; in make_db_root() 201 if ((rc = stat(path, &statbuf)) == -1) { in make_db_root() 209 } else if (!(S_ISDIR(statbuf.st_mode))) { in make_db_root() 297 struct stat statbuf; in _nc_write_entry() 434 stat(filename, &statbuf) >= 0 in _nc_write_entry() 435 && statbuf.st_mtime >= start_time) { in _nc_write_entry() 443 if (statbuf.st_nlink > 1) { in _nc_write_entry() 458 if (stat(filename, &statbuf) == -1 in _nc_write_entry() 459 || (start_time = statbuf.st_mtime) == 0) { in _nc_write_entry() 490 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/stand/ficl/ |
H A D | fileaccess.c | 151 struct stat statbuf; in ficlFileStatus() local 160 if (stat(filename, &statbuf) == 0) in ficlFileStatus() 167 stackPushINT(pVM->pStack, statbuf.st_mode); in ficlFileStatus() 190 struct stat statbuf; in fileSize() local 191 statbuf.st_size = -1; in fileSize() 192 if (fstat(fileno(f), &statbuf) != 0) in fileSize() 194 return statbuf.st_size; in fileSize()
|