]>
Commit | Line | Data |
---|---|---|
04fee52e | 1 | /* |
873b6fa6 | 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. |
04fee52e | 3 | * |
873b6fa6 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
04fee52e | 5 | * |
873b6fa6 A |
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. The rights granted to you under the License | |
10 | * may not be used to create, or enable the creation or redistribution of, | |
11 | * unlawful or unlicensed copies of an Apple operating system, or to | |
12 | * circumvent, violate, or enable the circumvention or violation of, any | |
13 | * terms of an Apple operating system software license agreement. | |
04fee52e | 14 | * |
873b6fa6 A |
15 | * Please obtain a copy of the License at |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | |
17 | * | |
18 | * The Original Code and all software distributed under the License are | |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
04fee52e A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
873b6fa6 A |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
04fee52e | 25 | * |
873b6fa6 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
04fee52e | 27 | */ |
873b6fa6 | 28 | |
04fee52e A |
29 | /* |
30 | * fs.h - Externs for the File System Modules | |
31 | * | |
8be739c0 | 32 | * Copyright (c) 1999-2004 Apple Computer, Inc. |
04fee52e A |
33 | * |
34 | * DRI: Josh de Cesare | |
35 | */ | |
36 | ||
37 | #ifndef _BOOTX_FS_H_ | |
38 | #define _BOOTX_FS_H_ | |
39 | ||
40 | // Externs for fs.c | |
41 | extern long LoadFile(char *fileSpec); | |
8be739c0 | 42 | extern long LoadThinFatFile(char *fileSpec, void **binary); |
04fee52e | 43 | extern long GetFileInfo(char *dirSpec, char *name, long *flags, long *time); |
873b6fa6 | 44 | extern long GetDirEntry(char *dirSpec, unsigned long *dirIndex, char **name, |
04fee52e A |
45 | long *flags, long *time); |
46 | extern long DumpDir(char *dirSpec); | |
8be739c0 A |
47 | extern long GetFSUUID(char *devSpec, char *uuidStr); |
48 | extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr); | |
04fee52e A |
49 | |
50 | // Externs for cache.c | |
51 | extern unsigned long gCacheHits; | |
52 | extern unsigned long gCacheMisses; | |
53 | extern unsigned long gCacheEvicts; | |
54 | ||
55 | extern void CacheInit(CICell ih, long chunkSize); | |
56 | extern long CacheRead(CICell ih, char *buffer, long long offset, | |
57 | long length, long cache); | |
58 | ||
59 | // Externs for net.c | |
60 | extern CICell NetInitPartition(char *devSpec); | |
61 | extern long NetLoadFile(CICell ih, char *filePath); | |
62 | extern long NetGetDirEntry(CICell ih, char *dirPath, | |
873b6fa6 | 63 | unsigned long *dirIndex, char **name, |
04fee52e A |
64 | long *flags, long *time); |
65 | ||
66 | // Externs for hfs.c | |
873b6fa6 A |
67 | // Note: the offset parameters are only used by mach-o routines. |
68 | // We don't support mach-o binaries > 4 GB. | |
04fee52e A |
69 | extern long HFSInitPartition(CICell ih); |
70 | extern long HFSLoadFile(CICell ih, char *filePath); | |
8be739c0 A |
71 | extern long HFSReadFile(CICell ih, char *filePath, |
72 | void *base, unsigned long offset, | |
73 | unsigned long length); | |
04fee52e | 74 | extern long HFSGetDirEntry(CICell ih, char *dirPath, |
873b6fa6 | 75 | unsigned long *dirIndex, char **name, |
04fee52e | 76 | long *flags, long *time); |
8be739c0 | 77 | extern long HFSGetUUID(CICell ih, char *uuidStr); |
04fee52e A |
78 | |
79 | // Externs for ufs.c | |
80 | extern long UFSInitPartition(CICell ih); | |
81 | extern long UFSLoadFile(CICell ih, char *filePath); | |
8be739c0 A |
82 | extern long UFSReadFile(CICell ih, char *filePath, |
83 | void *base, unsigned long offset, | |
84 | unsigned long length); | |
04fee52e | 85 | extern long UFSGetDirEntry(CICell ih, char *dirPath, |
873b6fa6 | 86 | unsigned long *dirIndex, char **name, |
04fee52e | 87 | long *flags, long *time); |
8be739c0 | 88 | extern long UFSGetUUID(CICell ih, char *uuidStr); |
04fee52e A |
89 | |
90 | // Externs for ext2.c | |
91 | extern long Ext2InitPartition(CICell ih); | |
92 | extern long Ext2LoadFile(CICell ih, char *filePath); | |
93 | extern long Ext2GetDirEntry(CICell ih, char *dirPath, | |
873b6fa6 | 94 | unsigned long *dirIndex, char **name, |
04fee52e | 95 | long *flags, long *time); |
8be739c0 | 96 | extern long Ext2GetUUID(CICell ih, char *uuidStr); |
04fee52e A |
97 | |
98 | #endif /* ! _BOOTX_FS_H_ */ |