death to trailing whitespace
[openafs.git] / src / vfsck / vprintf.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 /* I don't really need all thes, but I can't tell which ones I need
11  * and which I don't.
12  */
13 #include <afsconfig.h>
14 #include <afs/param.h>
15
16
17 #define VICE                    /* allow us to put our changes in at will */
18 #include <stdio.h>
19
20 #include <sys/param.h>
21 #include <sys/time.h>
22
23 #ifdef AFS_SUN_ENV
24 #define KERNEL
25 #endif
26 #include <sys/mount.h>
27 #ifdef AFS_SUN_ENV
28 #undef KERNEL
29 #endif /* AFS_SUN_ENV */
30
31 #include <sys/file.h>
32
33 #ifdef  AFS_OSF_ENV
34 #include <sys/vnode.h>
35 #include <sys/mount.h>
36 #include <ufs/inode.h>
37 #include <ufs/fs.h>
38 #define _BSD
39 #define _KERNEL
40 #include <ufs/dir.h>
41 #undef  _KERNEL
42 #undef  _BSD
43 #else /* AFS_OSF_ENV */
44 #ifdef AFS_VFSINCL_ENV
45 #define VFS
46 #include <sys/vnode.h>
47 #ifdef    AFS_SUN5_ENV
48 #include <stdio.h>
49 #include <unistd.h>
50 #include <sys/fs/ufs_inode.h>
51 #include <sys/fs/ufs_fs.h>
52 #define _KERNEL
53 #include <sys/fs/ufs_fsdir.h>
54 #undef _KERNEL
55 #include <sys/fs/ufs_mount.h>
56 #else
57 #include <ufs/inode.h>
58 #include <ufs/fs.h>
59 #define KERNEL
60 #include <ufs/fsdir.h>
61 #undef KERNEL
62 #endif
63 #else /* AFS_VFSINCL_ENV */
64
65 #include <sys/inode.h>
66 #ifdef  AFS_HPUX_ENV
67 #include <ctype.h>
68 #define LONGFILENAMES   1
69 #include <sys/sysmacros.h>
70 #include <sys/ino.h>
71 #define DIRSIZ_MACRO
72 #ifdef HAVE_USR_OLD_USR_INCLUDE_NDIR_H
73 #include </usr/old/usr/include/ndir.h>
74 #else
75 #include <ndir.h>
76 #endif
77 #else
78 #define KERNEL
79 #include <sys/dir.h>
80 #undef KERNEL
81 #endif
82 #include <sys/fs.h>
83 #endif /* AFS_VFSINCL_ENV */
84 #endif /* AFS_OSF_ENV */
85
86 #include <sys/stat.h>
87 #include <sys/wait.h>
88 #ifdef AFS_SUN5_ENV
89 #include <string.h>
90 #else
91 #include <strings.h>
92 #endif
93 #include <ctype.h>
94 #include "fsck.h"
95 #include <errno.h>
96
97 /* Vice printf:  lob the message into /vice/file/vfsck.log if it isn't the root */
98 /* If we're salvaging the root, it wouldn't be such a good idea to lob stuff there */
99 vfscklogprintf(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
100      char *s;
101      long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
102 {
103     printf(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
104     if (logfile) {
105         fprintf(logfile, s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
106         fflush(logfile);
107     }
108 }