Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/arch/ppc/include/fs.h

Source at commit 1305 created 12 years 8 months ago.
By meklort, Cleanup arch makefiles. Begin merging of BootX source - will need cleaning up
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
41extern long LoadFile(char *fileSpec);
42extern long LoadThinFatFile(char *fileSpec, void **binary);
43extern long GetFileInfo(char *dirSpec, char *name, long *flags, long *time);
44extern long GetDirEntry(char *dirSpec, unsigned long *dirIndex, char **name,
45long *flags, long *time);
46extern long DumpDir(char *dirSpec);
47extern long GetFSUUID(char *devSpec, char *uuidStr);
48extern long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr);
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,
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.
69extern long HFSInitPartition(CICell ih);
70extern long HFSLoadFile(CICell ih, char *filePath);
71extern long HFSReadFile(CICell ih, char *filePath,
72void *base, unsigned long offset,
73unsigned long length);
74extern long HFSGetDirEntry(CICell ih, char *dirPath,
75 unsigned long *dirIndex, char **name,
76 long *flags, long *time);
77extern long HFSGetUUID(CICell ih, char *uuidStr);
78
79// Externs for ufs.c
80extern long UFSInitPartition(CICell ih);
81extern long UFSLoadFile(CICell ih, char *filePath);
82extern long UFSReadFile(CICell ih, char *filePath,
83void *base, unsigned long offset,
84unsigned long length);
85extern long UFSGetDirEntry(CICell ih, char *dirPath,
86 unsigned long *dirIndex, char **name,
87 long *flags, long *time);
88extern long UFSGetUUID(CICell ih, char *uuidStr);
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,
94 unsigned long *dirIndex, char **name,
95 long *flags, long *time);
96extern long Ext2GetUUID(CICell ih, char *uuidStr);
97
98#endif /* ! _BOOTX_FS_H_ */
99

Archive Download this file

Revision: 1305