blob: e055172d1fa37f08816c7aa3f5746dff0cd42bbd [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __UBI_USER_H__
20#define __UBI_USER_H__
21#include <linux/types.h>
Tao Baod7db5942015-01-28 10:07:51 -080022#define UBI_VOL_NUM_AUTO (- 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080024#define UBI_DEV_NUM_AUTO (- 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define UBI_MAX_VOLUME_NAME 127
26#define UBI_IOC_MAGIC 'o'
27#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req)
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32)
30#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req)
31#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req)
32#define UBI_CTRL_IOC_MAGIC 'o'
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
35#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32)
36#define UBI_VOL_IOC_MAGIC 'O'
37#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64)
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32)
40#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32)
41#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
42#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32)
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
Tao Baod7db5942015-01-28 10:07:51 -080045#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_vol_prop_req)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070046#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
47#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define MAX_UBI_MTD_NAME_LEN 127
50#define UBI_MAX_RNVOL 32
Ben Cheng655a7c02013-10-16 16:09:24 -070051enum {
Tao Baod7db5942015-01-28 10:07:51 -080052 UBI_DYNAMIC_VOLUME = 3,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 UBI_STATIC_VOLUME = 4,
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
Ben Cheng655a7c02013-10-16 16:09:24 -070056enum {
Tao Baod7db5942015-01-28 10:07:51 -080057 UBI_VOL_PROP_DIRECT_WRITE = 1,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070059};
60struct ubi_attach_req {
Tao Baod7db5942015-01-28 10:07:51 -080061 __s32 ubi_num;
62 __s32 mtd_num;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __s32 vid_hdr_offset;
65 __s16 max_beb_per1024;
66 __s8 padding[10];
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070069struct ubi_mkvol_req {
Tao Baod7db5942015-01-28 10:07:51 -080070 __s32 vol_id;
71 __s32 alignment;
72 __s64 bytes;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __s8 vol_type;
75 __s8 padding1;
76 __s16 name_len;
77 __s8 padding2[4];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 char name[UBI_MAX_VOLUME_NAME + 1];
Ben Cheng655a7c02013-10-16 16:09:24 -070080} __packed;
Ben Cheng655a7c02013-10-16 16:09:24 -070081struct ubi_rsvol_req {
Tao Baod7db5942015-01-28 10:07:51 -080082 __s64 bytes;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __s32 vol_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070085} __packed;
Ben Cheng655a7c02013-10-16 16:09:24 -070086struct ubi_rnvol_req {
Tao Baod7db5942015-01-28 10:07:51 -080087 __s32 count;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 __s8 padding1[12];
90 struct {
91 __s32 vol_id;
92 __s16 name_len;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 __s8 padding2[2];
95 char name[UBI_MAX_VOLUME_NAME + 1];
96 } ents[UBI_MAX_RNVOL];
Ben Cheng655a7c02013-10-16 16:09:24 -070097} __packed;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099struct ubi_leb_change_req {
Tao Baod7db5942015-01-28 10:07:51 -0800100 __s32 lnum;
101 __s32 bytes;
102 __s8 dtype;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 __s8 padding[7];
Ben Cheng655a7c02013-10-16 16:09:24 -0700105} __packed;
Ben Cheng655a7c02013-10-16 16:09:24 -0700106struct ubi_map_req {
Tao Baod7db5942015-01-28 10:07:51 -0800107 __s32 lnum;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __s8 dtype;
110 __s8 padding[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700111} __packed;
112struct ubi_set_vol_prop_req {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 __u8 property;
115 __u8 padding[7];
116 __u64 value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700117} __packed;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119struct ubi_blkcreate_req {
Tao Baod7db5942015-01-28 10:07:51 -0800120 __s8 padding[128];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700121} __packed;
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#endif
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */