nlm: Ensure callback code also checks that the files match
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / amigaffs.h
CommitLineData
1da177e4
LT
1#ifndef AMIGAFFS_H
2#define AMIGAFFS_H
3
4#include <linux/types.h>
5#include <asm/byteorder.h>
6
7#define FS_OFS 0x444F5300
8#define FS_FFS 0x444F5301
9#define FS_INTLOFS 0x444F5302
10#define FS_INTLFFS 0x444F5303
11#define FS_DCOFS 0x444F5304
12#define FS_DCFFS 0x444F5305
13#define MUFS_FS 0x6d754653 /* 'muFS' */
14#define MUFS_OFS 0x6d754600 /* 'muF\0' */
15#define MUFS_FFS 0x6d754601 /* 'muF\1' */
16#define MUFS_INTLOFS 0x6d754602 /* 'muF\2' */
17#define MUFS_INTLFFS 0x6d754603 /* 'muF\3' */
18#define MUFS_DCOFS 0x6d754604 /* 'muF\4' */
19#define MUFS_DCFFS 0x6d754605 /* 'muF\5' */
20
21#define T_SHORT 2
22#define T_LIST 16
23#define T_DATA 8
24
25#define ST_LINKFILE -4
26#define ST_FILE -3
27#define ST_ROOT 1
28#define ST_USERDIR 2
29#define ST_SOFTLINK 3
30#define ST_LINKDIR 4
31
32#define AFFS_ROOT_BMAPS 25
33
34struct affs_date {
35 __be32 days;
36 __be32 mins;
37 __be32 ticks;
38};
39
40struct affs_short_date {
41 __be16 days;
42 __be16 mins;
43 __be16 ticks;
44};
45
46struct affs_root_head {
47 __be32 ptype;
48 __be32 spare1;
49 __be32 spare2;
50 __be32 hash_size;
51 __be32 spare3;
52 __be32 checksum;
53 __be32 hashtable[1];
54};
55
56struct affs_root_tail {
57 __be32 bm_flag;
58 __be32 bm_blk[AFFS_ROOT_BMAPS];
59 __be32 bm_ext;
60 struct affs_date root_change;
61 u8 disk_name[32];
62 __be32 spare1;
63 __be32 spare2;
64 struct affs_date disk_change;
65 struct affs_date disk_create;
66 __be32 spare3;
67 __be32 spare4;
68 __be32 dcache;
69 __be32 stype;
70};
71
72struct affs_head {
73 __be32 ptype;
74 __be32 key;
75 __be32 block_count;
76 __be32 spare1;
77 __be32 first_data;
78 __be32 checksum;
79 __be32 table[1];
80};
81
82struct affs_tail {
83 __be32 spare1;
84 __be16 uid;
85 __be16 gid;
86 __be32 protect;
87 __be32 size;
88 u8 comment[92];
89 struct affs_date change;
90 u8 name[32];
91 __be32 spare2;
92 __be32 original;
93 __be32 link_chain;
94 __be32 spare[5];
95 __be32 hash_chain;
96 __be32 parent;
97 __be32 extension;
98 __be32 stype;
99};
100
101struct slink_front
102{
103 __be32 ptype;
104 __be32 key;
105 __be32 spare1[3];
106 __be32 checksum;
107 u8 symname[1]; /* depends on block size */
108};
109
110struct affs_data_head
111{
112 __be32 ptype;
113 __be32 key;
114 __be32 sequence;
115 __be32 size;
116 __be32 next;
117 __be32 checksum;
118 u8 data[1]; /* depends on block size */
119};
120
121/* Permission bits */
122
123#define FIBF_OTR_READ 0x8000
124#define FIBF_OTR_WRITE 0x4000
125#define FIBF_OTR_EXECUTE 0x2000
126#define FIBF_OTR_DELETE 0x1000
127#define FIBF_GRP_READ 0x0800
128#define FIBF_GRP_WRITE 0x0400
129#define FIBF_GRP_EXECUTE 0x0200
130#define FIBF_GRP_DELETE 0x0100
131
132#define FIBF_HIDDEN 0x0080
133#define FIBF_SCRIPT 0x0040
134#define FIBF_PURE 0x0020 /* no use under linux */
135#define FIBF_ARCHIVED 0x0010 /* never set, always cleared on write */
136#define FIBF_NOREAD 0x0008 /* 0 means allowed */
137#define FIBF_NOWRITE 0x0004 /* 0 means allowed */
138#define FIBF_NOEXECUTE 0x0002 /* 0 means allowed, ignored under linux */
139#define FIBF_NODELETE 0x0001 /* 0 means allowed */
140
141#define FIBF_OWNER 0x000F /* Bits pertaining to owner */
142#define FIBF_MASK 0xEE0E /* Bits modified by Linux */
143
144#endif