aboutsummaryrefslogtreecommitdiffstats
path: root/include/mtd/ubi-user.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-02-25 18:51:41 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-26 13:14:17 -0400
commitccef7ab534347e2e1e1ef398d2ec987d37e519f3 (patch)
tree1f74e2abb5ad84725e3eb52ac3320ffda480f281 /include/mtd/ubi-user.h
parent9adfbfb611307060db54691bc7e6d53fdc12312b (diff)
make MTD headers use strict integer types
The MTD headers traditionally use stdint types rather than the kernel integer types. This converts them to do the same as all the others. Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/mtd/ubi-user.h')
-rw-r--r--include/mtd/ubi-user.h72
1 files changed, 37 insertions, 35 deletions
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 296efae3525e..466a8320f1e6 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -21,6 +21,8 @@
21#ifndef __UBI_USER_H__ 21#ifndef __UBI_USER_H__
22#define __UBI_USER_H__ 22#define __UBI_USER_H__
23 23
24#include <linux/types.h>
25
24/* 26/*
25 * UBI device creation (the same as MTD device attachment) 27 * UBI device creation (the same as MTD device attachment)
26 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -152,7 +154,7 @@
152/* Create an UBI volume */ 154/* Create an UBI volume */
153#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) 155#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req)
154/* Remove an UBI volume */ 156/* Remove an UBI volume */
155#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, int32_t) 157#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32)
156/* Re-size an UBI volume */ 158/* Re-size an UBI volume */
157#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) 159#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req)
158/* Re-name volumes */ 160/* Re-name volumes */
@@ -165,24 +167,24 @@
165/* Attach an MTD device */ 167/* Attach an MTD device */
166#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) 168#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
167/* Detach an MTD device */ 169/* Detach an MTD device */
168#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, int32_t) 170#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32)
169 171
170/* ioctl commands of UBI volume character devices */ 172/* ioctl commands of UBI volume character devices */
171 173
172#define UBI_VOL_IOC_MAGIC 'O' 174#define UBI_VOL_IOC_MAGIC 'O'
173 175
174/* Start UBI volume update */ 176/* Start UBI volume update */
175#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, int64_t) 177#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64)
176/* LEB erasure command, used for debugging, disabled by default */ 178/* LEB erasure command, used for debugging, disabled by default */
177#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, int32_t) 179#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32)
178/* Atomic LEB change command */ 180/* Atomic LEB change command */
179#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, int32_t) 181#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32)
180/* Map LEB command */ 182/* Map LEB command */
181#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) 183#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
182/* Unmap LEB command */ 184/* Unmap LEB command */
183#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, int32_t) 185#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32)
184/* Check if LEB is mapped command */ 186/* Check if LEB is mapped command */
185#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, int32_t) 187#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
186/* Set an UBI volume property */ 188/* Set an UBI volume property */
187#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) 189#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req)
188 190
@@ -260,10 +262,10 @@ enum {
260 * sub-page of the first page and add needed padding. 262 * sub-page of the first page and add needed padding.
261 */ 263 */
262struct ubi_attach_req { 264struct ubi_attach_req {
263 int32_t ubi_num; 265 __s32 ubi_num;
264 int32_t mtd_num; 266 __s32 mtd_num;
265 int32_t vid_hdr_offset; 267 __s32 vid_hdr_offset;
266 int8_t padding[12]; 268 __s8 padding[12];
267}; 269};
268 270
269/** 271/**
@@ -298,13 +300,13 @@ struct ubi_attach_req {
298 * BLOBs, without caring about how to properly align them. 300 * BLOBs, without caring about how to properly align them.
299 */ 301 */
300struct ubi_mkvol_req { 302struct ubi_mkvol_req {
301 int32_t vol_id; 303 __s32 vol_id;
302 int32_t alignment; 304 __s32 alignment;
303 int64_t bytes; 305 __s64 bytes;
304 int8_t vol_type; 306 __s8 vol_type;
305 int8_t padding1; 307 __s8 padding1;
306 int16_t name_len; 308 __s16 name_len;
307 int8_t padding2[4]; 309 __s8 padding2[4];
308 char name[UBI_MAX_VOLUME_NAME + 1]; 310 char name[UBI_MAX_VOLUME_NAME + 1];
309} __attribute__ ((packed)); 311} __attribute__ ((packed));
310 312
@@ -320,8 +322,8 @@ struct ubi_mkvol_req {
320 * zero number of bytes). 322 * zero number of bytes).
321 */ 323 */
322struct ubi_rsvol_req { 324struct ubi_rsvol_req {
323 int64_t bytes; 325 __s64 bytes;
324 int32_t vol_id; 326 __s32 vol_id;
325} __attribute__ ((packed)); 327} __attribute__ ((packed));
326 328
327/** 329/**
@@ -356,12 +358,12 @@ struct ubi_rsvol_req {
356 * re-name request. 358 * re-name request.
357 */ 359 */
358struct ubi_rnvol_req { 360struct ubi_rnvol_req {
359 int32_t count; 361 __s32 count;
360 int8_t padding1[12]; 362 __s8 padding1[12];
361 struct { 363 struct {
362 int32_t vol_id; 364 __s32 vol_id;
363 int16_t name_len; 365 __s16 name_len;
364 int8_t padding2[2]; 366 __s8 padding2[2];
365 char name[UBI_MAX_VOLUME_NAME + 1]; 367 char name[UBI_MAX_VOLUME_NAME + 1];
366 } ents[UBI_MAX_RNVOL]; 368 } ents[UBI_MAX_RNVOL];
367} __attribute__ ((packed)); 369} __attribute__ ((packed));
@@ -375,10 +377,10 @@ struct ubi_rnvol_req {
375 * @padding: reserved for future, not used, has to be zeroed 377 * @padding: reserved for future, not used, has to be zeroed
376 */ 378 */
377struct ubi_leb_change_req { 379struct ubi_leb_change_req {
378 int32_t lnum; 380 __s32 lnum;
379 int32_t bytes; 381 __s32 bytes;
380 int8_t dtype; 382 __s8 dtype;
381 int8_t padding[7]; 383 __s8 padding[7];
382} __attribute__ ((packed)); 384} __attribute__ ((packed));
383 385
384/** 386/**
@@ -388,9 +390,9 @@ struct ubi_leb_change_req {
388 * @padding: reserved for future, not used, has to be zeroed 390 * @padding: reserved for future, not used, has to be zeroed
389 */ 391 */
390struct ubi_map_req { 392struct ubi_map_req {
391 int32_t lnum; 393 __s32 lnum;
392 int8_t dtype; 394 __s8 dtype;
393 int8_t padding[3]; 395 __s8 padding[3];
394} __attribute__ ((packed)); 396} __attribute__ ((packed));
395 397
396 398
@@ -402,9 +404,9 @@ struct ubi_map_req {
402 * @value: value to set 404 * @value: value to set
403 */ 405 */
404struct ubi_set_prop_req { 406struct ubi_set_prop_req {
405 uint8_t property; 407 __u8 property;
406 uint8_t padding[7]; 408 __u8 padding[7];
407 uint64_t value; 409 __u64 value;
408} __attribute__ ((packed)); 410} __attribute__ ((packed));
409 411
410#endif /* __UBI_USER_H__ */ 412#endif /* __UBI_USER_H__ */