xref: /aosp_15_r20/external/e2fsprogs/lib/ss/ss_err.c (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker /*
2*6a54128fSAndroid Build Coastguard Worker  * ss_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_(	"Subsystem aborted"),
12*6a54128fSAndroid Build Coastguard Worker 	N_(	"Version mismatch"),
13*6a54128fSAndroid Build Coastguard Worker 	N_(	"No current invocation"),
14*6a54128fSAndroid Build Coastguard Worker 	N_(	"No info directory"),
15*6a54128fSAndroid Build Coastguard Worker 	N_(	"Command not found"),
16*6a54128fSAndroid Build Coastguard Worker 	N_(	"Command line aborted"),
17*6a54128fSAndroid Build Coastguard Worker 	N_(	"End-of-file reached"),
18*6a54128fSAndroid Build Coastguard Worker 	N_(	"Permission denied"),
19*6a54128fSAndroid Build Coastguard Worker 	N_(	"Request table not found"),
20*6a54128fSAndroid Build Coastguard Worker 	N_(	"No info available"),
21*6a54128fSAndroid Build Coastguard Worker 	N_(	"Shell escapes are disabled"),
22*6a54128fSAndroid Build Coastguard Worker 	N_(	"Sorry, this request is not yet implemented"),
23*6a54128fSAndroid Build Coastguard Worker     0
24*6a54128fSAndroid Build Coastguard Worker };
25*6a54128fSAndroid Build Coastguard Worker 
26*6a54128fSAndroid Build Coastguard Worker struct error_table {
27*6a54128fSAndroid Build Coastguard Worker     char const * const * msgs;
28*6a54128fSAndroid Build Coastguard Worker     long base;
29*6a54128fSAndroid Build Coastguard Worker     int n_msgs;
30*6a54128fSAndroid Build Coastguard Worker };
31*6a54128fSAndroid Build Coastguard Worker struct et_list {
32*6a54128fSAndroid Build Coastguard Worker     struct et_list *next;
33*6a54128fSAndroid Build Coastguard Worker     const struct error_table * table;
34*6a54128fSAndroid Build Coastguard Worker };
35*6a54128fSAndroid Build Coastguard Worker extern struct et_list *_et_list;
36*6a54128fSAndroid Build Coastguard Worker 
37*6a54128fSAndroid Build Coastguard Worker const struct error_table et_ss_error_table = { text, 748800L, 12 };
38*6a54128fSAndroid Build Coastguard Worker 
39*6a54128fSAndroid Build Coastguard Worker static struct et_list link = { 0, 0 };
40*6a54128fSAndroid Build Coastguard Worker 
41*6a54128fSAndroid Build Coastguard Worker void initialize_ss_error_table_r(struct et_list **list);
42*6a54128fSAndroid Build Coastguard Worker void initialize_ss_error_table(void);
43*6a54128fSAndroid Build Coastguard Worker 
initialize_ss_error_table(void)44*6a54128fSAndroid Build Coastguard Worker void initialize_ss_error_table(void) {
45*6a54128fSAndroid Build Coastguard Worker     initialize_ss_error_table_r(&_et_list);
46*6a54128fSAndroid Build Coastguard Worker }
47*6a54128fSAndroid Build Coastguard Worker 
48*6a54128fSAndroid Build Coastguard Worker /* For Heimdal compatibility */
initialize_ss_error_table_r(struct et_list ** list)49*6a54128fSAndroid Build Coastguard Worker void initialize_ss_error_table_r(struct et_list **list)
50*6a54128fSAndroid Build Coastguard Worker {
51*6a54128fSAndroid Build Coastguard Worker     struct et_list *et, **end;
52*6a54128fSAndroid Build Coastguard Worker 
53*6a54128fSAndroid Build Coastguard Worker     for (end = list, et = *list; et; end = &et->next, et = et->next)
54*6a54128fSAndroid Build Coastguard Worker         if (et->table->msgs == text)
55*6a54128fSAndroid Build Coastguard Worker             return;
56*6a54128fSAndroid Build Coastguard Worker     et = malloc(sizeof(struct et_list));
57*6a54128fSAndroid Build Coastguard Worker     if (et == 0) {
58*6a54128fSAndroid Build Coastguard Worker         if (!link.table)
59*6a54128fSAndroid Build Coastguard Worker             et = &link;
60*6a54128fSAndroid Build Coastguard Worker         else
61*6a54128fSAndroid Build Coastguard Worker             return;
62*6a54128fSAndroid Build Coastguard Worker     }
63*6a54128fSAndroid Build Coastguard Worker     et->table = &et_ss_error_table;
64*6a54128fSAndroid Build Coastguard Worker     et->next = 0;
65*6a54128fSAndroid Build Coastguard Worker     *end = et;
66*6a54128fSAndroid Build Coastguard Worker }
67