Home
last modified time | relevance | path

Searched refs:stbuf (Results 1 – 25 of 59) sorted by relevance

123

/third_party/ntfs-3g/libfuse-lite/
Dfuse_misc.h27 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec) argument
28 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctim.tv_nsec) argument
29 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec) argument
30 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val) argument
31 #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val) argument
34 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atimespec.tv_nsec) argument
35 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctimespec.tv_nsec) argument
36 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtimespec.tv_nsec) argument
37 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atimespec.tv_nsec = (val) argument
38 #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtimespec.tv_nsec = (val) argument
[all …]
Dfuse_lowlevel.c75 static void convert_stat(const struct stat *stbuf, struct fuse_attr *attr) in convert_stat() argument
77 attr->ino = stbuf->st_ino; in convert_stat()
78 attr->mode = stbuf->st_mode; in convert_stat()
79 attr->nlink = stbuf->st_nlink; in convert_stat()
80 attr->uid = stbuf->st_uid; in convert_stat()
81 attr->gid = stbuf->st_gid; in convert_stat()
84 attr->rdev = ((major(stbuf->st_rdev) & 0x3fff) << 18) in convert_stat()
85 | (minor(stbuf->st_rdev) & 0x3ffff); in convert_stat()
87 attr->rdev = stbuf->st_rdev; in convert_stat()
89 attr->size = stbuf->st_size; in convert_stat()
[all …]
Dfusermount.c468 static int check_perm(const char **mntp, struct stat *stbuf, int *currdir_fd, in check_perm() argument
475 res = stat(mnt, stbuf); in check_perm()
486 if (S_ISDIR(stbuf->st_mode)) { in check_perm()
500 res = lstat(mnt, stbuf); in check_perm()
507 if ((stbuf->st_mode & S_ISVTX) && stbuf->st_uid != getuid()) { in check_perm()
519 } else if (S_ISREG(stbuf->st_mode)) { in check_perm()
527 res = fstat(*mountpoint_fd, stbuf); in check_perm()
533 if (!S_ISREG(stbuf->st_mode)) { in check_perm()
598 struct stat stbuf; in mount_fuse() local
618 res = check_perm(&real_mnt, &stbuf, &currdir_fd, &mountpoint_fd); in mount_fuse()
[all …]
/third_party/libfuse/lib/
Dfuse_misc.h30 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec) argument
31 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctim.tv_nsec) argument
32 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec) argument
33 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val) argument
34 #define ST_CTIM_NSEC_SET(stbuf, val) (stbuf)->st_ctim.tv_nsec = (val) argument
35 #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val) argument
38 #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atimespec.tv_nsec) argument
39 #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctimespec.tv_nsec) argument
40 #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtimespec.tv_nsec) argument
41 #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atimespec.tv_nsec = (val) argument
[all …]
/third_party/libfuse/example/
Dnull.c36 static int null_getattr(const char *path, struct stat *stbuf, in null_getattr() argument
44 stbuf->st_mode = S_IFREG | 0644; in null_getattr()
45 stbuf->st_nlink = 1; in null_getattr()
46 stbuf->st_uid = getuid(); in null_getattr()
47 stbuf->st_gid = getgid(); in null_getattr()
48 stbuf->st_size = (1ULL << 32); /* 4G */ in null_getattr()
49 stbuf->st_blocks = 0; in null_getattr()
50 stbuf->st_atime = stbuf->st_mtime = stbuf->st_ctime = time(NULL); in null_getattr()
119 struct stat stbuf; in main() local
130 if (stat(opts.mountpoint, &stbuf) == -1) { in main()
[all …]
Dhello_ll.c35 static int hello_stat(fuse_ino_t ino, struct stat *stbuf) in hello_stat() argument
37 stbuf->st_ino = ino; in hello_stat()
40 stbuf->st_mode = S_IFDIR | 0755; in hello_stat()
41 stbuf->st_nlink = 2; in hello_stat()
45 stbuf->st_mode = S_IFREG | 0444; in hello_stat()
46 stbuf->st_nlink = 1; in hello_stat()
47 stbuf->st_size = strlen(hello_str); in hello_stat()
59 struct stat stbuf; in hello_ll_getattr() local
63 memset(&stbuf, 0, sizeof(stbuf)); in hello_ll_getattr()
64 if (hello_stat(ino, &stbuf) == -1) in hello_ll_getattr()
[all …]
Dnotify_inval_entry.c124 static int tfs_stat(fuse_ino_t ino, struct stat *stbuf) { in tfs_stat() argument
125 stbuf->st_ino = ino; in tfs_stat()
127 stbuf->st_mode = S_IFDIR | 0755; in tfs_stat()
128 stbuf->st_nlink = 1; in tfs_stat()
132 stbuf->st_mode = S_IFREG | 0000; in tfs_stat()
133 stbuf->st_nlink = 1; in tfs_stat()
134 stbuf->st_size = 0; in tfs_stat()
179 struct stat stbuf; in tfs_getattr() local
183 memset(&stbuf, 0, sizeof(stbuf)); in tfs_getattr()
184 if (tfs_stat(ino, &stbuf) != 0) in tfs_getattr()
[all …]
Dnotify_inval_inode.c104 static int tfs_stat(fuse_ino_t ino, struct stat *stbuf) { in tfs_stat() argument
105 stbuf->st_ino = ino; in tfs_stat()
107 stbuf->st_mode = S_IFDIR | 0755; in tfs_stat()
108 stbuf->st_nlink = 1; in tfs_stat()
112 stbuf->st_mode = S_IFREG | 0444; in tfs_stat()
113 stbuf->st_nlink = 1; in tfs_stat()
114 stbuf->st_size = file_size; in tfs_stat()
159 struct stat stbuf; in tfs_getattr() local
163 memset(&stbuf, 0, sizeof(stbuf)); in tfs_getattr()
164 if (tfs_stat(ino, &stbuf) != 0) in tfs_getattr()
[all …]
Dhello_ll_uds.c45 static int hello_stat(fuse_ino_t ino, struct stat *stbuf) in hello_stat() argument
47 stbuf->st_ino = ino; in hello_stat()
50 stbuf->st_mode = S_IFDIR | 0755; in hello_stat()
51 stbuf->st_nlink = 2; in hello_stat()
55 stbuf->st_mode = S_IFREG | 0444; in hello_stat()
56 stbuf->st_nlink = 1; in hello_stat()
57 stbuf->st_size = strlen(hello_str); in hello_stat()
69 struct stat stbuf; in hello_ll_getattr() local
73 memset(&stbuf, 0, sizeof(stbuf)); in hello_ll_getattr()
74 if (hello_stat(ino, &stbuf) == -1) in hello_ll_getattr()
[all …]
Dnotify_store_retrieve.c107 static int tfs_stat(fuse_ino_t ino, struct stat *stbuf) { in tfs_stat() argument
108 stbuf->st_ino = ino; in tfs_stat()
110 stbuf->st_mode = S_IFDIR | 0755; in tfs_stat()
111 stbuf->st_nlink = 1; in tfs_stat()
115 stbuf->st_mode = S_IFREG | 0444; in tfs_stat()
116 stbuf->st_nlink = 1; in tfs_stat()
117 stbuf->st_size = file_size; in tfs_stat()
162 struct stat stbuf; in tfs_getattr() local
166 memset(&stbuf, 0, sizeof(stbuf)); in tfs_getattr()
167 if (tfs_stat(ino, &stbuf) != 0) in tfs_getattr()
[all …]
Dioctl.c84 static int fioc_getattr(const char *path, struct stat *stbuf, in fioc_getattr() argument
88 stbuf->st_uid = getuid(); in fioc_getattr()
89 stbuf->st_gid = getgid(); in fioc_getattr()
90 stbuf->st_atime = stbuf->st_mtime = time(NULL); in fioc_getattr()
94 stbuf->st_mode = S_IFDIR | 0755; in fioc_getattr()
95 stbuf->st_nlink = 2; in fioc_getattr()
98 stbuf->st_mode = S_IFREG | 0644; in fioc_getattr()
99 stbuf->st_nlink = 1; in fioc_getattr()
100 stbuf->st_size = fioc_size; in fioc_getattr()
Dinvalidate_path.c84 struct stat *stbuf, struct fuse_file_info* fi) { in xmp_getattr() argument
87 stbuf->st_ino = 1; in xmp_getattr()
88 stbuf->st_mode = S_IFDIR | 0755; in xmp_getattr()
89 stbuf->st_nlink = 1; in xmp_getattr()
91 stbuf->st_ino = TIME_FILE_INO; in xmp_getattr()
92 stbuf->st_mode = S_IFREG | 0444; in xmp_getattr()
93 stbuf->st_nlink = 1; in xmp_getattr()
94 stbuf->st_size = strlen(time_file_contents); in xmp_getattr()
96 stbuf->st_ino = GROW_FILE_INO; in xmp_getattr()
97 stbuf->st_mode = S_IFREG | 0444; in xmp_getattr()
[all …]
Dhello.c63 static int hello_getattr(const char *path, struct stat *stbuf, in hello_getattr() argument
69 memset(stbuf, 0, sizeof(struct stat)); in hello_getattr()
71 stbuf->st_mode = S_IFDIR | 0755; in hello_getattr()
72 stbuf->st_nlink = 2; in hello_getattr()
74 stbuf->st_mode = S_IFREG | 0444; in hello_getattr()
75 stbuf->st_nlink = 1; in hello_getattr()
76 stbuf->st_size = strlen(options.contents); in hello_getattr()
Dpoll.c64 static int fsel_getattr(const char *path, struct stat *stbuf, in fsel_getattr() argument
70 memset(stbuf, 0, sizeof(struct stat)); in fsel_getattr()
73 stbuf->st_mode = S_IFDIR | 0555; in fsel_getattr()
74 stbuf->st_nlink = 2; in fsel_getattr()
82 stbuf->st_mode = S_IFREG | 0444; in fsel_getattr()
83 stbuf->st_nlink = 1; in fsel_getattr()
84 stbuf->st_size = fsel_cnt[idx]; in fsel_getattr()
/third_party/libfuse/test/
Dtest_setattr.c36 static int tfs_stat(fuse_ino_t ino, struct stat *stbuf) { in tfs_stat() argument
37 stbuf->st_ino = ino; in tfs_stat()
39 stbuf->st_mode = S_IFDIR | 0755; in tfs_stat()
40 stbuf->st_nlink = 1; in tfs_stat()
44 stbuf->st_mode = file_mode; in tfs_stat()
45 stbuf->st_nlink = 1; in tfs_stat()
46 stbuf->st_size = 0; in tfs_stat()
78 struct stat stbuf; in tfs_getattr() local
82 memset(&stbuf, 0, sizeof(stbuf)); in tfs_getattr()
83 if (tfs_stat(ino, &stbuf) != 0) in tfs_getattr()
[all …]
Dtest_write_cache.c69 static int tfs_stat(fuse_ino_t ino, struct stat *stbuf) { in tfs_stat() argument
70 stbuf->st_ino = ino; in tfs_stat()
72 stbuf->st_mode = S_IFDIR | 0755; in tfs_stat()
73 stbuf->st_nlink = 1; in tfs_stat()
77 stbuf->st_mode = S_IFREG | 0222; in tfs_stat()
78 stbuf->st_nlink = 1; in tfs_stat()
79 stbuf->st_size = 0; in tfs_stat()
111 struct stat stbuf; in tfs_getattr() local
115 memset(&stbuf, 0, sizeof(stbuf)); in tfs_getattr()
116 if (tfs_stat(ino, &stbuf) != 0) in tfs_getattr()
[all …]
Dtest_syscalls.c140 struct stat stbuf; in check_size() local
141 int res = stat(path, &stbuf); in check_size()
146 return st_check_size(&stbuf, len); in check_size()
166 struct stat stbuf; in check_type() local
167 int res = lstat(path, &stbuf); in check_type()
172 return st_check_type(&stbuf, type); in check_type()
187 struct stat stbuf; in check_mode() local
188 int res = lstat(path, &stbuf); in check_mode()
193 return st_check_mode(&stbuf, mode); in check_mode()
206 struct stat stbuf; in check_times() local
[all …]
Drelease_unlink_race.c31 static int xmp_getattr(const char *path, struct stat *stbuf, in xmp_getattr() argument
39 res = fstat(fi->fh, stbuf); in xmp_getattr()
41 res = lstat(path, stbuf); in xmp_getattr()
/third_party/ntfs-3g/src/
Dlowntfs-3g.c418 struct stat stbuf; in ntfs_allowed_dir_access() local
433 allowed = (ntfs_get_owner_mode(scx,ni2,&stbuf) >= 0) in ntfs_allowed_dir_access()
434 && (stbuf.st_uid == scx->uid); in ntfs_allowed_dir_access()
654 struct stat *stbuf) in junction_getstat() argument
668 stbuf->st_size = strlen(target); in junction_getstat()
670 stbuf->st_size = ntfs_bad_reparse_lth; in junction_getstat()
671 stbuf->st_blocks = (ni->allocated_size + 511) >> 9; in junction_getstat()
672 stbuf->st_mode = S_IFLNK; in junction_getstat()
682 struct stat *stbuf) in wsl_getstat() argument
691 stbuf->st_mode = S_IFSOCK; in wsl_getstat()
[all …]
Dntfs-3g.c337 struct stat stbuf; in ntfs_allowed_dir_access() local
381 allowed = (ntfs_get_owner_mode(scx,ni2,&stbuf) in ntfs_allowed_dir_access()
383 && (stbuf.st_uid == scx->uid); in ntfs_allowed_dir_access()
712 struct stat *stbuf) in junction_getattr() argument
726 stbuf->st_size = strlen(target); in junction_getattr()
728 stbuf->st_size = ntfs_bad_reparse_lth; in junction_getattr()
729 stbuf->st_blocks = (ni->allocated_size + 511) >> 9; in junction_getattr()
730 stbuf->st_mode = S_IFLNK; in junction_getattr()
740 struct stat *stbuf) in wsl_getattr() argument
749 stbuf->st_mode = S_IFSOCK; in wsl_getattr()
[all …]
/third_party/skia/third_party/externals/libjpeg-turbo/md5/
Dmd5hl.c87 struct stat stbuf; in MD5FileChunk() local
99 if (fstat(f, &stbuf) < 0) in MD5FileChunk()
101 if (ofs > stbuf.st_size) in MD5FileChunk()
102 ofs = stbuf.st_size; in MD5FileChunk()
103 if ((len == 0) || (len > stbuf.st_size - ofs)) in MD5FileChunk()
104 len = stbuf.st_size - ofs; in MD5FileChunk()
/third_party/libexif/test/
Dtest-parse-from-data.c91 struct stat stbuf; in test_parse() local
107 if (-1 == fstat(fd, &stbuf)) { in test_parse()
111 data = malloc(stbuf.st_size); in test_parse()
113 fprintf (stderr, "Failed to allocate %ld bytes for reading %s\n", stbuf.st_size, filename); in test_parse()
116 if (-1 == read(fd, data, stbuf.st_size)) { in test_parse()
124 d = exif_data_new_from_data(data, stbuf.st_size); in test_parse()
Dtest-fuzzer.c112 struct stat stbuf; in test_parse() local
140 if (-1 == stat(filename,&stbuf)) in test_parse()
145 buf = malloc(stbuf.st_size); in test_parse()
146 fread (buf, stbuf.st_size, 1, f); in test_parse()
149 exif_loader_write(loader, buf, stbuf.st_size); in test_parse()
/third_party/ltp/testcases/kernel/uevents/
Duevent03.c40 struct stat stbuf; in get_minor_major() local
44 SAFE_STAT(path, &stbuf); in get_minor_major()
46 snprintf(major, buf_sizes, "MAJOR=%i", major(stbuf.st_rdev)); in get_minor_major()
47 snprintf(minor, buf_sizes, "MINOR=%i", minor(stbuf.st_rdev)); in get_minor_major()
/third_party/mesa3d/src/mesa/state_tracker/
Dst_atom_image.c90 struct gl_buffer_object *stbuf = stObj->BufferObject; in st_convert_image() local
93 if (!stbuf || !stbuf->buffer) { in st_convert_image()
97 struct pipe_resource *buf = stbuf->buffer; in st_convert_image()
103 img->resource = stbuf->buffer; in st_convert_image()

123