]> git.saurik.com Git - apple/bootx.git/blob - bootx.tproj/include.subproj/fs.h
BootX-81.tar.gz
[apple/bootx.git] / bootx.tproj / include.subproj / fs.h
1 /*
2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_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. 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.
14 *
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
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29 /*
30 * fs.h - Externs for the File System Modules
31 *
32 * Copyright (c) 1999-2004 Apple Computer, Inc.
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);
42 extern long LoadThinFatFile(char *fileSpec, void **binary);
43 extern long GetFileInfo(char *dirSpec, char *name, long *flags, long *time);
44 extern long GetDirEntry(char *dirSpec, unsigned long *dirIndex, char **name,
45 long *flags, long *time);
46 extern long DumpDir(char *dirSpec);
47 extern long GetFSUUID(char *devSpec, char *uuidStr);
48 extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr);
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,
63 unsigned long *dirIndex, char **name,
64 long *flags, long *time);
65
66 // Externs for hfs.c
67 // Note: the offset parameters are only used by mach-o routines.
68 // We don't support mach-o binaries > 4 GB.
69 extern long HFSInitPartition(CICell ih);
70 extern long HFSLoadFile(CICell ih, char *filePath);
71 extern long HFSReadFile(CICell ih, char *filePath,
72 void *base, unsigned long offset,
73 unsigned long length);
74 extern long HFSGetDirEntry(CICell ih, char *dirPath,
75 unsigned long *dirIndex, char **name,
76 long *flags, long *time);
77 extern long HFSGetUUID(CICell ih, char *uuidStr);
78
79 // Externs for ufs.c
80 extern long UFSInitPartition(CICell ih);
81 extern long UFSLoadFile(CICell ih, char *filePath);
82 extern long UFSReadFile(CICell ih, char *filePath,
83 void *base, unsigned long offset,
84 unsigned long length);
85 extern long UFSGetDirEntry(CICell ih, char *dirPath,
86 unsigned long *dirIndex, char **name,
87 long *flags, long *time);
88 extern long UFSGetUUID(CICell ih, char *uuidStr);
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,
94 unsigned long *dirIndex, char **name,
95 long *flags, long *time);
96 extern long Ext2GetUUID(CICell ih, char *uuidStr);
97
98 #endif /* ! _BOOTX_FS_H_ */