diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2001-10-31 14:52:35 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2001-10-31 14:52:35 +0000 |
commit | 5e183482b09cec20f54ccb44e767a7fab51833e9 (patch) | |
tree | cfadb38331eb258eb129d28627f5f999fa3c5e99 /include | |
parent | 19dff1ba9dfe6f474d22224267a7407c949d6803 (diff) | |
download | libfuse-5e183482b09cec20f54ccb44e767a7fab51833e9.tar.gz |
x
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 26 | ||||
-rw-r--r-- | include/linux/fuse.h | 35 |
2 files changed, 45 insertions, 16 deletions
diff --git a/include/fuse.h b/include/fuse.h index e18f606..bdc96a6 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -10,24 +10,30 @@ #include <sys/types.h> #include <sys/stat.h> +#include <utime.h> struct fuse; struct fuse_dh; typedef int (*dirfiller_t) (struct fuse_dh *, const char *, int type); - struct fuse_operations { - int (*getattr) (const char *path, struct stat *stbuf); + int (*getattr) (const char *path, struct stat *stbuf); int (*readlink) (const char *path, char *buf, size_t size); - int (*getdir) (const char *path, struct fuse_dh *h, dirfiller_t filler); - int (*mknod) (const char *path, int mode, int rdev); - int (*mkdir) (const char *path, int mode); - int (*unlink) (const char *path); - int (*rmdir) (const char *path); - int (*rename) (const char *from, const char *to); - int (*symlink) (const char *from, const char *to); - int (*link) (const char *from, const char *to); + int (*getdir) (const char *path, struct fuse_dh *h, dirfiller_t filler); + int (*mknod) (const char *path, mode_t mode, dev_t rdev); + int (*mkdir) (const char *path, mode_t mode); + int (*unlink) (const char *path); + int (*rmdir) (const char *path); + int (*symlink) (const char *from, const char *to); + int (*rename) (const char *from, const char *to); + int (*link) (const char *from, const char *to); + int (*chmod) (const char *path, mode_t mode); + int (*chown) (const char *path, uid_t uid, gid_t gid); + int (*truncate) (const char *path, off_t size); + int (*utime) (const char *path, struct utimbuf *buf); + int (*open) (const char *path, int flags); + int (*pread) (const char *path, char *buf, size_t size, off_t offset); }; struct fuse *fuse_new(); diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 64a4af3..5fe008c 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -19,11 +19,11 @@ struct fuse_mount_data { #define FUSE_ROOT_INO 1 struct fuse_attr { - unsigned short mode; - unsigned short nlink; - unsigned short uid; - unsigned short gid; - unsigned short rdev; + unsigned int mode; + unsigned int nlink; + unsigned int uid; + unsigned int gid; + unsigned int rdev; unsigned long long size; unsigned long blksize; unsigned long blocks; @@ -32,19 +32,28 @@ struct fuse_attr { unsigned long ctime; }; +#define FATTR_MODE (1 << 0) +#define FATTR_UID (1 << 1) +#define FATTR_GID (1 << 2) +#define FATTR_SIZE (1 << 3) +#define FATTR_UTIME (1 << 4) + enum fuse_opcode { FUSE_LOOKUP = 1, FUSE_FORGET, FUSE_GETATTR, + FUSE_SETATTR, FUSE_READLINK, + FUSE_SYMLINK, FUSE_GETDIR, FUSE_MKNOD, FUSE_MKDIR, - FUSE_SYMLINK, FUSE_UNLINK, FUSE_RMDIR, FUSE_RENAME, FUSE_LINK, + FUSE_OPEN, + FUSE_READ, }; /* Conservative buffer size for the client */ @@ -90,6 +99,20 @@ struct fuse_link_in { char name[1]; }; +struct fuse_setattr_in { + struct fuse_attr attr; + unsigned int valid; +}; + +struct fuse_open_in { + unsigned int flags; +}; + +struct fuse_read_in { + unsigned long long offset; + unsigned int size; +}; + struct fuse_in_header { int unique; enum fuse_opcode opcode; |