]> git.saurik.com Git - apple/hfs.git/blame - fsck_hfs/fsck_hfs.h
hfs-366.1.1.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
46
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 */
51
52
53char *blockcheck __P((char *name));
54void cleanup_fs_fd __P((void));
55void catch __P((int));
56void ckfini __P((int markclean));
57void pfatal __P((const char *fmt, ...));
58void pwarn __P((const char *fmt, ...));
59void logstring(void *, const char *); // write to log file
60void outstring(void *, const char *); // write to standard out
61void llog(const char *fmt, ...); // write to log file
62void olog(const char *fmt, ...); // write to standard out
63void plog(const char *fmt, ...); // printf replacement that writes to both log file and standard out
64void vplog(const char *fmt, va_list ap); // vprintf replacement that writes to both log file and standard out
65void 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
67#define fprintf fplog
68
69int reply __P((char *question));
70
71void start_progress(void);
72void draw_progress(int);
73void end_progress(void);
41dcebd9
A
74void DumpData(const void *, size_t);
75