File indexing completed on 2024-05-12 04:51:15
0001 /* this header is from the linux kernel */ 0002 0003 #ifndef ROCK_H 0004 #define ROCK_H 1 0005 0006 /* These structs are used by the system-use-sharing protocol, in which the 0007 Rock Ridge extensions are embedded. It is quite possible that other 0008 extensions are present on the disk, and this is fine as long as they 0009 all use SUSP */ 0010 0011 struct SU_SP{ 0012 unsigned char magic[2]; 0013 unsigned char skip; 0014 }; 0015 0016 struct SU_CE{ 0017 char extent[8]; 0018 char offset[8]; 0019 char size[8]; 0020 }; 0021 0022 struct SU_ER{ 0023 unsigned char len_id; 0024 unsigned char len_des; 0025 unsigned char len_src; 0026 unsigned char ext_ver; 0027 char data[1]; 0028 }; 0029 0030 struct RR_RR{ 0031 char flags[1]; 0032 }; 0033 0034 struct RR_PX{ 0035 char mode[8]; 0036 char n_links[8]; 0037 char uid[8]; 0038 char gid[8]; 0039 char serno[8]; 0040 }; 0041 0042 struct RR_PN{ 0043 char dev_high[8]; 0044 char dev_low[8]; 0045 }; 0046 0047 0048 struct SL_component{ 0049 unsigned char flags; 0050 unsigned char len; 0051 char text[1]; 0052 }; 0053 0054 struct RR_SL{ 0055 unsigned char flags; 0056 struct SL_component link; 0057 }; 0058 0059 struct RR_NM{ 0060 unsigned char flags; 0061 char name[1]; 0062 }; 0063 0064 struct RR_CL{ 0065 char location[8]; 0066 }; 0067 0068 struct RR_PL{ 0069 char location[8]; 0070 }; 0071 0072 struct stamp{ 0073 char time[7]; 0074 }; 0075 0076 struct RR_TF{ 0077 char flags; 0078 struct stamp times[1]; /* Variable number of these beasts */ 0079 }; 0080 0081 /* Linux-specific extension for transparent decompression */ 0082 struct RR_ZF{ 0083 char algorithm[2]; 0084 char parms[2]; 0085 char real_size[8]; 0086 }; 0087 0088 /* These are the bits and their meanings for flags in the TF structure. */ 0089 #define TF_CREATE 1 0090 #define TF_MODIFY 2 0091 #define TF_ACCESS 4 0092 #define TF_ATTRIBUTES 8 0093 #define TF_BACKUP 16 0094 #define TF_EXPIRATION 32 0095 #define TF_EFFECTIVE 64 0096 #define TF_LONG_FORM 128 0097 0098 struct rock_ridge{ 0099 char signature[2]; 0100 char len; /* 711 */ 0101 char version; /* 711 */ 0102 union{ 0103 struct SU_SP SP; 0104 struct SU_CE CE; 0105 struct SU_ER ER; 0106 struct RR_RR RR; 0107 struct RR_PX PX; 0108 struct RR_PN PN; 0109 struct RR_SL SL; 0110 struct RR_NM NM; 0111 struct RR_CL CL; 0112 struct RR_PL PL; 0113 struct RR_TF TF; 0114 struct RR_ZF ZF; 0115 } u; 0116 }; 0117 0118 #define RR_PX 1 /* POSIX attributes */ 0119 #define RR_PN 2 /* POSIX devices */ 0120 #define RR_SL 4 /* Symbolic link */ 0121 #define RR_NM 8 /* Alternate Name */ 0122 #define RR_CL 16 /* Child link */ 0123 #define RR_PL 32 /* Parent link */ 0124 #define RR_RE 64 /* Relocation directory */ 0125 #define RR_TF 128 /* Timestamps */ 0126 0127 #endif /* ROCK_H */