Home
last modified time | relevance | path

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

12

/f-stack/freebsd/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);
H A Dfileio.c567 stat_t statbuf; in FIO_removeFile() local
568 if (!UTIL_stat(path, &statbuf)) { in FIO_removeFile()
572 if (!UTIL_isRegularFileStat(&statbuf)) { in FIO_removeFile()
579 if (!(statbuf.st_mode & _S_IWRITE)) { in FIO_removeFile()
580 UTIL_chmod(path, &statbuf, _S_IWRITE); in FIO_removeFile()
591 stat_t statbuf; in FIO_openSrcFile() local
599 if (!UTIL_stat(srcFileName, &statbuf)) { in FIO_openSrcFile()
605 if (!UTIL_isRegularFileStat(&statbuf) in FIO_openSrcFile()
606 && !UTIL_isFIFOStat(&statbuf) in FIO_openSrcFile()
1595 stat_t statbuf; in FIO_compressFilename_dstFile() local
[all …]
/f-stack/freebsd/contrib/openzfs/lib/libzutil/os/freebsd/
H A Dzutil_import_os.c103 struct stat64 statbuf; in zpool_open_func() local
133 if (fstat64(fd, &statbuf) != 0) in zpool_open_func()
138 if (S_ISREG(statbuf.st_mode)) { in zpool_open_func()
140 if (statbuf.st_size < SPA_MINDEVSIZE) { in zpool_open_func()
143 } 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()
/f-stack/dpdk/drivers/common/dpaax/
H A Ddpaax_iova_table.c61 struct stat statbuf = {0}; in read_memory_node() local
96 ret = fstat(fd, &statbuf); in read_memory_node()
102 DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size); in read_memory_node()
103 if (statbuf.st_size > MEM_NODE_FILE_LEN) { in read_memory_node()
108 ret = read(fd, file_data, statbuf.st_size > MEM_NODE_FILE_LEN ? in read_memory_node()
109 MEM_NODE_FILE_LEN : statbuf.st_size); in read_memory_node()
119 *count = (statbuf.st_size / 16); in read_memory_node()
120 if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) { in read_memory_node()
122 statbuf.st_size); in read_memory_node()
134 for (i = 0, j = 0; i < (statbuf.st_size) && j < (*count); i += 16, j++) { in read_memory_node()
/f-stack/freebsd/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()
/f-stack/freebsd/contrib/openzfs/cmd/zvol_id/
H A Dzvol_id_main.c60 struct stat64 statbuf; in main() local
71 error = stat64(dev_name, &statbuf); in main()
77 dev_minor = minor(statbuf.st_rdev); in main()
/f-stack/freebsd/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()
/f-stack/freebsd/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()
/f-stack/freebsd/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()
/f-stack/freebsd/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) {
/f-stack/freebsd/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 …]
/f-stack/freebsd/contrib/openzfs/module/zcommon/
H A Dzfeature_common.c176 struct stat64 statbuf; in zfs_mod_supported_impl() local
177 supported = !!(stat64(path, &statbuf) == 0); in zfs_mod_supported_impl()
203 struct stat64 statbuf; in zfs_mod_supported() local
204 if ((stat64(ZFS_SYSFS_DIR, &statbuf) == 0) && in zfs_mod_supported()
/f-stack/freebsd/contrib/openzfs/lib/libshare/os/linux/
H A Dsmb.c434 struct stat statbuf; in smb_available() local
436 if (lstat(SHARE_DIR, &statbuf) != 0 || in smb_available()
437 !S_ISDIR(statbuf.st_mode)) in smb_available()
/f-stack/freebsd/contrib/openzfs/lib/libzfs/
H A Dlibzfs_import.c146 struct stat64 statbuf; in zpool_clear_label() local
154 if (fstat64_blk(fd, &statbuf) == -1) in zpool_clear_label()
157 size = P2ALIGN_TYPED(statbuf.st_size, sizeof (vdev_label_t), uint64_t); in zpool_clear_label()
H A Dlibzfs_dataset.c2324 char *statbuf, size_t statlen) in get_source() argument
2326 if (statbuf == NULL || in get_source()
2341 (void) strlcpy(statbuf, source, statlen); in get_source()
2606 zprop_source_t *src, char *statbuf, size_t statlen, boolean_t literal) in zfs_prop_get() argument
2969 get_source(zhp, src, source, statbuf, statlen); in zfs_prop_get()
3004 zprop_source_t *src, char *statbuf, size_t statlen) in zfs_prop_get_numeric() argument
3023 get_source(zhp, src, source, statbuf, statlen); in zfs_prop_get_numeric()
H A Dlibzfs_util.c1136 struct stat64 statbuf; local
1150 if (getextmntent(path, &entry, &statbuf) != 0)
/f-stack/freebsd/contrib/openzfs/lib/libspl/include/os/linux/sys/
H A Dmnttab.h76 struct stat64 *statbuf);
/f-stack/freebsd/contrib/openzfs/lib/libzutil/
H A Dzutil_import.c889 struct stat64 statbuf; in zpool_read_label() local
898 if (fstat64_blk(fd, &statbuf) == -1) in zpool_read_label()
900 size = P2ALIGN_TYPED(statbuf.st_size, sizeof (vdev_label_t), uint64_t); in zpool_read_label()
1381 struct stat64 statbuf; in zpool_find_import_cached() local
1398 if (fstat64(fd, &statbuf) != 0) { in zpool_find_import_cached()
1406 if ((buf = zutil_alloc(hdl, statbuf.st_size)) == NULL) { in zpool_find_import_cached()
1411 if (read(fd, buf, statbuf.st_size) != statbuf.st_size) { in zpool_find_import_cached()
1422 if (nvlist_unpack(buf, statbuf.st_size, &raw, 0) != 0) { in zpool_find_import_cached()
/f-stack/freebsd/contrib/openzfs/lib/libspl/include/os/freebsd/sys/
H A Dmnttab.h80 struct stat64 *statbuf);
/f-stack/freebsd/amd64/include/
H A Dvmm_dev.h174 uint64_t statbuf[MAX_VM_STATS]; member
/f-stack/freebsd/contrib/openzfs/cmd/zdb/
H A Dzdb.c3880 struct stat64 statbuf; in dump_cachefile() local
3890 if (fstat64(fd, &statbuf) != 0) { in dump_cachefile()
3896 if ((buf = malloc(statbuf.st_size)) == NULL) { in dump_cachefile()
3898 (u_longlong_t)statbuf.st_size); in dump_cachefile()
3902 if (read(fd, buf, statbuf.st_size) != statbuf.st_size) { in dump_cachefile()
3904 (u_longlong_t)statbuf.st_size); in dump_cachefile()
4593 struct stat64 statbuf; in dump_label() local
4610 if (dev[0] != '/' && stat64(path, &statbuf) != 0) { in dump_label()
4619 if (error || (stat64(path, &statbuf) != 0)) { in dump_label()
4631 if (fstat64_blk(fd, &statbuf) != 0) { in dump_label()
[all …]
/f-stack/freebsd/arm/linux/
H A Dlinux_systrace_args.c1191 uarg[1] = (intptr_t) p->statbuf; /* struct l_stat64 * */ in systrace_args()
1199 uarg[1] = (intptr_t) p->statbuf; /* struct l_stat64 * */ in systrace_args()
1207 uarg[1] = (intptr_t) p->statbuf; /* struct l_stat64 * */ in systrace_args()
2118 uarg[2] = (intptr_t) p->statbuf; /* struct l_stat64 * */ in systrace_args()
H A Dlinux_proto.h542 …char statbuf_l_[PADL_(struct l_stat64 *)]; struct l_stat64 * statbuf; char statbuf_r_[PADR_(struct… member
546 …char statbuf_l_[PADL_(struct l_stat64 *)]; struct l_stat64 * statbuf; char statbuf_r_[PADR_(struct… member
550 …char statbuf_l_[PADL_(struct l_stat64 *)]; struct l_stat64 * statbuf; char statbuf_r_[PADR_(struct… member
1015 …char statbuf_l_[PADL_(struct l_stat64 *)]; struct l_stat64 * statbuf; char statbuf_r_[PADR_(struct… member

12