blob: b7d41901cc871bfaf06e72d11614f076a403a522 [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 __LINUX_JFFS2_H__
20#define __LINUX_JFFS2_H__
21#include <linux/types.h>
22#include <linux/magic.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define JFFS2_OLD_MAGIC_BITMASK 0x1984
25#define JFFS2_MAGIC_BITMASK 0x1985
26#define KSAMTIB_CIGAM_2SFFJ 0x8519
27#define JFFS2_EMPTY_BITMASK 0xffff
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define JFFS2_DIRTY_BITMASK 0x0000
30#define JFFS2_SUM_MAGIC 0x02851885
31#define JFFS2_MAX_NAME_LEN 254
32#define JFFS2_MIN_DATA_LEN 128
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define JFFS2_COMPR_NONE 0x00
35#define JFFS2_COMPR_ZERO 0x01
36#define JFFS2_COMPR_RTIME 0x02
37#define JFFS2_COMPR_RUBINMIPS 0x03
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define JFFS2_COMPR_COPY 0x04
40#define JFFS2_COMPR_DYNRUBIN 0x05
41#define JFFS2_COMPR_ZLIB 0x06
42#define JFFS2_COMPR_LZO 0x07
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define JFFS2_COMPAT_MASK 0xc000
45#define JFFS2_NODE_ACCURATE 0x2000
46#define JFFS2_FEATURE_INCOMPAT 0xc000
47#define JFFS2_FEATURE_ROCOMPAT 0x8000
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define JFFS2_FEATURE_RWCOMPAT_COPY 0x4000
50#define JFFS2_FEATURE_RWCOMPAT_DELETE 0x0000
51#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1)
52#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
55#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)
56#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
57#define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8)
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9)
60#define JFFS2_XPREFIX_USER 1
61#define JFFS2_XPREFIX_SECURITY 2
62#define JFFS2_XPREFIX_ACL_ACCESS 3
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define JFFS2_XPREFIX_ACL_DEFAULT 4
65#define JFFS2_XPREFIX_TRUSTED 5
66#define JFFS2_ACL_VERSION 0x0001
67#define JFFS2_INO_FLAG_PREREAD 1
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define JFFS2_INO_FLAG_USERCOMPR 2
70typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 v32;
Ben Cheng655a7c02013-10-16 16:09:24 -070072} __attribute__((packed)) jint32_t;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -080075 __u32 m;
Ben Cheng655a7c02013-10-16 16:09:24 -070076} __attribute__((packed)) jmode_t;
77typedef struct {
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 __u16 v16;
Ben Cheng655a7c02013-10-16 16:09:24 -070080} __attribute__((packed)) jint16_t;
Tao Baod7db5942015-01-28 10:07:51 -080081struct jffs2_unknown_node {
82 jint16_t magic;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 jint16_t nodetype;
85 jint32_t totlen;
86 jint32_t hdr_crc;
Ben Cheng655a7c02013-10-16 16:09:24 -070087};
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089struct jffs2_raw_dirent {
90 jint16_t magic;
91 jint16_t nodetype;
92 jint32_t totlen;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 jint32_t hdr_crc;
95 jint32_t pino;
96 jint32_t version;
97 jint32_t ino;
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 jint32_t mctime;
100 __u8 nsize;
101 __u8 type;
102 __u8 unused[2];
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 jint32_t node_crc;
105 jint32_t name_crc;
106 __u8 name[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700107};
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109struct jffs2_raw_inode {
110 jint16_t magic;
111 jint16_t nodetype;
112 jint32_t totlen;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 jint32_t hdr_crc;
115 jint32_t ino;
116 jint32_t version;
117 jmode_t mode;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 jint16_t uid;
120 jint16_t gid;
121 jint32_t isize;
122 jint32_t atime;
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 jint32_t mtime;
125 jint32_t ctime;
126 jint32_t offset;
127 jint32_t csize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 jint32_t dsize;
130 __u8 compr;
131 __u8 usercompr;
132 jint16_t flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 jint32_t data_crc;
135 jint32_t node_crc;
136 __u8 data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700137};
Tao Baod7db5942015-01-28 10:07:51 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700139struct jffs2_raw_xattr {
Tao Baod7db5942015-01-28 10:07:51 -0800140 jint16_t magic;
141 jint16_t nodetype;
142 jint32_t totlen;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 jint32_t hdr_crc;
145 jint32_t xid;
146 jint32_t version;
147 __u8 xprefix;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u8 name_len;
150 jint16_t value_len;
151 jint32_t data_crc;
152 jint32_t node_crc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u8 data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700155} __attribute__((packed));
Tao Baod7db5942015-01-28 10:07:51 -0800156struct jffs2_raw_xref {
157 jint16_t magic;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 jint16_t nodetype;
160 jint32_t totlen;
161 jint32_t hdr_crc;
162 jint32_t ino;
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 jint32_t xid;
165 jint32_t xseqno;
166 jint32_t node_crc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700167} __attribute__((packed));
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169struct jffs2_raw_summary {
170 jint16_t magic;
171 jint16_t nodetype;
172 jint32_t totlen;
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 jint32_t hdr_crc;
175 jint32_t sum_num;
176 jint32_t cln_mkr;
177 jint32_t padded;
Ben Cheng655a7c02013-10-16 16:09:24 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800179 jint32_t sum_crc;
180 jint32_t node_crc;
181 jint32_t sum[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700182};
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184union jffs2_node_union {
185 struct jffs2_raw_inode i;
186 struct jffs2_raw_dirent d;
187 struct jffs2_raw_xattr x;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800189 struct jffs2_raw_xref r;
190 struct jffs2_raw_summary s;
191 struct jffs2_unknown_node u;
Ben Cheng655a7c02013-10-16 16:09:24 -0700192};
Tao Baod7db5942015-01-28 10:07:51 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700194union jffs2_device_node {
Tao Baod7db5942015-01-28 10:07:51 -0800195 jint16_t old_id;
196 jint32_t new_id;
Ben Cheng655a7c02013-10-16 16:09:24 -0700197};
Tao Baod7db5942015-01-28 10:07:51 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700199#endif