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