diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-11 12:32:31 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-11 12:32:31 +0000 |
commit | 1274494c809faad28dfed77856f1850a9a9659da (patch) | |
tree | b3e7b4e003953b65f264ef3ac344d7102c371faf /include/fuse_common.h | |
parent | bc56e7d63b33196f5447803e3d7e9d1afcbf1245 (diff) | |
download | libfuse-1274494c809faad28dfed77856f1850a9a9659da.tar.gz |
added lowlevel API and (non yet working) implementation
Diffstat (limited to 'include/fuse_common.h')
-rw-r--r-- | include/fuse_common.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h new file mode 100644 index 0000000..cd19435 --- /dev/null +++ b/include/fuse_common.h @@ -0,0 +1,49 @@ +/* + FUSE: Filesystem in Userspace + Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu> + + This program can be distributed under the terms of the GNU LGPL. + See the file COPYING.LIB. +*/ + +#if !defined(_FUSE_H_) && !defined(_FUSE_LOWLEVEL_H_) +#error "Never include <fuse_common.h> directly; use <fuse.h> or <fuse_lowlevel.h instead." +#endif + +/** Information about open files */ +struct fuse_file_info { + /** Open flags. Available in open() and release() */ + int flags; + + /** File handle. May be filled in by filesystem in open(). + Available in all other file operations */ + unsigned long fh; + + /** In case of a write operation indicates if this was caused by a + writepage */ + int writepage; +}; + +/** Extra context that may be needed by some filesystems + * + * The uid, gid and pid fields are not filled in case of a writepage + * operation. + */ +struct fuse_context { + /** Pointer to the fuse object */ + struct fuse *fuse; + + /** User ID of the calling process */ + uid_t uid; + + /** Group ID of the calling process */ + gid_t gid; + + /** Thread ID of the calling process */ + pid_t pid; + + /** Private filesystem data */ + void *private_data; +}; + + |