~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/mtd/ubi-user.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
 * ~~~~~~~~~~~~~~~~~~~~~~~~~
132
132
 *
133
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
135
 * passed. The object describes which property should be set, and to which value
136
136
 * it should be set.
137
137
 */
186
186
/* Check if LEB is mapped command */
187
187
#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
188
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
192
/* Maximum MTD device name length supported by UBI */
192
193
#define MAX_UBI_MTD_NAME_LEN 127
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
 
 *                         erase individual eraseblocks on dynamic volumes
 
229
 * @UBI_VOL_PROP_DIRECT_WRITE: allow (any non-zero value) or disallow (value 0)
 
230
 *                             user to directly write and erase individual
 
231
 *                             eraseblocks on dynamic volumes
230
232
 */
231
233
enum {
232
 
       UBI_PROP_DIRECT_WRITE = 1,
 
234
        UBI_VOL_PROP_DIRECT_WRITE = 1,
233
235
};
234
236
 
235
237
/**
308
310
        __s16 name_len;
309
311
        __s8 padding2[4];
310
312
        char name[UBI_MAX_VOLUME_NAME + 1];
311
 
} __attribute__ ((packed));
 
313
} __packed;
312
314
 
313
315
/**
314
316
 * struct ubi_rsvol_req - a data structure used in volume re-size requests.
324
326
struct ubi_rsvol_req {
325
327
        __s64 bytes;
326
328
        __s32 vol_id;
327
 
} __attribute__ ((packed));
 
329
} __packed;
328
330
 
329
331
/**
330
332
 * struct ubi_rnvol_req - volumes re-name request.
366
368
                __s8  padding2[2];
367
369
                char    name[UBI_MAX_VOLUME_NAME + 1];
368
370
        } ents[UBI_MAX_RNVOL];
369
 
} __attribute__ ((packed));
 
371
} __packed;
370
372
 
371
373
/**
372
374
 * struct ubi_leb_change_req - a data structure used in atomic LEB change
381
383
        __s32 bytes;
382
384
        __s8  dtype;
383
385
        __s8  padding[7];
384
 
} __attribute__ ((packed));
 
386
} __packed;
385
387
 
386
388
/**
387
389
 * struct ubi_map_req - a data structure used in map LEB requests.
393
395
        __s32 lnum;
394
396
        __s8  dtype;
395
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
401
 
 *                           property.
402
 
 * @property: property to set (%UBI_PROP_DIRECT_WRITE)
 
402
 * struct ubi_set_vol_prop_req - a data structure used to set an UBI volume
 
403
 *                               property.
 
404
 * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE)
403
405
 * @padding: reserved for future, not used, has to be zeroed
404
406
 * @value: value to set
405
407
 */
406
 
struct ubi_set_prop_req {
407
 
       __u8  property;
408
 
       __u8  padding[7];
409
 
       __u64 value;
410
 
}  __attribute__ ((packed));
 
408
struct ubi_set_vol_prop_req {
 
409
        __u8  property;
 
410
        __u8  padding[7];
 
411
        __u64 value;
 
412
}  __packed;
411
413
 
412
414
#endif /* __UBI_USER_H__ */