aboutsummaryrefslogtreecommitdiff
path: root/include/mtd/ubi-user.h
diff options
context:
space:
mode:
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 296efae3525..466a8320f1e 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -21,6 +21,8 @@
#ifndef __UBI_USER_H__
#define __UBI_USER_H__
+#include <linux/types.h>
+
/*
* UBI device creation (the same as MTD device attachment)
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -152,7 +154,7 @@
/* Create an UBI volume */
#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req)
/* Remove an UBI volume */
-#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, int32_t)
+#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32)
/* Re-size an UBI volume */
#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req)
/* Re-name volumes */
@@ -165,24 +167,24 @@
/* Attach an MTD device */
#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
/* Detach an MTD device */
-#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, int32_t)
+#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32)
/* ioctl commands of UBI volume character devices */
#define UBI_VOL_IOC_MAGIC 'O'
/* Start UBI volume update */
-#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, int64_t)
+#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64)
/* LEB erasure command, used for debugging, disabled by default */
-#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, int32_t)
+#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32)
/* Atomic LEB change command */
-#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, int32_t)
+#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32)
/* Map LEB command */
#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
/* Unmap LEB command */
-#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, int32_t)
+#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32)
/* Check if LEB is mapped command */
-#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, int32_t)
+#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
/* Set an UBI volume property */
#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req)
@@ -260,10 +262,10 @@ enum {
* sub-page of the first page and add needed padding.
*/
struct ubi_attach_req {
- int32_t ubi_num;
- int32_t mtd_num;
- int32_t vid_hdr_offset;
- int8_t padding[12];
+ __s32 ubi_num;
+ __s32 mtd_num;
+ __s32 vid_hdr_offset;
+ __s8 padding[12];
};
/**
@@ -298,13 +300,13 @@ struct ubi_attach_req {
* BLOBs, without caring about how to properly align them.
*/
struct ubi_mkvol_req {
- int32_t vol_id;
- int32_t alignment;
- int64_t bytes;
- int8_t vol_type;
- int8_t padding1;
- int16_t name_len;
- int8_t padding2[4];
+ __s32 vol_id;
+ __s32 alignment;
+ __s64 bytes;
+ __s8 vol_type;
+ __s8 padding1;
+ __s16 name_len;
+ __s8 padding2[4];
char name[UBI_MAX_VOLUME_NAME + 1];
} __attribute__ ((packed));
@@ -320,8 +322,8 @@ struct ubi_mkvol_req {
* zero number of bytes).
*/
struct ubi_rsvol_req {
- int64_t bytes;
- int32_t vol_id;
+ __s64 bytes;
+ __s32 vol_id;
} __attribute__ ((packed));
/**
@@ -356,12 +358,12 @@ struct ubi_rsvol_req {
* re-name request.
*/
struct ubi_rnvol_req {
- int32_t count;
- int8_t padding1[12];
+ __s32 count;
+ __s8 padding1[12];
struct {
- int32_t vol_id;
- int16_t name_len;
- int8_t padding2[2];
+ __s32 vol_id;
+ __s16 name_len;
+ __s8 padding2[2];
char name[UBI_MAX_VOLUME_NAME + 1];
} ents[UBI_MAX_RNVOL];
} __attribute__ ((packed));
@@ -375,10 +377,10 @@ struct ubi_rnvol_req {
* @padding: reserved for future, not used, has to be zeroed
*/
struct ubi_leb_change_req {
- int32_t lnum;
- int32_t bytes;
- int8_t dtype;
- int8_t padding[7];
+ __s32 lnum;
+ __s32 bytes;
+ __s8 dtype;
+ __s8 padding[7];
} __attribute__ ((packed));
/**
@@ -388,9 +390,9 @@ struct ubi_leb_change_req {
* @padding: reserved for future, not used, has to be zeroed
*/
struct ubi_map_req {
- int32_t lnum;
- int8_t dtype;
- int8_t padding[3];
+ __s32 lnum;
+ __s8 dtype;
+ __s8 padding[3];
} __attribute__ ((packed));
@@ -402,9 +404,9 @@ struct ubi_map_req {
* @value: value to set
*/
struct ubi_set_prop_req {
- uint8_t property;
- uint8_t padding[7];
- uint64_t value;
+ __u8 property;
+ __u8 padding[7];
+ __u64 value;
} __attribute__ ((packed));
#endif /* __UBI_USER_H__ */