volser: Tidy header includes
[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 #include <roken.h>
14
15 #include <afs/afsutil.h>
16 #include <afs/com_err.h>
17
18 #ifndef AFS_PTHREAD_ENV
19 #include <afs/kautils.h>
20 #include <rx/rxkad.h>
21 #include <afs/auth.h>
22 #include <afs/cellconfig.h>
23 #include <afs/cmd.h>
24 #include <afs/vlserver.h>
25 #include "volser.h"
26 #endif
27
28 #ifndef AFS_PTHREAD_ENV
29 /*@printflike@*/ void
30 Log(const char *format, ...)
31 {
32     va_list args;
33
34     va_start(args, format);
35     vViceLog(0, (format, args));
36     va_end(args);
37 }
38 #endif
39
40 void
41 LogError(afs_int32 errcode)
42 {
43     ViceLog(0,
44             ("%s: %s\n", afs_error_table_name(errcode), afs_error_message(errcode)));
45 }
46
47 #ifndef AFS_PTHREAD_ENV
48 /*@printflike@*/ void
49 Abort(const char *format, ...)
50 {
51     va_list args;
52
53     ViceLog(0, ("Program aborted: "));
54     va_start(args, format);
55     vViceLog(0, (format, args));
56     va_end(args);
57     abort();
58 }
59 #endif
60
61 void
62 InitErrTabs(void)
63 {
64 #ifndef AFS_PTHREAD_ENV
65     initialize_KA_error_table();
66     initialize_RXK_error_table();
67     initialize_KTC_error_table();
68     initialize_ACFG_error_table();
69     initialize_CMD_error_table();
70     initialize_VL_error_table();
71     initialize_VOLS_error_table();
72 #endif
73     return;
74 }