Lines Matching refs:stbuf

75 static void convert_stat(const struct stat *stbuf, struct fuse_attr *attr)
77 attr->ino = stbuf->st_ino;
78 attr->mode = stbuf->st_mode;
79 attr->nlink = stbuf->st_nlink;
80 attr->uid = stbuf->st_uid;
81 attr->gid = stbuf->st_gid;
84 attr->rdev = ((major(stbuf->st_rdev) & 0x3fff) << 18)
85 | (minor(stbuf->st_rdev) & 0x3ffff);
87 attr->rdev = stbuf->st_rdev;
89 attr->size = stbuf->st_size;
90 attr->blocks = stbuf->st_blocks;
91 attr->atime = stbuf->st_atime;
92 attr->mtime = stbuf->st_mtime;
93 attr->ctime = stbuf->st_ctime;
94 attr->atimensec = ST_ATIM_NSEC(stbuf);
95 attr->mtimensec = ST_MTIM_NSEC(stbuf);
96 attr->ctimensec = ST_CTIM_NSEC(stbuf);
102 static void convert_attr(const struct fuse_setattr_in *attr, struct stat *stbuf)
104 stbuf->st_mode = attr->mode;
105 stbuf->st_uid = attr->uid;
106 stbuf->st_gid = attr->gid;
107 stbuf->st_size = attr->size;
108 stbuf->st_atime = attr->atime;
109 stbuf->st_mtime = attr->mtime;
110 ST_ATIM_NSEC_SET(stbuf, attr->atimensec);
111 ST_MTIM_NSEC_SET(stbuf, attr->mtimensec);
237 char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
246 dirent->ino = stbuf->st_ino;
249 dirent->type = (stbuf->st_mode & 0170000) >> 12;
258 const char *name, const struct stat *stbuf, off_t off)
265 fuse_add_dirent(buf, name, stbuf, off);
269 static void convert_statfs(const struct statvfs *stbuf,
272 kstatfs->bsize = stbuf->f_bsize;
273 kstatfs->frsize = stbuf->f_frsize;
274 kstatfs->blocks = stbuf->f_blocks;
275 kstatfs->bfree = stbuf->f_bfree;
276 kstatfs->bavail = stbuf->f_bavail;
277 kstatfs->files = stbuf->f_files;
278 kstatfs->ffree = stbuf->f_ffree;
279 kstatfs->namelen = stbuf->f_namemax;
421 int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf)
427 convert_statfs(stbuf, &arg.st);
528 struct stat stbuf;
529 memset(&stbuf, 0, sizeof(stbuf));
530 convert_attr(arg, &stbuf);
537 req->f->op.setattr(req, nodeid, &stbuf, arg->valid & ~FATTR_FH, fi);