ReactOS 0.4.16-dev-334-g4d9f67c
fs.h
Go to the documentation of this file.
1/*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#pragma once
21
22#define SECTOR_SIZE 512
23
24typedef struct tagDEVVTBL
25{
33
34#define MAX_FDS 60
35#define INVALID_FILE_ID ((ULONG)-1)
36
37ARC_STATUS ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId);
38
41 _In_ ULONG FileId);
42
46
47VOID FileSystemError(PCSTR ErrorString);
48
52 IN PCSTR DefaultPath OPTIONAL,
53 IN OPENMODE OpenMode,
54 OUT PULONG FileId);
55
58
59VOID
62 _In_ const DEVVTBL* FuncTable);
63
65VOID FsSetDeviceSpecific(ULONG FileId, PVOID Specific);
#define N
Definition: crc32.c:57
PRTL_UNICODE_STRING_BUFFER Path
ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition: fs.c:462
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: fs.c:455
ARC_STATUS ArcOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: fs.c:219
PVOID FsGetDeviceSpecific(ULONG FileId)
Definition: fs.c:632
ULONG FsGetNumPathParts(PCSTR Path)
Definition: fs.c:540
VOID FsSetDeviceSpecific(ULONG FileId, PVOID Specific)
Definition: fs.c:625
ARC_STATUS FsOpenFile(IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL, IN OPENMODE OpenMode, OUT PULONG FileId)
Definition: fs.c:478
ARC_STATUS ArcClose(_In_ ULONG FileId)
Definition: fs.c:409
VOID FileSystemError(PCSTR ErrorString)
Definition: fs.c:471
ULONG FsGetDeviceId(ULONG FileId)
Definition: fs.c:639
struct tagDEVVTBL DEVVTBL
PCWSTR FsGetServiceName(ULONG FileId)
Definition: fs.c:618
VOID FsRegisterDevice(_In_ PCSTR DeviceName, _In_ const DEVVTBL *FuncTable)
Definition: fs.c:596
ARC_STATUS ArcRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: fs.c:448
VOID FsInit(VOID)
Definition: fs.c:646
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCSTR Path)
Definition: fs.c:568
Definition: bufpool.h:45
#define _In_
Definition: no_sal2.h:158
int Count
Definition: noreturn.cpp:7
ARC_STATUS(* ARC_SEEK)(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: arc.h:614
ARC_STATUS(* ARC_READ)(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: arc.h:606
ARC_STATUS(* ARC_OPEN)(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: arc.h:598
ARC_STATUS(* ARC_CLOSE)(ULONG FileId)
Definition: arc.h:585
ARC_STATUS(* ARC_GET_FILE_INFORMATION)(ULONG FileId, FILEINFORMATION *Information)
Definition: arc.h:591
ULONG ARC_STATUS
Definition: arc.h:4
enum _OPENMODE OPENMODE
enum _SEEKMODE SEEKMODE
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: fs.h:25
ARC_SEEK Seek
Definition: fs.h:30
PCWSTR ServiceName
Definition: fs.h:31
ARC_GET_FILE_INFORMATION GetFileInformation
Definition: fs.h:27
ARC_OPEN Open
Definition: fs.h:28
ARC_READ Read
Definition: fs.h:29
ARC_CLOSE Close
Definition: fs.h:26
static COORD Position
Definition: mouse.c:34
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
const char * PCSTR
Definition: typedefs.h:52
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
char CHAR
Definition: xmlstorage.h:175