]> git.saurik.com Git - apple/bootx.git/blame - bootx.tproj/include.subproj/fs.h
BootX-81.tar.gz
[apple/bootx.git] / bootx.tproj / include.subproj / fs.h
CommitLineData
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
41extern long LoadFile(char *fileSpec);
8be739c0 42extern long LoadThinFatFile(char *fileSpec, void **binary);
04fee52e 43extern long GetFileInfo(char *dirSpec, char *name, long *flags, long *time);
873b6fa6 44extern long GetDirEntry(char *dirSpec, unsigned long *dirIndex, char **name,
04fee52e
A
45 long *flags, long *time);
46extern long DumpDir(char *dirSpec);
8be739c0
A
47extern long GetFSUUID(char *devSpec, char *uuidStr);
48extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr);
04fee52e
A
49
50// Externs for cache.c
51extern unsigned long gCacheHits;
52extern unsigned long gCacheMisses;
53extern unsigned long gCacheEvicts;
54
55extern void CacheInit(CICell ih, long chunkSize);
56extern long CacheRead(CICell ih, char *buffer, long long offset,
57 long length, long cache);
58
59// Externs for net.c
60extern CICell NetInitPartition(char *devSpec);
61extern long NetLoadFile(CICell ih, char *filePath);
62extern 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
69extern long HFSInitPartition(CICell ih);
70extern long HFSLoadFile(CICell ih, char *filePath);
8be739c0
A
71extern long HFSReadFile(CICell ih, char *filePath,
72 void *base, unsigned long offset,
73 unsigned long length);
04fee52e 74extern long HFSGetDirEntry(CICell ih, char *dirPath,
873b6fa6 75 unsigned long *dirIndex, char **name,
04fee52e 76 long *flags, long *time);
8be739c0 77extern long HFSGetUUID(CICell ih, char *uuidStr);
04fee52e
A
78
79// Externs for ufs.c
80extern long UFSInitPartition(CICell ih);
81extern long UFSLoadFile(CICell ih, char *filePath);
8be739c0
A
82extern long UFSReadFile(CICell ih, char *filePath,
83 void *base, unsigned long offset,
84 unsigned long length);
04fee52e 85extern long UFSGetDirEntry(CICell ih, char *dirPath,
873b6fa6 86 unsigned long *dirIndex, char **name,
04fee52e 87 long *flags, long *time);
8be739c0 88extern long UFSGetUUID(CICell ih, char *uuidStr);
04fee52e
A
89
90// Externs for ext2.c
91extern long Ext2InitPartition(CICell ih);
92extern long Ext2LoadFile(CICell ih, char *filePath);
93extern long Ext2GetDirEntry(CICell ih, char *dirPath,
873b6fa6 94 unsigned long *dirIndex, char **name,
04fee52e 95 long *flags, long *time);
8be739c0 96extern long Ext2GetUUID(CICell ih, char *uuidStr);
04fee52e
A
97
98#endif /* ! _BOOTX_FS_H_ */