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