mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] FUSE - device functions
This adds the FUSE device handling functions. This contains the following files: o dev.c - fuse device operations (read, write, release, poll) - registers misc device - support for sending requests to userspace Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
d8a5ba4545
commit
334f485df8
6 changed files with 1537 additions and 7 deletions
|
@ -11,7 +11,7 @@
|
|||
#include <asm/types.h>
|
||||
|
||||
/** Version number of this interface */
|
||||
#define FUSE_KERNEL_VERSION 5
|
||||
#define FUSE_KERNEL_VERSION 6
|
||||
|
||||
/** Minor version number of this interface */
|
||||
#define FUSE_KERNEL_MINOR_VERSION 1
|
||||
|
@ -19,6 +19,12 @@
|
|||
/** The node ID of the root inode */
|
||||
#define FUSE_ROOT_ID 1
|
||||
|
||||
/** The major number of the fuse character device */
|
||||
#define FUSE_MAJOR 10
|
||||
|
||||
/** The minor number of the fuse character device */
|
||||
#define FUSE_MINOR 229
|
||||
|
||||
struct fuse_attr {
|
||||
__u64 ino;
|
||||
__u64 size;
|
||||
|
@ -36,3 +42,31 @@ struct fuse_attr {
|
|||
__u32 rdev;
|
||||
};
|
||||
|
||||
enum fuse_opcode {
|
||||
FUSE_INIT = 26
|
||||
};
|
||||
|
||||
/* Conservative buffer size for the client */
|
||||
#define FUSE_MAX_IN 8192
|
||||
|
||||
struct fuse_init_in_out {
|
||||
__u32 major;
|
||||
__u32 minor;
|
||||
};
|
||||
|
||||
struct fuse_in_header {
|
||||
__u32 len;
|
||||
__u32 opcode;
|
||||
__u64 unique;
|
||||
__u64 nodeid;
|
||||
__u32 uid;
|
||||
__u32 gid;
|
||||
__u32 pid;
|
||||
};
|
||||
|
||||
struct fuse_out_header {
|
||||
__u32 len;
|
||||
__s32 error;
|
||||
__u64 unique;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue