death-to-efs-20060802
[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 <sys/types.h>
18 #include <stdio.h>
19 #include <afsconfig.h>
20 #include <afs/param.h>
21
22 RCSID
23     ("$Header$");
24
25 #include <afs/afsutil.h>
26
27 int Statistics = 0;
28
29 /*@printflike@*/ void
30 Log(const char *format, ...)
31 {
32     int level;
33     va_list args;
34
35     if (Statistics)
36         level = -1;
37     else
38         level = 0;
39
40     va_start(args, format);
41     vViceLog(level, (format, args));
42     va_end(args);
43 }
44
45 /*@printflike@*/ void
46 Abort(const char *format, ...)
47 {
48     va_list args;
49
50     ViceLog(0, ("Program aborted: "));
51     va_start(args, format);
52     vViceLog(0, (format, args));
53     va_end(args);
54     abort();
55 }
56
57 /*@printflike@*/ void
58 Quit(const char *format, ...)
59 {
60     va_list args;
61
62     va_start(args, format);
63     vViceLog(0, (format, args));
64     va_end(args);
65     exit(1);
66 }