Create /dev/fuse device file
[appimagekit/gsi.git] / linux / rock.h
bloba6b2df3a3fbb2a46e6ab4da510d59256eee7d347
1 // this file was borrowed from linux kernel
2 // originally it has name /usr/src/linux/fs/isofs/rock.h
3 // unfortunately there was no copyright header on it,
4 // so i`m assume it have copyrighted under terms of
5 // GNU GENERAL PUBLIC LICENSE version 2
6 // as a whole linux kernel
7 // copy of this license included into fuseiso
8 // distribution in file COPYING
11 /* These structs are used by the system-use-sharing protocol, in which the
12 Rock Ridge extensions are embedded. It is quite possible that other
13 extensions are present on the disk, and this is fine as long as they
14 all use SUSP */
16 struct SU_SP{
17 unsigned char magic[2];
18 unsigned char skip;
19 } __attribute__((packed));
21 struct SU_CE{
22 char extent[8];
23 char offset[8];
24 char size[8];
27 struct SU_ER{
28 unsigned char len_id;
29 unsigned char len_des;
30 unsigned char len_src;
31 unsigned char ext_ver;
32 char data[0];
33 } __attribute__((packed));
35 struct RR_RR{
36 char flags[1];
37 } __attribute__((packed));
39 struct RR_PX{
40 char mode[8];
41 char n_links[8];
42 char uid[8];
43 char gid[8];
46 struct RR_PN{
47 char dev_high[8];
48 char dev_low[8];
52 struct SL_component{
53 unsigned char flags;
54 unsigned char len;
55 char text[0];
56 } __attribute__((packed));
58 struct RR_SL{
59 unsigned char flags;
60 struct SL_component link;
61 } __attribute__((packed));
63 struct RR_NM{
64 unsigned char flags;
65 char name[0];
66 } __attribute__((packed));
68 struct RR_CL{
69 char location[8];
72 struct RR_PL{
73 char location[8];
76 struct stamp{
77 char time[7];
78 } __attribute__((packed));
80 struct RR_TF{
81 char flags;
82 struct stamp times[0]; /* Variable number of these beasts */
83 } __attribute__((packed));
85 /* Linux-specific extension for transparent decompression */
86 struct RR_ZF{
87 char algorithm[2];
88 char parms[2];
89 char real_size[8];
92 /* These are the bits and their meanings for flags in the TF structure. */
93 #define TF_CREATE 1
94 #define TF_MODIFY 2
95 #define TF_ACCESS 4
96 #define TF_ATTRIBUTES 8
97 #define TF_BACKUP 16
98 #define TF_EXPIRATION 32
99 #define TF_EFFECTIVE 64
100 #define TF_LONG_FORM 128
102 struct rock_ridge{
103 char signature[2];
104 unsigned char len;
105 unsigned char version;
106 union{
107 struct SU_SP SP;
108 struct SU_CE CE;
109 struct SU_ER ER;
110 struct RR_RR RR;
111 struct RR_PX PX;
112 struct RR_PN PN;
113 struct RR_SL SL;
114 struct RR_NM NM;
115 struct RR_CL CL;
116 struct RR_PL PL;
117 struct RR_TF TF;
118 struct RR_ZF ZF;
119 } u;
122 #define RR_PX 1 /* POSIX attributes */
123 #define RR_PN 2 /* POSIX devices */
124 #define RR_SL 4 /* Symbolic link */
125 #define RR_NM 8 /* Alternate Name */
126 #define RR_CL 16 /* Child link */
127 #define RR_PL 32 /* Parent link */
128 #define RR_RE 64 /* Relocation directory */
129 #define RR_TF 128 /* Timestamps */