Home
last modified time | relevance | path

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

1234

/freebsd/tests/sys/fs/fusefs/
H A Dstatfs.cc46 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 Dmount.cc95 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 …]
H A Ddestroy.cc61 struct statfs statbuf; in assert_unmounted() local
64 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in assert_unmounted()
65 if (strcmp("fusefs", statbuf.f_fstypename) != 0 && in assert_unmounted()
66 strcmp("/dev/fuse", statbuf.f_mntfromname) != 0) in assert_unmounted()
105 struct statfs statbuf; in TEST_F() local
127 ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno); in TEST_F()
128 EXPECT_EQ(0, strcmp("fusefs", statbuf.f_fstypename)); in TEST_F()
129 EXPECT_EQ(0, strcmp("/dev/fuse", statbuf.f_mntfromname)); in TEST_F()
/freebsd/sys/contrib/zstd/programs/
H A Dutil.c167 int UTIL_fstat(const int fd, const char* filename, stat_t* statbuf) in UTIL_fstat() argument
173 ret = !_fstat64(fd, statbuf); in UTIL_fstat()
175 ret = !_stat64(filename, statbuf); in UTIL_fstat()
179 ret = !_fstati64(fd, statbuf); in UTIL_fstat()
181 ret = !_stati64(filename, statbuf); in UTIL_fstat()
185 ret = !fstat(fd, statbuf); in UTIL_fstat()
187 ret = !stat(filename, statbuf); in UTIL_fstat()
194 int UTIL_stat(const char* filename, stat_t* statbuf) in UTIL_stat() argument
196 return UTIL_fstat(-1, filename, statbuf); in UTIL_stat()
201 stat_t statbuf; in UTIL_isRegularFile() local
[all …]
H A Dutil.h137 int UTIL_stat(const char* filename, stat_t* statbuf);
138 int UTIL_fstat(const int fd, const char* filename, stat_t* statbuf);
149 int UTIL_setFileStat(const char* filename, const stat_t* statbuf);
150 int UTIL_setFDStat(const int fd, const char* filename, const stat_t* statbuf);
158 int UTIL_utime(const char* filename, const stat_t *statbuf);
165 int UTIL_isRegularFileStat(const stat_t* statbuf);
166 int UTIL_isDirectoryStat(const stat_t* statbuf);
167 int UTIL_isFIFOStat(const stat_t* statbuf);
168 int UTIL_isBlockDevStat(const stat_t* statbuf);
169 U64 UTIL_getFileSizeStat(const stat_t* statbuf);
[all …]
/freebsd/tools/test/stress2/testcases/mmap/
H A Dmmap.c98 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 Dnfs12.sh92 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 Dvunref.sh141 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 Dholdcnt02.sh129 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 Dholdcnt03.sh130 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 Dholdcnt05.sh134 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 Dholdcnt0.sh145 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 Dholdcnt04.sh135 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 Dnfsdelegation.sh103 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 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()
/freebsd/usr.sbin/cron/cron/
H A Ddatabase.c41 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()
175 &statbuf, &new_db, old_db); in load_database()
240 struct stat *statbuf, cron_db *new_db, cron_db *old_db) in process_crontab() argument
262 if (fstat(crontab_fd, statbuf) < OK) { in process_crontab()
273 if (u->mtime == statbuf->st_mtime) { in process_crontab()
294 u->mtime = statbuf->st_mtime; in process_crontab()
/freebsd/tests/sys/cddl/zfs/tests/exec/
H A Dmmap_exec.c41 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 Dmmap_exec.c43 struct stat statbuf; in main() local
59 if (fstat(fd, &statbuf) < 0) { in main()
65 if (mmap(0, statbuf.st_size, in main()
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c106 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 Dlinux_syscall_hooks.h477 #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/tests/sys/file/
H A Dfspacectl_test.c49 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 Dtranslate.c86 struct stat64 *statbuf) in parse_pathname() argument
101 if (getextmntent(fullpath, &mp, statbuf) != 0) { in parse_pathname()
235 struct stat64 statbuf; in translate_record() local
280 if (parse_pathname(object, dataset, path, &statbuf) != 0) in translate_record()
289 if (object_from_path(dataset, statbuf.st_ino, record) != 0) in translate_record()
/freebsd/crypto/krb5/src/lib/krb5/rcache/
H A Drc_dfl.c89 struct stat statbuf; in open_file() local
111 if (fstat(fd, &statbuf) < 0 || statbuf.st_uid != euid) { in open_file()
/freebsd/sys/contrib/openzfs/lib/libspl/os/linux/
H A Dmnttab.c97 getextmntent(const char *path, struct mnttab *entry, struct stat64 *statbuf) in getextmntent() argument
121 if (stat64(path, statbuf) != 0) { in getextmntent()
156 match = (dev == statbuf->st_dev); in getextmntent()
/freebsd/stand/ficl/
H A Dfileaccess.c151 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()

1234