Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / finale / translate_et_nt.c
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 #include <afsconfig.h>
11 #include <afs/param.h>
12 #include <afs/stds.h>
13
14 #include <roken.h>
15
16 #include <afs/afs_Admin.h>
17 #include <afs/afs_utilAdmin.h>
18 #include <afs/afs_clientAdmin.h>
19
20 int
21 main(int argc, char **argv)
22 {
23 int i;
24 afs_status_t status;
25
26 if (argc < 2) {
27 fprintf(stderr, "Usage is: %s [<code>]+\n", argv[0]);
28 exit(1);
29 }
30
31 if (!afsclient_Init(&status)) {
32 fprintf(stderr, "Unable to initialize error tables\n");
33 exit(1);
34 }
35
36 for (i = 1; i < argc; i++) {
37 const char *errText;
38 afs_status_t errStatus;
39
40 status = (afs_status_t) atoi(argv[i]);
41 util_AdminErrorCodeTranslate(status, 0, &errText, &errStatus);
42 printf("%d = %s\n", status, errText);
43 }
44 return 0;
45 }