Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: jffs2.h
/*
[0] Fix | Delete
* JFFS2 -- Journalling Flash File System, Version 2.
[1] Fix | Delete
*
[2] Fix | Delete
* Copyright © 2001-2007 Red Hat, Inc.
[3] Fix | Delete
* Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
[4] Fix | Delete
*
[5] Fix | Delete
* Created by David Woodhouse <dwmw2@infradead.org>
[6] Fix | Delete
*
[7] Fix | Delete
* For licensing information, see the file 'LICENCE' in the
[8] Fix | Delete
* jffs2 directory.
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
#ifndef __LINUX_JFFS2_H__
[12] Fix | Delete
#define __LINUX_JFFS2_H__
[13] Fix | Delete
[14] Fix | Delete
#include <linux/types.h>
[15] Fix | Delete
#include <linux/magic.h>
[16] Fix | Delete
[17] Fix | Delete
/* You must include something which defines the C99 uintXX_t types.
[18] Fix | Delete
We don't do it from here because this file is used in too many
[19] Fix | Delete
different environments. */
[20] Fix | Delete
[21] Fix | Delete
/* Values we may expect to find in the 'magic' field */
[22] Fix | Delete
#define JFFS2_OLD_MAGIC_BITMASK 0x1984
[23] Fix | Delete
#define JFFS2_MAGIC_BITMASK 0x1985
[24] Fix | Delete
#define KSAMTIB_CIGAM_2SFFJ 0x8519 /* For detecting wrong-endian fs */
[25] Fix | Delete
#define JFFS2_EMPTY_BITMASK 0xffff
[26] Fix | Delete
#define JFFS2_DIRTY_BITMASK 0x0000
[27] Fix | Delete
[28] Fix | Delete
/* Summary node MAGIC marker */
[29] Fix | Delete
#define JFFS2_SUM_MAGIC 0x02851885
[30] Fix | Delete
[31] Fix | Delete
/* We only allow a single char for length, and 0xFF is empty flash so
[32] Fix | Delete
we don't want it confused with a real length. Hence max 254.
[33] Fix | Delete
*/
[34] Fix | Delete
#define JFFS2_MAX_NAME_LEN 254
[35] Fix | Delete
[36] Fix | Delete
/* How small can we sensibly write nodes? */
[37] Fix | Delete
#define JFFS2_MIN_DATA_LEN 128
[38] Fix | Delete
[39] Fix | Delete
#define JFFS2_COMPR_NONE 0x00
[40] Fix | Delete
#define JFFS2_COMPR_ZERO 0x01
[41] Fix | Delete
#define JFFS2_COMPR_RTIME 0x02
[42] Fix | Delete
#define JFFS2_COMPR_RUBINMIPS 0x03
[43] Fix | Delete
#define JFFS2_COMPR_COPY 0x04
[44] Fix | Delete
#define JFFS2_COMPR_DYNRUBIN 0x05
[45] Fix | Delete
#define JFFS2_COMPR_ZLIB 0x06
[46] Fix | Delete
#define JFFS2_COMPR_LZO 0x07
[47] Fix | Delete
/* Compatibility flags. */
[48] Fix | Delete
#define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */
[49] Fix | Delete
#define JFFS2_NODE_ACCURATE 0x2000
[50] Fix | Delete
/* INCOMPAT: Fail to mount the filesystem */
[51] Fix | Delete
#define JFFS2_FEATURE_INCOMPAT 0xc000
[52] Fix | Delete
/* ROCOMPAT: Mount read-only */
[53] Fix | Delete
#define JFFS2_FEATURE_ROCOMPAT 0x8000
[54] Fix | Delete
/* RWCOMPAT_COPY: Mount read/write, and copy the node when it's GC'd */
[55] Fix | Delete
#define JFFS2_FEATURE_RWCOMPAT_COPY 0x4000
[56] Fix | Delete
/* RWCOMPAT_DELETE: Mount read/write, and delete the node when it's GC'd */
[57] Fix | Delete
#define JFFS2_FEATURE_RWCOMPAT_DELETE 0x0000
[58] Fix | Delete
[59] Fix | Delete
#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1)
[60] Fix | Delete
#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2)
[61] Fix | Delete
#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
[62] Fix | Delete
#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)
[63] Fix | Delete
[64] Fix | Delete
#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
[65] Fix | Delete
[66] Fix | Delete
#define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8)
[67] Fix | Delete
#define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9)
[68] Fix | Delete
[69] Fix | Delete
/* XATTR Related */
[70] Fix | Delete
#define JFFS2_XPREFIX_USER 1 /* for "user." */
[71] Fix | Delete
#define JFFS2_XPREFIX_SECURITY 2 /* for "security." */
[72] Fix | Delete
#define JFFS2_XPREFIX_ACL_ACCESS 3 /* for "system.posix_acl_access" */
[73] Fix | Delete
#define JFFS2_XPREFIX_ACL_DEFAULT 4 /* for "system.posix_acl_default" */
[74] Fix | Delete
#define JFFS2_XPREFIX_TRUSTED 5 /* for "trusted.*" */
[75] Fix | Delete
[76] Fix | Delete
#define JFFS2_ACL_VERSION 0x0001
[77] Fix | Delete
[78] Fix | Delete
// Maybe later...
[79] Fix | Delete
//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
[80] Fix | Delete
//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)
[81] Fix | Delete
[82] Fix | Delete
[83] Fix | Delete
#define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at
[84] Fix | Delete
mount time, don't wait for it to
[85] Fix | Delete
happen later */
[86] Fix | Delete
#define JFFS2_INO_FLAG_USERCOMPR 2 /* User has requested a specific
[87] Fix | Delete
compression type */
[88] Fix | Delete
[89] Fix | Delete
[90] Fix | Delete
/* These can go once we've made sure we've caught all uses without
[91] Fix | Delete
byteswapping */
[92] Fix | Delete
[93] Fix | Delete
typedef struct {
[94] Fix | Delete
__u32 v32;
[95] Fix | Delete
} __attribute__((packed)) jint32_t;
[96] Fix | Delete
[97] Fix | Delete
typedef struct {
[98] Fix | Delete
__u32 m;
[99] Fix | Delete
} __attribute__((packed)) jmode_t;
[100] Fix | Delete
[101] Fix | Delete
typedef struct {
[102] Fix | Delete
__u16 v16;
[103] Fix | Delete
} __attribute__((packed)) jint16_t;
[104] Fix | Delete
[105] Fix | Delete
struct jffs2_unknown_node
[106] Fix | Delete
{
[107] Fix | Delete
/* All start like this */
[108] Fix | Delete
jint16_t magic;
[109] Fix | Delete
jint16_t nodetype;
[110] Fix | Delete
jint32_t totlen; /* So we can skip over nodes we don't grok */
[111] Fix | Delete
jint32_t hdr_crc;
[112] Fix | Delete
};
[113] Fix | Delete
[114] Fix | Delete
struct jffs2_raw_dirent
[115] Fix | Delete
{
[116] Fix | Delete
jint16_t magic;
[117] Fix | Delete
jint16_t nodetype; /* == JFFS2_NODETYPE_DIRENT */
[118] Fix | Delete
jint32_t totlen;
[119] Fix | Delete
jint32_t hdr_crc;
[120] Fix | Delete
jint32_t pino;
[121] Fix | Delete
jint32_t version;
[122] Fix | Delete
jint32_t ino; /* == zero for unlink */
[123] Fix | Delete
jint32_t mctime;
[124] Fix | Delete
__u8 nsize;
[125] Fix | Delete
__u8 type;
[126] Fix | Delete
__u8 unused[2];
[127] Fix | Delete
jint32_t node_crc;
[128] Fix | Delete
jint32_t name_crc;
[129] Fix | Delete
__u8 name[0];
[130] Fix | Delete
};
[131] Fix | Delete
[132] Fix | Delete
/* The JFFS2 raw inode structure: Used for storage on physical media. */
[133] Fix | Delete
/* The uid, gid, atime, mtime and ctime members could be longer, but
[134] Fix | Delete
are left like this for space efficiency. If and when people decide
[135] Fix | Delete
they really need them extended, it's simple enough to add support for
[136] Fix | Delete
a new type of raw node.
[137] Fix | Delete
*/
[138] Fix | Delete
struct jffs2_raw_inode
[139] Fix | Delete
{
[140] Fix | Delete
jint16_t magic; /* A constant magic number. */
[141] Fix | Delete
jint16_t nodetype; /* == JFFS2_NODETYPE_INODE */
[142] Fix | Delete
jint32_t totlen; /* Total length of this node (inc data, etc.) */
[143] Fix | Delete
jint32_t hdr_crc;
[144] Fix | Delete
jint32_t ino; /* Inode number. */
[145] Fix | Delete
jint32_t version; /* Version number. */
[146] Fix | Delete
jmode_t mode; /* The file's type or mode. */
[147] Fix | Delete
jint16_t uid; /* The file's owner. */
[148] Fix | Delete
jint16_t gid; /* The file's group. */
[149] Fix | Delete
jint32_t isize; /* Total resultant size of this inode (used for truncations) */
[150] Fix | Delete
jint32_t atime; /* Last access time. */
[151] Fix | Delete
jint32_t mtime; /* Last modification time. */
[152] Fix | Delete
jint32_t ctime; /* Change time. */
[153] Fix | Delete
jint32_t offset; /* Where to begin to write. */
[154] Fix | Delete
jint32_t csize; /* (Compressed) data size */
[155] Fix | Delete
jint32_t dsize; /* Size of the node's data. (after decompression) */
[156] Fix | Delete
__u8 compr; /* Compression algorithm used */
[157] Fix | Delete
__u8 usercompr; /* Compression algorithm requested by the user */
[158] Fix | Delete
jint16_t flags; /* See JFFS2_INO_FLAG_* */
[159] Fix | Delete
jint32_t data_crc; /* CRC for the (compressed) data. */
[160] Fix | Delete
jint32_t node_crc; /* CRC for the raw inode (excluding data) */
[161] Fix | Delete
__u8 data[0];
[162] Fix | Delete
};
[163] Fix | Delete
[164] Fix | Delete
struct jffs2_raw_xattr {
[165] Fix | Delete
jint16_t magic;
[166] Fix | Delete
jint16_t nodetype; /* = JFFS2_NODETYPE_XATTR */
[167] Fix | Delete
jint32_t totlen;
[168] Fix | Delete
jint32_t hdr_crc;
[169] Fix | Delete
jint32_t xid; /* XATTR identifier number */
[170] Fix | Delete
jint32_t version;
[171] Fix | Delete
__u8 xprefix;
[172] Fix | Delete
__u8 name_len;
[173] Fix | Delete
jint16_t value_len;
[174] Fix | Delete
jint32_t data_crc;
[175] Fix | Delete
jint32_t node_crc;
[176] Fix | Delete
__u8 data[0];
[177] Fix | Delete
} __attribute__((packed));
[178] Fix | Delete
[179] Fix | Delete
struct jffs2_raw_xref
[180] Fix | Delete
{
[181] Fix | Delete
jint16_t magic;
[182] Fix | Delete
jint16_t nodetype; /* = JFFS2_NODETYPE_XREF */
[183] Fix | Delete
jint32_t totlen;
[184] Fix | Delete
jint32_t hdr_crc;
[185] Fix | Delete
jint32_t ino; /* inode number */
[186] Fix | Delete
jint32_t xid; /* XATTR identifier number */
[187] Fix | Delete
jint32_t xseqno; /* xref sequential number */
[188] Fix | Delete
jint32_t node_crc;
[189] Fix | Delete
} __attribute__((packed));
[190] Fix | Delete
[191] Fix | Delete
struct jffs2_raw_summary
[192] Fix | Delete
{
[193] Fix | Delete
jint16_t magic;
[194] Fix | Delete
jint16_t nodetype; /* = JFFS2_NODETYPE_SUMMARY */
[195] Fix | Delete
jint32_t totlen;
[196] Fix | Delete
jint32_t hdr_crc;
[197] Fix | Delete
jint32_t sum_num; /* number of sum entries*/
[198] Fix | Delete
jint32_t cln_mkr; /* clean marker size, 0 = no cleanmarker */
[199] Fix | Delete
jint32_t padded; /* sum of the size of padding nodes */
[200] Fix | Delete
jint32_t sum_crc; /* summary information crc */
[201] Fix | Delete
jint32_t node_crc; /* node crc */
[202] Fix | Delete
jint32_t sum[0]; /* inode summary info */
[203] Fix | Delete
};
[204] Fix | Delete
[205] Fix | Delete
union jffs2_node_union
[206] Fix | Delete
{
[207] Fix | Delete
struct jffs2_raw_inode i;
[208] Fix | Delete
struct jffs2_raw_dirent d;
[209] Fix | Delete
struct jffs2_raw_xattr x;
[210] Fix | Delete
struct jffs2_raw_xref r;
[211] Fix | Delete
struct jffs2_raw_summary s;
[212] Fix | Delete
struct jffs2_unknown_node u;
[213] Fix | Delete
};
[214] Fix | Delete
[215] Fix | Delete
/* Data payload for device nodes. */
[216] Fix | Delete
union jffs2_device_node {
[217] Fix | Delete
jint16_t old_id;
[218] Fix | Delete
jint32_t new_id;
[219] Fix | Delete
};
[220] Fix | Delete
[221] Fix | Delete
#endif /* __LINUX_JFFS2_H__ */
[222] Fix | Delete
[223] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function