Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      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
     70 typedef struct {
     71  __u32 v32;
     72 } __attribute__((packed)) jint32_t;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 typedef struct {
     75  __u32 m;
     76 } __attribute__((packed)) jmode_t;
     77 typedef struct {
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79  __u16 v16;
     80 } __attribute__((packed)) jint16_t;
     81 struct jffs2_unknown_node
     82 {
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84  jint16_t magic;
     85  jint16_t nodetype;
     86  jint32_t totlen;
     87  jint32_t hdr_crc;
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89 };
     90 struct jffs2_raw_dirent
     91 {
     92  jint16_t magic;
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94  jint16_t nodetype;
     95  jint32_t totlen;
     96  jint32_t hdr_crc;
     97  jint32_t pino;
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99  jint32_t version;
    100  jint32_t ino;
    101  jint32_t mctime;
    102  __u8 nsize;
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104  __u8 type;
    105  __u8 unused[2];
    106  jint32_t node_crc;
    107  jint32_t name_crc;
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109  __u8 name[0];
    110 };
    111 struct jffs2_raw_inode
    112 {
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114  jint16_t magic;
    115  jint16_t nodetype;
    116  jint32_t totlen;
    117  jint32_t hdr_crc;
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119  jint32_t ino;
    120  jint32_t version;
    121  jmode_t mode;
    122  jint16_t uid;
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124  jint16_t gid;
    125  jint32_t isize;
    126  jint32_t atime;
    127  jint32_t mtime;
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129  jint32_t ctime;
    130  jint32_t offset;
    131  jint32_t csize;
    132  jint32_t dsize;
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134  __u8 compr;
    135  __u8 usercompr;
    136  jint16_t flags;
    137  jint32_t data_crc;
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139  jint32_t node_crc;
    140  __u8 data[0];
    141 };
    142 struct jffs2_raw_xattr {
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144  jint16_t magic;
    145  jint16_t nodetype;
    146  jint32_t totlen;
    147  jint32_t hdr_crc;
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149  jint32_t xid;
    150  jint32_t version;
    151  __u8 xprefix;
    152  __u8 name_len;
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154  jint16_t value_len;
    155  jint32_t data_crc;
    156  jint32_t node_crc;
    157  __u8 data[0];
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159 } __attribute__((packed));
    160 struct jffs2_raw_xref
    161 {
    162  jint16_t magic;
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164  jint16_t nodetype;
    165  jint32_t totlen;
    166  jint32_t hdr_crc;
    167  jint32_t ino;
    168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    169  jint32_t xid;
    170  jint32_t xseqno;
    171  jint32_t node_crc;
    172 } __attribute__((packed));
    173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    174 struct jffs2_raw_summary
    175 {
    176  jint16_t magic;
    177  jint16_t nodetype;
    178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    179  jint32_t totlen;
    180  jint32_t hdr_crc;
    181  jint32_t sum_num;
    182  jint32_t cln_mkr;
    183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    184  jint32_t padded;
    185  jint32_t sum_crc;
    186  jint32_t node_crc;
    187  jint32_t sum[0];
    188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    189 };
    190 union jffs2_node_union
    191 {
    192  struct jffs2_raw_inode i;
    193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    194  struct jffs2_raw_dirent d;
    195  struct jffs2_raw_xattr x;
    196  struct jffs2_raw_xref r;
    197  struct jffs2_raw_summary s;
    198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    199  struct jffs2_unknown_node u;
    200 };
    201 union jffs2_device_node {
    202  jint16_t old_id;
    203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    204  jint32_t new_id;
    205 };
    206 #endif
    207