]>
git.saurik.com Git - apple/hfs.git/blob - fsck_hfs/fsck_hfs.h
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
;
46 extern int detonator_run
;
49 #define DIRTYEXIT 3 /* Filesystem Dirty, no checks */
50 #define FIXEDROOTEXIT 4 /* Writeable Root Filesystem was fixed */
51 #define EEXIT 8 /* Standard error exit. */
52 #define MAJOREXIT 47 /* We had major errors when doing a early-exit verify */
55 char *blockcheck
__P((char *name
));
56 void cleanup_fs_fd
__P((void));
57 void catch __P((int));
58 void ckfini
__P((int markclean
));
59 void pfatal
__P((const char *fmt
, ...));
60 void pwarn
__P((const char *fmt
, ...));
61 void logstring(void *, const char *); // write to log file
62 void outstring(void *, const char *); // write to standard out
63 void llog(const char *fmt
, ...); // write to log file
64 void olog(const char *fmt
, ...); // write to standard out
65 void plog(const char *fmt
, ...); // printf replacement that writes to both log file and standard out
66 void vplog(const char *fmt
, va_list ap
); // vprintf replacement that writes to both log file and standard out
67 void fplog(FILE *stream
, const char *fmt
, ...); // fprintf replacement that writes to both log file and standard out
68 #define printf plog // just in case someone tries to use printf/fprint
71 int reply
__P((char *question
));
73 void start_progress(void);
74 void draw_progress(int);
75 void end_progress(void);
76 void DumpData(const void *ptr
, size_t sz
, char *label
);