Subversion Repositories QNX 8.QNX8 IFS tool

Rev

Rev 16 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16 Rev 26
Line 35... Line 35...
35
   unsigned __int16 zero0;         // [  ] Zeros
35
   unsigned __int16 zero0;         // [  ] Zeros
36
   unsigned __int32 zero[1];       // [  ] Zeros
36
   unsigned __int32 zero[1];       // [  ] Zeros
37
   unsigned __int64 addr_off;      // [ S] Offset to add to startup_vaddr, image_paddr, ram_paddr, and imagefs_paddr members, here zero (0)
37
   unsigned __int64 addr_off;      // [ S] Offset to add to startup_vaddr, image_paddr, ram_paddr, and imagefs_paddr members, here zero (0)
38
   unsigned __int32 info[48];      // [IS] Array of startup_info* structures (zero filled)
38
   unsigned __int32 info[48];      // [IS] Array of startup_info* structures (zero filled)
39
} startup_header;
39
} startup_header;
-
 
40
 
-
 
41
 
-
 
42
typedef struct startup_trailer_v1_s
-
 
43
{
-
 
44
   unsigned __int32 cksum; // checksum from start of header to start of trailer
-
 
45
} startup_trailer_v1_t;
-
 
46
 
-
 
47
typedef struct startup_trailer_v2_s
-
 
48
{
-
 
49
   unsigned __int8 sha512[64]; // SHA512 from start of header to start of trailer
-
 
50
   unsigned __int32 cksum; // checksum from start of header to start of this member
-
 
51
} startup_trailer_v2_t;
40
 
52
 
41
 
53
 
42
// image header (92 bytes)
54
// image header (92 bytes)
43
typedef struct image_header_s
55
typedef struct image_header_s
44
{
56
{
Line 85... Line 97...
85
   char path[header.size - 24]; // null terminated path (no leading slash)
97
   char path[header.size - 24]; // null terminated path (no leading slash)
86
} fsentry_dir_t;
98
} fsentry_dir_t;
87
 
99
 
88
 
100
 
89
typedef struct fsentry_file_s // when (mode & S_IFMT) == S_IFREG
101
typedef struct fsentry_file_s // when (mode & S_IFMT) == S_IFREG
90
{
102
{
91
   fsentry_header_t header;
103
   fsentry_header_t header;
92
__verify(((header.mode & 0x8000) == 0x8000) && ((header.mode & 0xa000) != 0xa000));
104
__verify(((header.mode & 0x8000) == 0x8000) && ((header.mode & 0xa000) != 0xa000));
93
   unsigned __int32 offset; // offset from header
105
   unsigned __int32 offset; // offset from header
94
   unsigned __int32 size;
106
   unsigned __int32 size;
95
   char path[header.size - 24 - 8]; // null terminated path (no leading slash)
107
   char path[header.size - 24 - 8]; // null terminated path (no leading slash)
96
} fsentry_file_t;
108
} fsentry_file_t;
97
 
109
 
98
 
110
 
99
typedef struct fsentry_symlink_s // when (mode & S_IFMT) == S_IFLNK
111
typedef struct fsentry_symlink_s // when (mode & S_IFMT) == S_IFLNK
100
{
112
{
101
   fsentry_header_t header;
113
   fsentry_header_t header;
102
__verify((header.mode & 0xa000) == 0xa000);
114
__verify((header.mode & 0xa000) == 0xa000);
103
   unsigned __int16 sym_offset;
115
   unsigned __int16 sym_offset;
104
   unsigned __int16 sym_size;
116
   unsigned __int16 sym_size;
105
   char path_and_symlink[header.size - 24 - 4]; // null terminated path (no leading slash)
117
   char path_and_symlink[header.size - 24 - 4]; // null terminated path (no leading slash)
106
} fsentry_symlink_t;
118
} fsentry_symlink_t;
Line 114... Line 126...
114
   unsigned __int32 rdev;
126
   unsigned __int32 rdev;
115
   char path[header.size - 24 - 8]; // null terminated path (no leading slash)
127
   char path[header.size - 24 - 8]; // null terminated path (no leading slash)
116
} fsentry_device_t;
128
} fsentry_device_t;
117
 
129
 
118
 
130
 
119
typedef struct image_trailer_s
131
typedef struct image_trailer_v1_s
120
{
132
{
121
   unsigned __int32 cksum; // checksum from start of header to start of trailer
133
   unsigned __int32 cksum; // checksum from start of header to start of trailer
122
} image_trailer_t;
134
} image_trailer_v1_t;
-
 
135
 
-
 
136
typedef struct image_trailer_v2_s
-
 
137
{
-
 
138
   unsigned __int8 sha512[64]; // SHA512 from start of header to start of trailer
-
 
139
   unsigned __int32 cksum; // checksum from start of header to start of this member
-
 
140
} image_trailer_v2_t;
123
 
141
 
124
 
142
 
125
 
143
 
126
 
144
 
127
 
145