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