f6238390fc77feeeae6ece78917075f11c4da9cf
[openafs.git] / src / volser / common.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
13 RCSID
14     ("$Header$");
15
16 #include <stdio.h>
17 #include <afs/afsutil.h>
18 #include <afs/com_err.h>
19
20 /*@printflike@*/ void
21 Log(const char *format, ...)
22 {
23     va_list args;
24
25     va_start(args, format);
26     vViceLog(0, (format, args));
27     va_end(args);
28 }
29
30 void
31 LogError(afs_int32 errcode)
32 {
33     ViceLog(0,
34             ("%s: %s\n", error_table_name(errcode), error_message(errcode)));
35 }
36
37 /*@printflike@*/ void
38 Abort(const char *format, ...)
39 {
40     va_list args;
41
42     ViceLog(0, ("Program aborted: "));
43     va_start(args, format);
44     vViceLog(0, (format, args));
45     va_end(args);
46     abort();
47 }
48
49 void
50 InitErrTabs(void)
51 {
52     initialize_KA_error_table();
53     initialize_RXK_error_table();
54     initialize_KTC_error_table();
55     initialize_ACFG_error_table();
56     initialize_CMD_error_table();
57     initialize_VL_error_table();
58     initialize_VOLS_error_table();
59     return;
60 }