1 /*
2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
6 void
initialize_adb_error_table(void)7 initialize_adb_error_table(void) {
8 }
9
10 #include <locale.h>
11 const char *
adb_error_table(long errorno)12 adb_error_table(long errorno) {
13
14 switch (errorno) {
15 case 0:
16 return (dgettext(TEXT_DOMAIN,
17 "No Error"));
18 case 1:
19 return (dgettext(TEXT_DOMAIN,
20 "Principal or policy already exists"));
21 case 2:
22 return (dgettext(TEXT_DOMAIN,
23 "Principal or policy does not exist"));
24 case 3:
25 return (dgettext(TEXT_DOMAIN,
26 "Database not initialized"));
27 case 4:
28 return (dgettext(TEXT_DOMAIN,
29 "Invalid policy name"));
30 case 5:
31 return (dgettext(TEXT_DOMAIN,
32 "Invalid principal name"));
33 case 6:
34 return (dgettext(TEXT_DOMAIN,
35 "Database inconsistency detected"));
36 case 7:
37 return (dgettext(TEXT_DOMAIN,
38 "XDR encoding error"));
39 case 8:
40 return (dgettext(TEXT_DOMAIN,
41 "Failure!"));
42 case 9:
43 return (dgettext(TEXT_DOMAIN,
44 "Bad lock mode"));
45 case 10:
46 return (dgettext(TEXT_DOMAIN,
47 "Cannot lock database"));
48 case 11:
49 return (dgettext(TEXT_DOMAIN,
50 "Database not locked"));
51 case 12:
52 return (dgettext(TEXT_DOMAIN,
53 "KADM5 administration database lock file missing"));
54 case 13:
55 return (dgettext(TEXT_DOMAIN,
56 "Insufficient permission to lock file"));
57 default:
58 return ("unknown error");
59 }
60 }
61