2 * Copyright (c) 1999-2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
27 const extern char *cdevname
; /* name of device being checked */
28 extern char *progname
;
29 extern char nflag
; /* assume a no response */
30 extern char yflag
; /* assume a yes response */
31 extern char preen
; /* just fix normal inconsistencies */
32 extern char force
; /* force fsck even if clean */
33 extern char debug
; /* output debugging info */
34 extern char disable_journal
; /* If debug, and set, do not simulate journal replay */
35 extern char embedded
; /* built for embedded */
36 extern char hotroot
; /* checking root device */
37 extern char scanflag
; /* Scan disk for bad blocks */
39 extern int upgrading
; /* upgrading format */
41 extern int fsmodified
; /* 1 => write done to file system */
42 extern int fsreadfd
; /* file descriptor for reading file system */
43 extern int fswritefd
; /* file descriptor for writing file system */
44 extern Cache_t fscache
;
47 #define DIRTYEXIT 3 /* Filesystem Dirty, no checks */
48 #define FIXEDROOTEXIT 4 /* Writeable Root Filesystem was fixed */
49 #define EEXIT 8 /* Standard error exit. */
50 #define MAJOREXIT 47 /* We had major errors when doing a early-exit verify */
53 char *blockcheck
__P((char *name
));
54 void cleanup_fs_fd
__P((void));
55 void catch __P((int));
56 void ckfini
__P((int markclean
));
57 void pfatal
__P((const char *fmt
, ...));
58 void pwarn
__P((const char *fmt
, ...));
59 void logstring(void *, const char *); // write to log file
60 void outstring(void *, const char *); // write to standard out
61 void llog(const char *fmt
, ...); // write to log file
62 void olog(const char *fmt
, ...); // write to standard out
63 void plog(const char *fmt
, ...); // printf replacement that writes to both log file and standard out
64 void vplog(const char *fmt
, va_list ap
); // vprintf replacement that writes to both log file and standard out
65 void fplog(FILE *stream
, const char *fmt
, ...); // fprintf replacement that writes to both log file and standard out
66 #define printf plog // just in case someone tries to use printf/fprint
69 int reply
__P((char *question
));
71 void start_progress(void);
72 void draw_progress(int);
73 void end_progress(void);
74 void DumpData(const void *, size_t);