diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 32 | ||||
-rw-r--r-- | include/linux/fuse.h | 22 |
2 files changed, 25 insertions, 29 deletions
diff --git a/include/fuse.h b/include/fuse.h index 8407f26..3ff3be6 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -92,29 +92,19 @@ struct fuse_operations { #define FUSE_DEBUG (1 << 1) /** - * Create a new FUSE filesystem. The filesystem is not yet mounted + * Create a new FUSE filesystem. * + * @param fd the control file descriptor * @param flags any combination of the FUSE flags defined above, or 0 - * @param root the file type of the root node. 0 is the default (directory). * @return the created FUSE handle */ -struct fuse *fuse_new(int flags, mode_t root); - -/** - * Connect to the kernel and mount the filesystem. - * - * @param f the FUSE handle - * @param mnt the mount point - * @return 0 on success -1 on failure - */ -int fuse_mount(struct fuse *f, const char *mnt); +struct fuse *fuse_new(int fd, int flags); /** * Set the filesystem operations. * * Operations which are initialised to NULL will return ENOSYS to the - * calling process. This function can be called anytime after - * fuse_new() and before fuse_loop(). + * calling process. * * @param f the FUSE handle * @param op the operations @@ -132,19 +122,9 @@ void fuse_set_operations(struct fuse *f, const struct fuse_operations *op); void fuse_loop(struct fuse *f); /** - * Disconnect from the kernel and unmount the filesystem - * - * @param f the FUSE handle - */ -int fuse_unmount(struct fuse *f); - -/** - * Destroy the filesystem. + * Destroy the FUSE handle. * - * The filesystem is not unmounted (call fuse_unmount() for that). - * After a fork() system call it is possible to call fuse_destroy() in - * one process, and leave the other process to service the filesystem - * requests. + * The filesystem is not unmounted. * * @param f the FUSE handle */ diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 4f64336..035d0be 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -8,16 +8,32 @@ /* This file defines the kernel interface of FUSE */ - +/** Version number of this interface */ #define FUSE_KERNEL_VERSION 1 +/** The inode number of the root indode */ +#define FUSE_ROOT_INO 1 + +/** Opening this will yield a new control file */ +#define FUSE_DEV "/proc/fs/fuse/dev" + +/** Data passed to mount */ struct fuse_mount_data { + /** Must be set to FUSE_KERNEL_VERSION */ int version; + + /** The control file descriptor */ int fd; + + /** The file type of the root inode */ unsigned int rootmode; -}; -#define FUSE_ROOT_INO 1 + /** The user ID of the user initiating this mount */ + unsigned int uid; + + /** FUSE specific mount flags */ + unsigned int flags; +}; struct fuse_attr { unsigned int mode; |