]>
Commit | Line | Data |
---|---|---|
51e135ce A |
1 | /* |
2 | * Copyright (c) 1999-2011 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 | /* Scavenger.h */ | |
24 | ||
25 | #ifndef __SCAVENGER__ | |
26 | #define __SCAVENGER__ | |
27 | ||
28 | #define pascal | |
29 | ||
30 | #include "SRuntime.h" | |
31 | #include "BTree.h" | |
32 | #include "BTreePrivate.h" | |
33 | #include "CheckHFS.h" | |
34 | #include "BTreeScanner.h" | |
35 | #include "hfs_endian.h" | |
36 | #include "../fsck_debug.h" | |
37 | #include "../fsck_messages.h" | |
38 | #include "../fsck_hfs_msgnums.h" | |
39 | #include "../fsck_msgnums.h" | |
40 | #include "../fsck_hfs.h" | |
41 | ||
42 | #include <assert.h> | |
43 | #include <sys/xattr.h> | |
44 | #include <sys/acl.h> | |
45 | #include <sys/kauth.h> | |
46 | #include <sys/errno.h> | |
47 | #include <sys/syslimits.h> | |
48 | #include <sys/param.h> | |
49 | #include <sys/sysctl.h> | |
50 | #include <sys/mount.h> | |
51 | #include <hfs/hfs_mount.h> | |
52 | ||
53 | #ifdef __cplusplus | |
54 | extern "C" { | |
55 | #endif | |
56 | ||
57 | ||
58 | #define kFSCKMountVersion 0x6673636B /* 'fsck' made changes */ | |
59 | ||
60 | enum { | |
61 | Log2BlkLo = 9, // number of left shifts to convert bytes to block.lo | |
62 | Log2BlkHi = 23 // number of right shifts to convert bytes to block.hi | |
63 | }; | |
64 | ||
65 | enum { | |
66 | kNoHint = 0 | |
67 | }; | |
68 | ||
69 | ||
70 | // | |
71 | // Misc constants | |
72 | // | |
73 | ||
74 | /* IO size for reading or writing disk blocks */ | |
75 | #define DISK_IOSIZE 32768 | |
76 | ||
77 | #define kMaxReScan 3 /* max times to re-scan volume on repair success */ | |
78 | ||
79 | #define kBTreeHeaderUserBytes 128 | |
80 | ||
81 | #define kBusErrorValue 0x50FF8001 | |
82 | ||
83 |