Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / volser / common.c
blob8c4f6f3a24377f1376b1263e6a69bf90841d490d
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
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 */
10 #include <afsconfig.h>
11 #include <afs/param.h>
13 #include <stdio.h>
14 #include <stdlib.h>
16 #include <afs/afsutil.h>
17 #include <afs/com_err.h>
19 #ifndef AFS_PTHREAD_ENV
20 #include <afs/kautils.h>
21 #include <rx/rxkad.h>
22 #include <afs/auth.h>
23 #include <afs/cellconfig.h>
24 #include <afs/cmd.h>
25 #include <afs/vlserver.h>
26 #include "volser.h"
27 #endif
29 #ifndef AFS_PTHREAD_ENV
30 /*@printflike@*/ void
31 Log(const char *format, ...)
33 va_list args;
35 va_start(args, format);
36 vViceLog(0, (format, args));
37 va_end(args);
39 #endif
41 void
42 LogError(afs_int32 errcode)
44 ViceLog(0,
45 ("%s: %s\n", afs_error_table_name(errcode), afs_error_message(errcode)));
48 #ifndef AFS_PTHREAD_ENV
49 /*@printflike@*/ void
50 Abort(const char *format, ...)
52 va_list args;
54 ViceLog(0, ("Program aborted: "));
55 va_start(args, format);
56 vViceLog(0, (format, args));
57 va_end(args);
58 abort();
60 #endif
62 void
63 InitErrTabs(void)
65 #ifndef AFS_PTHREAD_ENV
66 initialize_KA_error_table();
67 initialize_RXK_error_table();
68 initialize_KTC_error_table();
69 initialize_ACFG_error_table();
70 initialize_CMD_error_table();
71 initialize_VL_error_table();
72 initialize_VOLS_error_table();
73 #endif
74 return;