RW Replication: Add basic definitions
[openafs.git] / src / vol / 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 /*
11         System:         VICE-TWO
12         Module:         common.c
13         Institution:    The Information Technology Center, Carnegie-Mellon University
14
15  */
16
17 #include <afsconfig.h>
18 #include <afs/param.h>
19
20 #include <roken.h>
21
22 #include <afs/afsutil.h>
23
24 #include "common.h"
25
26 int Statistics = 0;
27
28 /*@printflike@*/ void
29 Log(const char *format, ...)
30 {
31     int level;
32     va_list args;
33
34     if (Statistics)
35         level = -1;
36     else
37         level = 0;
38
39     va_start(args, format);
40     vViceLog(level, (format, args));
41     va_end(args);
42 }
43
44 /*@printflike@*/ void
45 Abort(const char *format, ...)
46 {
47     va_list args;
48
49     ViceLog(0, ("Program aborted: "));
50     va_start(args, format);
51     vViceLog(0, (format, args));
52     va_end(args);
53     abort();
54 }
55
56 /*@printflike@*/ void
57 Quit(const char *format, ...)
58 {
59     va_list args;
60
61     va_start(args, format);
62     vViceLog(0, (format, args));
63     va_end(args);
64     exit(1);
65 }