xref: /aosp_15_r20/external/e2fsprogs/lib/ext2fs/ext2_err.c (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker /*
2*6a54128fSAndroid Build Coastguard Worker  * ext2_err.c:
3*6a54128fSAndroid Build Coastguard Worker  * This file is automatically generated; please do not edit it.
4*6a54128fSAndroid Build Coastguard Worker  */
5*6a54128fSAndroid Build Coastguard Worker 
6*6a54128fSAndroid Build Coastguard Worker #include <stdlib.h>
7*6a54128fSAndroid Build Coastguard Worker 
8*6a54128fSAndroid Build Coastguard Worker #define N_(a) a
9*6a54128fSAndroid Build Coastguard Worker 
10*6a54128fSAndroid Build Coastguard Worker static const char * const text[] = {
11*6a54128fSAndroid Build Coastguard Worker 	N_(	"EXT2FS Library version android-t-qpr1-beta-2-gpl-369-g8ed4b2673"),
12*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for ext2_filsys structure"),
13*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for badblocks_list structure"),
14*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for badblocks_iterate structure"),
15*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for inode_scan structure"),
16*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for io_channel structure"),
17*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for unix io_channel structure"),
18*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for io_manager structure"),
19*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for block_bitmap structure"),
20*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for inode_bitmap structure"),
21*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for generic_bitmap structure"),
22*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for test io_channel structure"),
23*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for directory block list structure"),
24*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for icount structure"),
25*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for Powerquest io_channel structure"),
26*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for ext2 file structure"),
27*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for Ext2 Image Header"),
28*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for inode io_channel structure"),
29*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for ext4 extent handle"),
30*6a54128fSAndroid Build Coastguard Worker 	N_(	"Bad magic number in super-block"),
31*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem revision too high"),
32*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to write to filesystem opened read-only"),
33*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't read group descriptors"),
34*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't write group descriptors"),
35*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt group descriptor: bad block for block bitmap"),
36*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt group descriptor: bad block for inode bitmap"),
37*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt group descriptor: bad block for inode table"),
38*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't write an inode bitmap"),
39*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't read an inode bitmap"),
40*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't write a block bitmap"),
41*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't read a block bitmap"),
42*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't write an inode table"),
43*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't read an inode table"),
44*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't read next inode"),
45*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem has unexpected block size"),
46*6a54128fSAndroid Build Coastguard Worker 	N_(	"EXT2 directory corrupted"),
47*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to read block from filesystem resulted in short read"),
48*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to write block to filesystem resulted in short write"),
49*6a54128fSAndroid Build Coastguard Worker 	N_(	"No free space in the directory"),
50*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode bitmap not loaded"),
51*6a54128fSAndroid Build Coastguard Worker 	N_(	"Block bitmap not loaded"),
52*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal inode number"),
53*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal block number"),
54*6a54128fSAndroid Build Coastguard Worker 	N_(	"Internal error in ext2fs_expand_dir"),
55*6a54128fSAndroid Build Coastguard Worker 	N_(	"Not enough space to build proposed filesystem"),
56*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal block number passed to ext2fs_mark_block_bitmap"),
57*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal block number passed to ext2fs_unmark_block_bitmap"),
58*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal block number passed to ext2fs_test_block_bitmap"),
59*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal inode number passed to ext2fs_mark_inode_bitmap"),
60*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal inode number passed to ext2fs_unmark_inode_bitmap"),
61*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal inode number passed to ext2fs_test_inode_bitmap"),
62*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to fudge end of block bitmap past the real end"),
63*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to fudge end of inode bitmap past the real end"),
64*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal indirect block found" ),
65*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal doubly indirect block found" ),
66*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal triply indirect block found" ),
67*6a54128fSAndroid Build Coastguard Worker 	N_(	"Block bitmaps are not the same"),
68*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode bitmaps are not the same"),
69*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal or malformed device name"),
70*6a54128fSAndroid Build Coastguard Worker 	N_(	"A block group is missing an inode table"),
71*6a54128fSAndroid Build Coastguard Worker 	N_(	"The ext2 superblock is corrupt"),
72*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal generic bit number passed to ext2fs_mark_generic_bitmap"),
73*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal generic bit number passed to ext2fs_unmark_generic_bitmap"),
74*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal generic bit number passed to ext2fs_test_generic_bitmap"),
75*6a54128fSAndroid Build Coastguard Worker 	N_(	"Too many symbolic links encountered."),
76*6a54128fSAndroid Build Coastguard Worker 	N_(	"The callback function will not handle this case"),
77*6a54128fSAndroid Build Coastguard Worker 	N_(	"The inode is from a bad block in the inode table"),
78*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem has unsupported feature(s)"),
79*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem has unsupported read-only feature(s)"),
80*6a54128fSAndroid Build Coastguard Worker 	N_(	"IO Channel failed to seek on read or write"),
81*6a54128fSAndroid Build Coastguard Worker 	N_(	"Memory allocation failed"),
82*6a54128fSAndroid Build Coastguard Worker 	N_(	"Invalid argument passed to ext2 library"),
83*6a54128fSAndroid Build Coastguard Worker 	N_(	"Could not allocate block in ext2 filesystem"),
84*6a54128fSAndroid Build Coastguard Worker 	N_(	"Could not allocate inode in ext2 filesystem"),
85*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2 inode is not a directory"),
86*6a54128fSAndroid Build Coastguard Worker 	N_(	"Too many references in table"),
87*6a54128fSAndroid Build Coastguard Worker 	N_(	"File not found by ext2_lookup"),
88*6a54128fSAndroid Build Coastguard Worker 	N_(	"File open read-only"),
89*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2 directory block not found"),
90*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2 directory already exists"),
91*6a54128fSAndroid Build Coastguard Worker 	N_(	"Unimplemented ext2 library function"),
92*6a54128fSAndroid Build Coastguard Worker 	N_(	"User cancel requested"),
93*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2 file too big"),
94*6a54128fSAndroid Build Coastguard Worker 	N_(	"Supplied journal device not a block device"),
95*6a54128fSAndroid Build Coastguard Worker 	N_(	"Journal superblock not found"),
96*6a54128fSAndroid Build Coastguard Worker 	N_(	"Journal must be at least 1024 blocks"),
97*6a54128fSAndroid Build Coastguard Worker 	N_(	"Unsupported journal version"),
98*6a54128fSAndroid Build Coastguard Worker 	N_(	"Error loading external journal"),
99*6a54128fSAndroid Build Coastguard Worker 	N_(	"Journal not found"),
100*6a54128fSAndroid Build Coastguard Worker 	N_(	"Directory hash unsupported"),
101*6a54128fSAndroid Build Coastguard Worker 	N_(	"Illegal extended attribute block number"),
102*6a54128fSAndroid Build Coastguard Worker 	N_(	"Cannot create filesystem with requested number of inodes"),
103*6a54128fSAndroid Build Coastguard Worker 	N_(	"E2image snapshot not in use"),
104*6a54128fSAndroid Build Coastguard Worker 	N_(	"Too many reserved group descriptor blocks"),
105*6a54128fSAndroid Build Coastguard Worker 	N_(	"Resize inode is corrupt"),
106*6a54128fSAndroid Build Coastguard Worker 	N_(	"Tried to set block bmap with missing indirect block"),
107*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Success"),
108*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Corrupt database"),
109*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: IO Error"),
110*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Locking error"),
111*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Out of memory"),
112*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Record exists"),
113*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Lock exists on other keys"),
114*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Invalid parameter"),
115*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Record does not exist"),
116*6a54128fSAndroid Build Coastguard Worker 	N_(	"TDB: Write not permitted"),
117*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2fs directory block list is empty"),
118*6a54128fSAndroid Build Coastguard Worker 	N_(	"Attempt to modify a block mapping via a read-only block iterator"),
119*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for ext4 extent saved path"),
120*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for 64-bit generic bitmap"),
121*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for 64-bit block bitmap"),
122*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for 64-bit inode bitmap"),
123*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_13"),
124*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_14"),
125*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_15"),
126*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_16"),
127*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_17"),
128*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_18"),
129*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number --- RESERVED_19"),
130*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt extent header"),
131*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt extent index"),
132*6a54128fSAndroid Build Coastguard Worker 	N_(	"Corrupt extent"),
133*6a54128fSAndroid Build Coastguard Worker 	N_(	"No free space in extent map"),
134*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode does not use extents"),
135*6a54128fSAndroid Build Coastguard Worker 	N_(	"No 'next' extent"),
136*6a54128fSAndroid Build Coastguard Worker 	N_(	"No 'previous' extent"),
137*6a54128fSAndroid Build Coastguard Worker 	N_(	"No 'up' extent"),
138*6a54128fSAndroid Build Coastguard Worker 	N_(	"No 'down' extent"),
139*6a54128fSAndroid Build Coastguard Worker 	N_(	"No current node"),
140*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2fs operation not supported"),
141*6a54128fSAndroid Build Coastguard Worker 	N_(	"No room to insert extent in node"),
142*6a54128fSAndroid Build Coastguard Worker 	N_(	"Splitting would result in empty node"),
143*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extent not found"),
144*6a54128fSAndroid Build Coastguard Worker 	N_(	"Operation not supported for inodes containing extents"),
145*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extent length is invalid"),
146*6a54128fSAndroid Build Coastguard Worker 	N_(	"I/O Channel does not support 64-bit block numbers"),
147*6a54128fSAndroid Build Coastguard Worker 	N_(	"Can't check if filesystem is mounted due to missing mtab file"),
148*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem too large to use legacy bitmaps"),
149*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: invalid magic number"),
150*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: device currently active"),
151*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: e2fsck being run"),
152*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: block number beyond filesystem range"),
153*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: undergoing an unknown operation"),
154*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: filesystem still in use"),
155*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP: open with O_DIRECT failed"),
156*6a54128fSAndroid Build Coastguard Worker 	N_(	"Block group descriptor size incorrect"),
157*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode checksum does not match inode"),
158*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode bitmap checksum does not match bitmap"),
159*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extent block checksum does not match extent block"),
160*6a54128fSAndroid Build Coastguard Worker 	N_(	"Directory block does not have space for checksum"),
161*6a54128fSAndroid Build Coastguard Worker 	N_(	"Directory block checksum does not match directory block"),
162*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute block checksum does not match block"),
163*6a54128fSAndroid Build Coastguard Worker 	N_(	"Superblock checksum does not match superblock"),
164*6a54128fSAndroid Build Coastguard Worker 	N_(	"Unknown checksum algorithm"),
165*6a54128fSAndroid Build Coastguard Worker 	N_(	"MMP block checksum does not match"),
166*6a54128fSAndroid Build Coastguard Worker 	N_(	"Ext2 file already exists"),
167*6a54128fSAndroid Build Coastguard Worker 	N_(	"Block bitmap checksum does not match bitmap"),
168*6a54128fSAndroid Build Coastguard Worker 	N_(	"Cannot iterate data blocks of an inode containing inline data"),
169*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute has an invalid name length"),
170*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute has an invalid value length"),
171*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute has an incorrect hash"),
172*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute block has a bad header"),
173*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute key not found"),
174*6a54128fSAndroid Build Coastguard Worker 	N_(	"Insufficient space to store extended attribute data"),
175*6a54128fSAndroid Build Coastguard Worker 	N_(	"Filesystem is missing ext_attr or inline_data feature"),
176*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode doesn't have inline data"),
177*6a54128fSAndroid Build Coastguard Worker 	N_(	"No block for an inode with inline data"),
178*6a54128fSAndroid Build Coastguard Worker 	N_(	"No free space in inline data"),
179*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong magic number for extended attribute structure"),
180*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode seems to contain garbage"),
181*6a54128fSAndroid Build Coastguard Worker 	N_(	"Extended attribute has an invalid value offset"),
182*6a54128fSAndroid Build Coastguard Worker 	N_(	"Journal flags inconsistent"),
183*6a54128fSAndroid Build Coastguard Worker 	N_(	"Undo file corrupt"),
184*6a54128fSAndroid Build Coastguard Worker 	N_(	"Wrong undo file for this filesystem"),
185*6a54128fSAndroid Build Coastguard Worker 	N_(	"File system is corrupted"),
186*6a54128fSAndroid Build Coastguard Worker 	N_(	"Bad CRC detected in file system"),
187*6a54128fSAndroid Build Coastguard Worker 	N_(	"The journal superblock is corrupt"),
188*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode is corrupted"),
189*6a54128fSAndroid Build Coastguard Worker 	N_(	"Inode containing extended attribute value is corrupted"),
190*6a54128fSAndroid Build Coastguard Worker 	N_(	"Group descriptors not loaded"),
191*6a54128fSAndroid Build Coastguard Worker 	N_(	"The internal ext2_filsys data structure appears to be corrupted"),
192*6a54128fSAndroid Build Coastguard Worker 	N_(	"Found cyclic loop in extent tree"),
193*6a54128fSAndroid Build Coastguard Worker 	N_(	"Operation not supported on an external journal"),
194*6a54128fSAndroid Build Coastguard Worker     0
195*6a54128fSAndroid Build Coastguard Worker };
196*6a54128fSAndroid Build Coastguard Worker 
197*6a54128fSAndroid Build Coastguard Worker struct error_table {
198*6a54128fSAndroid Build Coastguard Worker     char const * const * msgs;
199*6a54128fSAndroid Build Coastguard Worker     long base;
200*6a54128fSAndroid Build Coastguard Worker     int n_msgs;
201*6a54128fSAndroid Build Coastguard Worker };
202*6a54128fSAndroid Build Coastguard Worker struct et_list {
203*6a54128fSAndroid Build Coastguard Worker     struct et_list *next;
204*6a54128fSAndroid Build Coastguard Worker     const struct error_table * table;
205*6a54128fSAndroid Build Coastguard Worker };
206*6a54128fSAndroid Build Coastguard Worker extern struct et_list *_et_list;
207*6a54128fSAndroid Build Coastguard Worker 
208*6a54128fSAndroid Build Coastguard Worker const struct error_table et_ext2_error_table = { text, 2133571328L, 183 };
209*6a54128fSAndroid Build Coastguard Worker 
210*6a54128fSAndroid Build Coastguard Worker static struct et_list link = { 0, 0 };
211*6a54128fSAndroid Build Coastguard Worker 
212*6a54128fSAndroid Build Coastguard Worker void initialize_ext2_error_table_r(struct et_list **list);
213*6a54128fSAndroid Build Coastguard Worker void initialize_ext2_error_table(void);
214*6a54128fSAndroid Build Coastguard Worker 
initialize_ext2_error_table(void)215*6a54128fSAndroid Build Coastguard Worker void initialize_ext2_error_table(void) {
216*6a54128fSAndroid Build Coastguard Worker     initialize_ext2_error_table_r(&_et_list);
217*6a54128fSAndroid Build Coastguard Worker }
218*6a54128fSAndroid Build Coastguard Worker 
219*6a54128fSAndroid Build Coastguard Worker /* For Heimdal compatibility */
initialize_ext2_error_table_r(struct et_list ** list)220*6a54128fSAndroid Build Coastguard Worker void initialize_ext2_error_table_r(struct et_list **list)
221*6a54128fSAndroid Build Coastguard Worker {
222*6a54128fSAndroid Build Coastguard Worker     struct et_list *et, **end;
223*6a54128fSAndroid Build Coastguard Worker 
224*6a54128fSAndroid Build Coastguard Worker     for (end = list, et = *list; et; end = &et->next, et = et->next)
225*6a54128fSAndroid Build Coastguard Worker         if (et->table->msgs == text)
226*6a54128fSAndroid Build Coastguard Worker             return;
227*6a54128fSAndroid Build Coastguard Worker     et = malloc(sizeof(struct et_list));
228*6a54128fSAndroid Build Coastguard Worker     if (et == 0) {
229*6a54128fSAndroid Build Coastguard Worker         if (!link.table)
230*6a54128fSAndroid Build Coastguard Worker             et = &link;
231*6a54128fSAndroid Build Coastguard Worker         else
232*6a54128fSAndroid Build Coastguard Worker             return;
233*6a54128fSAndroid Build Coastguard Worker     }
234*6a54128fSAndroid Build Coastguard Worker     et->table = &et_ext2_error_table;
235*6a54128fSAndroid Build Coastguard Worker     et->next = 0;
236*6a54128fSAndroid Build Coastguard Worker     *end = et;
237*6a54128fSAndroid Build Coastguard Worker }
238