2 * Copyright 2000, International Business Machines Corporation and others.
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
11 * Revision 1.8 90/03/02 12:00:19
12 * Add bos error codes.
13 * Print usage message when called w/o arguments.
14 * If given multiple arguments, loop and translate each.
16 * Revision 1.7 89/12/30 00:31:06
17 * renamed initialize_pr_error_table -> initialize_pt_error_table
19 * Revision 1.6 89/12/29 16:49:05
20 * replaced all references of prserver/pr* -> ptserver/pt*
22 * Revision 1.5 89/05/12 09:44:36
23 * Added prserver and ubik to list.
25 * Revision 1.4 89/03/13 12:30:38
26 * Simplify code to call error_table_name a little.
28 * Revision 1.3 89/02/19 19:31:17
29 * added the vlserver error package
31 * Revision 1.2 89/02/03 15:28:10
32 * Added copyright, added cmd to list of known error_tables.
34 #include <afs/param.h>
35 #include <afs/com_err.h>
37 #include <afs/kautils.h>
39 #include <afs/cellconfig.h>
41 #include <afs/vlserver.h>
42 #include <afs/pterror.h>
43 #include <afs/bnode.h>
50 #define ERRCODE_RANGE 8 /* from error_table.h */
52 #include "AFS_component_version_number.c"
64 * The following signal action for AIX is necessary so that in case of a
65 * crash (i.e. core is generated) we can include the user's data section
66 * in the core dump. Unfortunately, by default, only a partial core is
67 * generated which, in many cases, isn't too useful.
71 sigemptyset(&nsa.sa_mask);
72 nsa.sa_handler = SIG_DFL;
73 nsa.sa_flags = SA_FULLDUMP;
74 sigaction(SIGSEGV, &nsa, NULL);
76 initialize_ka_error_table();
77 initialize_rxk_error_table();
78 initialize_ktc_error_table();
79 initialize_acfg_error_table();
80 initialize_cmd_error_table();
81 initialize_vl_error_table();
82 initialize_pt_error_table();
83 initialize_bz_error_table();
84 initialize_u_error_table();
85 initialize_vols_error_table();
88 fprintf (stderr, "Usage is: %s [<code>]+\n", argv[0]);
92 for (i=1; i<argc; i++) {
94 offset = code & ((1<<ERRCODE_RANGE)-1);
96 printf ("%d (%s).%d = %s\n", code, error_table_name (code), offset,
97 error_message (code));