]> git.saurik.com Git - apple/hfs.git/blame - fsck_hfs/fsck_hfs.h
hfs-556.100.11.tar.gz
[apple/hfs.git] / fsck_hfs / fsck_hfs.h
CommitLineData
51e135ce
A
1/*
2 * Copyright (c) 1999-2008 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#include "cache.h"
25
26
27const extern char *cdevname; /* name of device being checked */
28extern char *progname;
29extern char nflag; /* assume a no response */
30extern char yflag; /* assume a yes response */
31extern char preen; /* just fix normal inconsistencies */
32extern char force; /* force fsck even if clean */
33extern char debug; /* output debugging info */
34extern char disable_journal; /* If debug, and set, do not simulate journal replay */
35extern char embedded; /* built for embedded */
36extern char hotroot; /* checking root device */
37extern char scanflag; /* Scan disk for bad blocks */
38
39extern int upgrading; /* upgrading format */
40
41extern int fsmodified; /* 1 => write done to file system */
42extern int fsreadfd; /* file descriptor for reading file system */
43extern int fswritefd; /* file descriptor for writing file system */
44extern Cache_t fscache;
45
de8ee011
A
46extern int detonator_run;
47
51e135ce
A
48
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 */
53
54
55char *blockcheck __P((char *name));
56void cleanup_fs_fd __P((void));
57void catch __P((int));
58void ckfini __P((int markclean));
59void pfatal __P((const char *fmt, ...));
60void pwarn __P((const char *fmt, ...));
61void logstring(void *, const char *); // write to log file
62void outstring(void *, const char *); // write to standard out
63void llog(const char *fmt, ...); // write to log file
64void olog(const char *fmt, ...); // write to standard out
65void plog(const char *fmt, ...); // printf replacement that writes to both log file and standard out
66void vplog(const char *fmt, va_list ap); // vprintf replacement that writes to both log file and standard out
67void 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
69#define fprintf fplog
70
71int reply __P((char *question));
72
73void start_progress(void);
74void draw_progress(int);
75void end_progress(void);
de8ee011 76void DumpData(const void *ptr, size_t sz, char *label);
41dcebd9 77