aboutsummaryrefslogtreecommitdiffstats
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.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index c0d47ad4b103..3c4109777aff 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -131,7 +131,7 @@
131 * ~~~~~~~~~~~~~~~~~~~~~~~~~ 131 * ~~~~~~~~~~~~~~~~~~~~~~~~~
132 * 132 *
133 * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be 133 * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be
134 * used. A pointer to a &struct ubi_set_prop_req object is expected to be 134 * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be
135 * passed. The object describes which property should be set, and to which value 135 * passed. The object describes which property should be set, and to which value
136 * it should be set. 136 * it should be set.
137 */ 137 */
@@ -186,7 +186,8 @@
186/* Check if LEB is mapped command */ 186/* Check if LEB is mapped command */
187#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) 187#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
188/* Set an UBI volume property */ 188/* Set an UBI volume property */
189#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) 189#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
190 struct ubi_set_vol_prop_req)
190 191
191/* Maximum MTD device name length supported by UBI */ 192/* Maximum MTD device name length supported by UBI */
192#define MAX_UBI_MTD_NAME_LEN 127 193#define MAX_UBI_MTD_NAME_LEN 127
@@ -223,13 +224,14 @@ enum {
223}; 224};
224 225
225/* 226/*
226 * UBI set property ioctl constants 227 * UBI set volume property ioctl constants.
227 * 228 *
228 * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and 229 * @UBI_VOL_PROP_DIRECT_WRITE: allow (any non-zero value) or disallow (value 0)
229 * erase individual eraseblocks on dynamic volumes 230 * user to directly write and erase individual
231 * eraseblocks on dynamic volumes
230 */ 232 */
231enum { 233enum {
232 UBI_PROP_DIRECT_WRITE = 1, 234 UBI_VOL_PROP_DIRECT_WRITE = 1,
233}; 235};
234 236
235/** 237/**
@@ -308,7 +310,7 @@ struct ubi_mkvol_req {
308 __s16 name_len; 310 __s16 name_len;
309 __s8 padding2[4]; 311 __s8 padding2[4];
310 char name[UBI_MAX_VOLUME_NAME + 1]; 312 char name[UBI_MAX_VOLUME_NAME + 1];
311} __attribute__ ((packed)); 313} __packed;
312 314
313/** 315/**
314 * struct ubi_rsvol_req - a data structure used in volume re-size requests. 316 * struct ubi_rsvol_req - a data structure used in volume re-size requests.
@@ -324,7 +326,7 @@ struct ubi_mkvol_req {
324struct ubi_rsvol_req { 326struct ubi_rsvol_req {
325 __s64 bytes; 327 __s64 bytes;
326 __s32 vol_id; 328 __s32 vol_id;
327} __attribute__ ((packed)); 329} __packed;
328 330
329/** 331/**
330 * struct ubi_rnvol_req - volumes re-name request. 332 * struct ubi_rnvol_req - volumes re-name request.
@@ -366,7 +368,7 @@ struct ubi_rnvol_req {
366 __s8 padding2[2]; 368 __s8 padding2[2];
367 char name[UBI_MAX_VOLUME_NAME + 1]; 369 char name[UBI_MAX_VOLUME_NAME + 1];
368 } ents[UBI_MAX_RNVOL]; 370 } ents[UBI_MAX_RNVOL];
369} __attribute__ ((packed)); 371} __packed;
370 372
371/** 373/**
372 * struct ubi_leb_change_req - a data structure used in atomic LEB change 374 * struct ubi_leb_change_req - a data structure used in atomic LEB change
@@ -381,7 +383,7 @@ struct ubi_leb_change_req {
381 __s32 bytes; 383 __s32 bytes;
382 __s8 dtype; 384 __s8 dtype;
383 __s8 padding[7]; 385 __s8 padding[7];
384} __attribute__ ((packed)); 386} __packed;
385 387
386/** 388/**
387 * struct ubi_map_req - a data structure used in map LEB requests. 389 * struct ubi_map_req - a data structure used in map LEB requests.
@@ -393,20 +395,20 @@ struct ubi_map_req {
393 __s32 lnum; 395 __s32 lnum;
394 __s8 dtype; 396 __s8 dtype;
395 __s8 padding[3]; 397 __s8 padding[3];
396} __attribute__ ((packed)); 398} __packed;
397 399
398 400
399/** 401/**
400 * struct ubi_set_prop_req - a data structure used to set an ubi volume 402 * struct ubi_set_vol_prop_req - a data structure used to set an UBI volume
401 * property. 403 * property.
402 * @property: property to set (%UBI_PROP_DIRECT_WRITE) 404 * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE)
403 * @padding: reserved for future, not used, has to be zeroed 405 * @padding: reserved for future, not used, has to be zeroed
404 * @value: value to set 406 * @value: value to set
405 */ 407 */
406struct ubi_set_prop_req { 408struct ubi_set_vol_prop_req {
407 __u8 property; 409 __u8 property;
408 __u8 padding[7]; 410 __u8 padding[7];
409 __u64 value; 411 __u64 value;
410} __attribute__ ((packed)); 412} __packed;
411 413
412#endif /* __UBI_USER_H__ */ 414#endif /* __UBI_USER_H__ */