2001-05-15 03:50:25 +00:00
|
|
|
/*
|
|
|
|
* FreeLoader
|
2002-01-19 00:37:06 +00:00
|
|
|
* Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>
|
2001-05-15 03:50:25 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
2001-11-15 07:48:33 +00:00
|
|
|
#ifndef __FS_H
|
|
|
|
#define __FS_H
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2001-11-15 07:48:33 +00:00
|
|
|
|
2002-02-26 00:26:35 +00:00
|
|
|
#define EOF -1
|
2001-11-15 07:48:33 +00:00
|
|
|
|
2002-02-26 00:26:35 +00:00
|
|
|
#define FS_FAT 1
|
|
|
|
#define FS_NTFS 2
|
|
|
|
#define FS_EXT2 3
|
|
|
|
#define FS_REISER 4
|
2002-04-23 09:08:59 +00:00
|
|
|
#define FS_ISO9660 5
|
2001-11-15 07:48:33 +00:00
|
|
|
|
2002-02-26 00:26:35 +00:00
|
|
|
#define FILE VOID
|
|
|
|
#define PFILE FILE *
|
2001-11-15 07:48:33 +00:00
|
|
|
|
|
|
|
VOID FileSystemError(PUCHAR ErrorString);
|
2002-11-24 19:10:06 +00:00
|
|
|
BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber);
|
|
|
|
PFILE FsOpenFile(PUCHAR FileName);
|
|
|
|
VOID FsCloseFile(PFILE FileHandle);
|
|
|
|
BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer);
|
|
|
|
U32 FsGetFileSize(PFILE FileHandle);
|
|
|
|
VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer);
|
|
|
|
U32 FsGetFilePointer(PFILE FileHandle);
|
|
|
|
BOOL FsIsEndOfFile(PFILE FileHandle);
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
U32 FsGetNumPathParts(PUCHAR Path);
|
|
|
|
VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2001-11-29 01:56:04 +00:00
|
|
|
#endif // #defined __FS_H
|