summaryrefslogtreecommitdiffstats
path: root/include/linux/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-09-09 13:10:32 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 14:03:46 -0700
commit06663267b4b1e85ece73236ea720355668d4f736 (patch)
treecaece1ce21caf6586e82e03858dc128edb8e996c /include/linux/fuse.h
parent92a8780e1136c5ca0c7ed940000d399943d1576e (diff)
downloadblackbird-op-linux-06663267b4b1e85ece73236ea720355668d4f736.tar.gz
blackbird-op-linux-06663267b4b1e85ece73236ea720355668d4f736.zip
[PATCH] FUSE: add padding
Add padding to structures to make sizes the same on 32bit and 64bit archs. Initial testing and test machine generously provided by Franco Broi. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fuse.h')
-rw-r--r--include/linux/fuse.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index bf564edf9905..e9b814e16c58 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -25,6 +25,9 @@
/** The minor number of the fuse character device */
#define FUSE_MINOR 229
+/* Make sure all structures are padded to 64bit boundary, so 32bit
+ userspace works under 64bit kernels */
+
struct fuse_attr {
__u64 ino;
__u64 size;
@@ -128,6 +131,7 @@ struct fuse_mknod_in {
struct fuse_mkdir_in {
__u32 mode;
+ __u32 padding;
};
struct fuse_rename_in {
@@ -140,32 +144,38 @@ struct fuse_link_in {
struct fuse_setattr_in {
__u32 valid;
+ __u32 padding;
struct fuse_attr attr;
};
struct fuse_open_in {
__u32 flags;
+ __u32 padding;
};
struct fuse_open_out {
__u64 fh;
__u32 open_flags;
+ __u32 padding;
};
struct fuse_release_in {
__u64 fh;
__u32 flags;
+ __u32 padding;
};
struct fuse_flush_in {
__u64 fh;
__u32 flush_flags;
+ __u32 padding;
};
struct fuse_read_in {
__u64 fh;
__u64 offset;
__u32 size;
+ __u32 padding;
};
struct fuse_write_in {
@@ -177,6 +187,7 @@ struct fuse_write_in {
struct fuse_write_out {
__u32 size;
+ __u32 padding;
};
struct fuse_statfs_out {
@@ -186,6 +197,7 @@ struct fuse_statfs_out {
struct fuse_fsync_in {
__u64 fh;
__u32 fsync_flags;
+ __u32 padding;
};
struct fuse_setxattr_in {
@@ -195,10 +207,12 @@ struct fuse_setxattr_in {
struct fuse_getxattr_in {
__u32 size;
+ __u32 padding;
};
struct fuse_getxattr_out {
__u32 size;
+ __u32 padding;
};
struct fuse_init_in_out {
@@ -214,6 +228,7 @@ struct fuse_in_header {
__u32 uid;
__u32 gid;
__u32 pid;
+ __u32 padding;
};
struct fuse_out_header {
OpenPOWER on IntegriCloud