diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-09 16:10:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:46 -0400 |
commit | 06663267b4b1e85ece73236ea720355668d4f736 (patch) | |
tree | caece1ce21caf6586e82e03858dc128edb8e996c /include/linux/fuse.h | |
parent | 92a8780e1136c5ca0c7ed940000d399943d1576e (diff) |
[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.h | 15 |
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 @@ | |||
25 | /** The minor number of the fuse character device */ | 25 | /** The minor number of the fuse character device */ |
26 | #define FUSE_MINOR 229 | 26 | #define FUSE_MINOR 229 |
27 | 27 | ||
28 | /* Make sure all structures are padded to 64bit boundary, so 32bit | ||
29 | userspace works under 64bit kernels */ | ||
30 | |||
28 | struct fuse_attr { | 31 | struct fuse_attr { |
29 | __u64 ino; | 32 | __u64 ino; |
30 | __u64 size; | 33 | __u64 size; |
@@ -128,6 +131,7 @@ struct fuse_mknod_in { | |||
128 | 131 | ||
129 | struct fuse_mkdir_in { | 132 | struct fuse_mkdir_in { |
130 | __u32 mode; | 133 | __u32 mode; |
134 | __u32 padding; | ||
131 | }; | 135 | }; |
132 | 136 | ||
133 | struct fuse_rename_in { | 137 | struct fuse_rename_in { |
@@ -140,32 +144,38 @@ struct fuse_link_in { | |||
140 | 144 | ||
141 | struct fuse_setattr_in { | 145 | struct fuse_setattr_in { |
142 | __u32 valid; | 146 | __u32 valid; |
147 | __u32 padding; | ||
143 | struct fuse_attr attr; | 148 | struct fuse_attr attr; |
144 | }; | 149 | }; |
145 | 150 | ||
146 | struct fuse_open_in { | 151 | struct fuse_open_in { |
147 | __u32 flags; | 152 | __u32 flags; |
153 | __u32 padding; | ||
148 | }; | 154 | }; |
149 | 155 | ||
150 | struct fuse_open_out { | 156 | struct fuse_open_out { |
151 | __u64 fh; | 157 | __u64 fh; |
152 | __u32 open_flags; | 158 | __u32 open_flags; |
159 | __u32 padding; | ||
153 | }; | 160 | }; |
154 | 161 | ||
155 | struct fuse_release_in { | 162 | struct fuse_release_in { |
156 | __u64 fh; | 163 | __u64 fh; |
157 | __u32 flags; | 164 | __u32 flags; |
165 | __u32 padding; | ||
158 | }; | 166 | }; |
159 | 167 | ||
160 | struct fuse_flush_in { | 168 | struct fuse_flush_in { |
161 | __u64 fh; | 169 | __u64 fh; |
162 | __u32 flush_flags; | 170 | __u32 flush_flags; |
171 | __u32 padding; | ||
163 | }; | 172 | }; |
164 | 173 | ||
165 | struct fuse_read_in { | 174 | struct fuse_read_in { |
166 | __u64 fh; | 175 | __u64 fh; |
167 | __u64 offset; | 176 | __u64 offset; |
168 | __u32 size; | 177 | __u32 size; |
178 | __u32 padding; | ||
169 | }; | 179 | }; |
170 | 180 | ||
171 | struct fuse_write_in { | 181 | struct fuse_write_in { |
@@ -177,6 +187,7 @@ struct fuse_write_in { | |||
177 | 187 | ||
178 | struct fuse_write_out { | 188 | struct fuse_write_out { |
179 | __u32 size; | 189 | __u32 size; |
190 | __u32 padding; | ||
180 | }; | 191 | }; |
181 | 192 | ||
182 | struct fuse_statfs_out { | 193 | struct fuse_statfs_out { |
@@ -186,6 +197,7 @@ struct fuse_statfs_out { | |||
186 | struct fuse_fsync_in { | 197 | struct fuse_fsync_in { |
187 | __u64 fh; | 198 | __u64 fh; |
188 | __u32 fsync_flags; | 199 | __u32 fsync_flags; |
200 | __u32 padding; | ||
189 | }; | 201 | }; |
190 | 202 | ||
191 | struct fuse_setxattr_in { | 203 | struct fuse_setxattr_in { |
@@ -195,10 +207,12 @@ struct fuse_setxattr_in { | |||
195 | 207 | ||
196 | struct fuse_getxattr_in { | 208 | struct fuse_getxattr_in { |
197 | __u32 size; | 209 | __u32 size; |
210 | __u32 padding; | ||
198 | }; | 211 | }; |
199 | 212 | ||
200 | struct fuse_getxattr_out { | 213 | struct fuse_getxattr_out { |
201 | __u32 size; | 214 | __u32 size; |
215 | __u32 padding; | ||
202 | }; | 216 | }; |
203 | 217 | ||
204 | struct fuse_init_in_out { | 218 | struct fuse_init_in_out { |
@@ -214,6 +228,7 @@ struct fuse_in_header { | |||
214 | __u32 uid; | 228 | __u32 uid; |
215 | __u32 gid; | 229 | __u32 gid; |
216 | __u32 pid; | 230 | __u32 pid; |
231 | __u32 padding; | ||
217 | }; | 232 | }; |
218 | 233 | ||
219 | struct fuse_out_header { | 234 | struct fuse_out_header { |