reactos/boot/freeldr/freeldr/include/fs.h
Hermès Bélusca-Maïto 8d94b2a68d
[FREELDR] Diverse enhancements.
- Get rid of the FsCloseFile(), FsReadFile(), FsGetFileInformation(),
  FsGetFileSize() and FsSetFilePointer() wrappers and use the ARC
  functions directly instead. Make FsOpenFile() return an ARC file
  descriptor ID of the correct type. Get rid of unused FS_* defines.

- Use TRACEs in the ***Mount() filesystem functions for diagnostics
  purposes.

- Remove a leak in FatGetFatEntry(). Assign stuff via QuadPart where
  possible in FatMount(). Remove an unused member in FAT_FILE_INFO.

- Reduce code indentation in BtrFsMount() and remove a leak there.

- Disable reading the "BootPath" parameter in the linux loader since
  we don't use this parameter (yet??)
2019-08-10 16:41:29 +02:00

51 lines
1.8 KiB
C

/*
* FreeLoader
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
typedef struct tagDEVVTBL
{
ARC_CLOSE Close;
ARC_GET_FILE_INFORMATION GetFileInformation;
ARC_OPEN Open;
ARC_READ Read;
ARC_SEEK Seek;
LPCWSTR ServiceName;
} DEVVTBL;
#define MAX_FDS 60
ARC_STATUS ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId);
ARC_STATUS ArcClose(ULONG FileId);
ARC_STATUS ArcRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count);
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode);
ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION* Information);
VOID FileSystemError(PCSTR ErrorString);
ULONG FsOpenFile(PCSTR FileName);
ULONG FsGetNumPathParts(PCSTR Path);
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCSTR Path);
VOID FsRegisterDevice(CHAR* Prefix, const DEVVTBL* FuncTable);
LPCWSTR FsGetServiceName(ULONG FileId);
VOID FsSetDeviceSpecific(ULONG FileId, VOID* Specific);
VOID* FsGetDeviceSpecific(ULONG FileId);
ULONG FsGetDeviceId(ULONG FileId);
VOID FsInit(VOID);