Lines Matching refs:fi
72 struct fuse_file_info *fi)
78 if(fi)
79 res = fstat(fi->fh, stbuf);
117 static int xmp_opendir(const char *path, struct fuse_file_info *fi)
133 fi->fh = (unsigned long) d;
137 static inline struct xmp_dirp *get_dirp(struct fuse_file_info *fi)
139 return (struct xmp_dirp *) (uintptr_t) fi->fh;
143 off_t offset, struct fuse_file_info *fi,
146 struct xmp_dirp *d = get_dirp(fi);
203 static int xmp_releasedir(const char *path, struct fuse_file_info *fi)
205 struct xmp_dirp *d = get_dirp(fi);
297 struct fuse_file_info *fi)
301 if(fi)
302 res = fchmod(fi->fh, mode);
312 struct fuse_file_info *fi)
316 if (fi)
317 res = fchown(fi->fh, uid, gid);
327 struct fuse_file_info *fi)
331 if(fi)
332 res = ftruncate(fi->fh, size);
344 struct fuse_file_info *fi)
349 if (fi)
350 res = futimens(fi->fh, ts);
360 static int xmp_create(const char *path, mode_t mode, struct fuse_file_info *fi)
364 fd = open(path, fi->flags, mode);
368 fi->fh = fd;
372 static int xmp_open(const char *path, struct fuse_file_info *fi)
376 fd = open(path, fi->flags);
380 fi->fh = fd;
385 struct fuse_file_info *fi)
390 res = pread(fi->fh, buf, size, offset);
398 size_t size, off_t offset, struct fuse_file_info *fi)
411 src->buf[0].fd = fi->fh;
420 off_t offset, struct fuse_file_info *fi)
425 res = pwrite(fi->fh, buf, size, offset);
433 off_t offset, struct fuse_file_info *fi)
440 dst.buf[0].fd = fi->fh;
457 static int xmp_flush(const char *path, struct fuse_file_info *fi)
467 res = close(dup(fi->fh));
474 static int xmp_release(const char *path, struct fuse_file_info *fi)
477 close(fi->fh);
483 struct fuse_file_info *fi)
492 res = fdatasync(fi->fh);
495 res = fsync(fi->fh);
504 off_t offset, off_t length, struct fuse_file_info *fi)
511 return -posix_fallocate(fi->fh, offset, length);
553 static int xmp_lock(const char *path, struct fuse_file_info *fi, int cmd,
558 return ulockmgr_op(fi->fh, cmd, lock, &fi->lock_owner,
559 sizeof(fi->lock_owner));
563 static int xmp_flock(const char *path, struct fuse_file_info *fi, int op)
568 res = flock(fi->fh, op);
595 static off_t xmp_lseek(const char *path, off_t off, int whence, struct fuse_file_info *fi)
600 res = lseek(fi->fh, off, whence);