ReactOS 0.4.15-dev-5672-gf73ac17
fs.c File Reference
#include <freeldr.h>
#include <debug.h>
Include dependency graph for fs.c:

Go to the source code of this file.

Classes

struct  tagFILEDATA
 
struct  tagDEVICE
 

Macros

#define TAG_DEVICE_NAME   'NDsF'
 
#define TAG_DEVICE   'vDsF'
 

Typedefs

typedef struct tagFILEDATA FILEDATA
 
typedef struct tagDEVICE DEVICE
 

Functions

 DBG_DEFAULT_CHANNEL (FILESYSTEM)
 
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)
 
ARC_STATUS FsOpenFile (IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL, IN OPENMODE OpenMode, OUT PULONG FileId)
 
ULONG FsGetNumPathParts (PCSTR Path)
 
VOID FsGetFirstNameFromPath (PCHAR Buffer, PCSTR Path)
 
VOID FsRegisterDevice (CHAR *Prefix, const DEVVTBL *FuncTable)
 
PCWSTR FsGetServiceName (ULONG FileId)
 
VOID FsSetDeviceSpecific (ULONG FileId, VOID *Specific)
 
VOIDFsGetDeviceSpecific (ULONG FileId)
 
ULONG FsGetDeviceId (ULONG FileId)
 
VOID FsInit (VOID)
 

Variables

static FILEDATA FileData [MAX_FDS]
 
static LIST_ENTRY DeviceListHead
 

Macro Definition Documentation

◆ TAG_DEVICE

#define TAG_DEVICE   'vDsF'

Definition at line 31 of file fs.c.

◆ TAG_DEVICE_NAME

#define TAG_DEVICE_NAME   'NDsF'

Definition at line 30 of file fs.c.

Typedef Documentation

◆ DEVICE

◆ FILEDATA

Function Documentation

◆ ArcClose()

ARC_STATUS ArcClose ( ULONG  FileId)

Definition at line 218 of file fs.c.

219{
221
222 if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
223 return EBADF;
224
225 Status = FileData[FileId].FuncTable->Close(FileId);
226
227 if (Status == ESUCCESS)
228 {
229 FileData[FileId].FuncTable = NULL;
230 FileData[FileId].Specific = NULL;
231 FileData[FileId].DeviceId = -1;
232 }
233 return Status;
234}
#define EBADF
Definition: acclib.h:82
#define MAX_FDS
Definition: fs.h:34
static FILEDATA FileData[MAX_FDS]
Definition: fs.c:51
#define NULL
Definition: types.h:112
Status
Definition: gdiplustypes.h:25
@ ESUCCESS
Definition: arc.h:32
ULONG ARC_STATUS
Definition: arc.h:4
ARC_CLOSE Close
Definition: fs.h:26
const DEVVTBL * FuncTable
Definition: fs.c:37
VOID * Specific
Definition: fs.c:39
ULONG DeviceId
Definition: fs.c:35

Referenced by InfOpenFile(), IniFileInitialize(), InitOperatingSystemList(), PeLdrLoadImage(), RamDiskLoadVirtualFile(), SpiScanDevice(), WinLdrLoadModule(), WinLdrLoadNLSData(), and WinLdrLoadSystemHive().

◆ ArcGetFileInformation()

ARC_STATUS ArcGetFileInformation ( ULONG  FileId,
FILEINFORMATION Information 
)

Definition at line 250 of file fs.c.

251{
252 if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
253 return EBADF;
254 return FileData[FileId].FuncTable->GetFileInformation(FileId, Information);
255}
ARC_GET_FILE_INFORMATION GetFileInformation
Definition: fs.h:27
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049

Referenced by FatMount(), InfOpenFile(), IniFileInitialize(), RamDiskLoadVirtualFile(), WinLdrLoadModule(), WinLdrLoadNLSData(), and WinLdrLoadSystemHive().

◆ ArcOpen()

ARC_STATUS ArcOpen ( CHAR Path,
OPENMODE  OpenMode,
ULONG FileId 
)

Definition at line 56 of file fs.c.

57{
59 ULONG Count, i;
64 CHAR* p;
65 CHAR* q;
67 OPENMODE DeviceOpenMode;
68 ULONG DeviceId;
69
70 /* Print status message */
71 TRACE("Opening file '%s'...\n", Path);
72
73 *FileId = MAX_FDS;
74
75 /* Search last ')', which delimits device and path */
76 FileName = strrchr(Path, ')');
77 if (!FileName)
78 return EINVAL;
79 FileName++;
80
81 /* Count number of "()", which needs to be replaced by "(0)" */
82 Count = 0;
83 for (p = Path; p != FileName; p++)
84 {
85 if (*p == '(' && *(p + 1) == ')')
86 Count++;
87 }
88
89 /* Duplicate device name, and replace "()" by "(0)" (if required) */
91 if (Count != 0)
92 {
94 if (!DeviceName)
95 return ENOMEM;
96 for (p = Path, q = DeviceName; p != FileName; p++)
97 {
98 *q++ = *p;
99 if (*p == '(' && *(p + 1) == ')')
100 *q++ = '0';
101 }
102 }
103 else
104 {
106 }
107
108 /* Search for the device */
109 if (OpenMode == OpenReadOnly || OpenMode == OpenWriteOnly)
110 DeviceOpenMode = OpenMode;
111 else
112 DeviceOpenMode = OpenReadWrite;
113
115 while (pEntry != &DeviceListHead)
116 {
117 pDevice = CONTAINING_RECORD(pEntry, DEVICE, ListEntry);
118 if (strncmp(pDevice->Prefix, DeviceName, Length) == 0)
119 {
120 /* OK, device found. It is already opened? */
121 if (pDevice->ReferenceCount == 0)
122 {
123 /* Search some room for the device */
124 for (DeviceId = 0; DeviceId < MAX_FDS; DeviceId++)
125 {
126 if (!FileData[DeviceId].FuncTable)
127 break;
128 }
129 if (DeviceId == MAX_FDS)
130 return EMFILE;
131
132 /* Try to open the device */
133 FileData[DeviceId].FuncTable = pDevice->FuncTable;
134 Status = pDevice->FuncTable->Open(pDevice->Prefix, DeviceOpenMode, &DeviceId);
135 if (Status != ESUCCESS)
136 {
137 FileData[DeviceId].FuncTable = NULL;
138 return Status;
139 }
140 else if (!*FileName)
141 {
142 /* Done, caller wanted to open the raw device */
143 *FileId = DeviceId;
144 pDevice->ReferenceCount++;
145 return ESUCCESS;
146 }
147
148 /* Try to detect the file system */
149#ifndef _M_ARM
150 FileData[DeviceId].FileFuncTable = IsoMount(DeviceId);
151 if (!FileData[DeviceId].FileFuncTable)
152#endif
153 FileData[DeviceId].FileFuncTable = FatMount(DeviceId);
154 if (!FileData[DeviceId].FileFuncTable)
155 FileData[DeviceId].FileFuncTable = BtrFsMount(DeviceId);
156#ifndef _M_ARM
157 if (!FileData[DeviceId].FileFuncTable)
158 FileData[DeviceId].FileFuncTable = NtfsMount(DeviceId);
159 if (!FileData[DeviceId].FileFuncTable)
160 FileData[DeviceId].FileFuncTable = Ext2Mount(DeviceId);
161#endif
162#if defined(_M_IX86) || defined(_M_AMD64)
163 if (!FileData[DeviceId].FileFuncTable)
164 FileData[DeviceId].FileFuncTable = PxeMount(DeviceId);
165#endif
166 if (!FileData[DeviceId].FileFuncTable)
167 {
168 /* Error, unable to detect file system */
169 pDevice->FuncTable->Close(DeviceId);
170 FileData[DeviceId].FuncTable = NULL;
171 return ENODEV;
172 }
173
174 pDevice->DeviceId = DeviceId;
175 }
176 else
177 {
178 DeviceId = pDevice->DeviceId;
179 }
180 pDevice->ReferenceCount++;
181 break;
182 }
184 }
185 if (pEntry == &DeviceListHead)
186 return ENODEV;
187
188 /* At this point, device is found and opened. Its file id is stored
189 * in DeviceId, and FileData[DeviceId].FileFuncTable contains what
190 * needs to be called to open the file */
191
192 /* Search some room for the device */
193 for (i = 0; i < MAX_FDS; i++)
194 {
195 if (!FileData[i].FuncTable)
196 break;
197 }
198 if (i == MAX_FDS)
199 return EMFILE;
200
201 /* Skip leading path separator, if any */
202 if (*FileName == '\\' || *FileName == '/')
203 FileName++;
204
205 /* Open the file */
207 FileData[i].DeviceId = DeviceId;
208 *FileId = i;
209 Status = FileData[i].FuncTable->Open(FileName, OpenMode, FileId);
210 if (Status != ESUCCESS)
211 {
213 *FileId = MAX_FDS;
214 }
215 return Status;
216}
PRTL_UNICODE_STRING_BUFFER Path
#define EINVAL
Definition: acclib.h:90
#define ENOMEM
Definition: acclib.h:84
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
#define ENODEV
Definition: acclib.h:89
NTSTATUS FatMount(_In_ ULONG DeviceId, _In_ ULONG Unknown, _Out_ PBL_FILE_ENTRY *FileEntry)
Definition: fat.c:23
const DEVVTBL * BtrFsMount(ULONG DeviceId)
Definition: btrfs.c:1297
const DEVVTBL * Ext2Mount(ULONG DeviceId)
Definition: ext2.c:1295
const DEVVTBL * NtfsMount(ULONG DeviceId)
Definition: ntfs.c:881
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: mm.h:188
static LIST_ENTRY DeviceListHead
Definition: fs.c:52
#define TAG_DEVICE_NAME
Definition: fs.c:30
#define EMFILE
Definition: errno.h:30
struct _FileName FileName
Definition: fatprocs.h:896
const DEVVTBL * PxeMount(ULONG DeviceId)
Definition: pxe.c:282
FxDevice * pDevice
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const DEVVTBL * IsoMount(ULONG DeviceId)
Definition: iso.c:495
int Count
Definition: noreturn.cpp:7
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
enum _OPENMODE OPENMODE
@ OpenWriteOnly
Definition: arc.h:66
@ OpenReadWrite
Definition: arc.h:67
@ OpenReadOnly
Definition: arc.h:65
#define TRACE(s)
Definition: solgame.cpp:4
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: fs.c:43
ARC_OPEN Open
Definition: fs.h:28
const DEVVTBL * FileFuncTable
Definition: fs.c:38
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
char CHAR
Definition: xmlstorage.h:175

Referenced by FsOpenFile(), InfOpenFile(), InitOperatingSystemList(), PeLdrLoadImage(), SpiScanDevice(), WinLdrLoadModule(), WinLdrLoadNLSData(), and WinLdrLoadSystemHive().

◆ ArcRead()

◆ ArcSeek()

ARC_STATUS ArcSeek ( ULONG  FileId,
LARGE_INTEGER Position,
SEEKMODE  SeekMode 
)

Definition at line 243 of file fs.c.

244{
245 if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
246 return EBADF;
247 return FileData[FileId].FuncTable->Seek(FileId, Position, SeekMode);
248}
ARC_SEEK Seek
Definition: fs.h:30
static COORD Position
Definition: mouse.c:34

Referenced by disk_read(), Ext2Mount(), Ext2ReadSuperBlock(), Ext2ReadVolumeSectors(), FatMount(), FatReadVolumeSectors(), IopReadBootRecord(), IsoBufferDirectory(), IsoLookupFile(), IsoMount(), IsoRead(), NtfsDiskRead(), NtfsMount(), PeLdrLoadImage(), and RamDiskLoadVirtualFile().

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( FILESYSTEM  )

◆ FileSystemError()

VOID FileSystemError ( PCSTR  ErrorString)

Definition at line 259 of file fs.c.

260{
261 ERR("%s\n", ErrorString);
262 UiMessageBox(ErrorString);
263}
#define ERR(fmt,...)
Definition: debug.h:110
VOID UiMessageBox(PCSTR Format,...)
Definition: ui.c:363

Referenced by Ext2LookupFile(), Ext2ReadBlock(), Ext2ReadDirectory(), Ext2ReadFileBig(), Ext2ReadGroupDescriptors(), Ext2ReadInode(), Ext2ReadSuperBlock(), Ext2SearchDirectoryBufferForFile(), FatOpenVolume(), and NtfsMount().

◆ FsGetDeviceId()

ULONG FsGetDeviceId ( ULONG  FileId)

Definition at line 423 of file fs.c.

424{
425 if (FileId >= MAX_FDS)
426 return (ULONG)-1;
427 return FileData[FileId].DeviceId;
428}

Referenced by BtrFsOpen(), Ext2Open(), FatOpen(), IsoOpen(), IsoRead(), and NtfsOpen().

◆ FsGetDeviceSpecific()

◆ FsGetFirstNameFromPath()

VOID FsGetFirstNameFromPath ( PCHAR  Buffer,
PCSTR  Path 
)

Definition at line 356 of file fs.c.

357{
358 size_t i;
359 size_t len;
360
361 len = strlen(Path);
362
363 // Copy all the characters up to the end of the
364 // string or until we hit a '\' character
365 // and put them in Buffer
366 for (i = 0; i < len; i++)
367 {
368 if ((Path[i] == '\\') || (Path[i] == '/'))
369 {
370 break;
371 }
372 else
373 {
374 Buffer[i] = Path[i];
375 }
376 }
377
378 Buffer[i] = 0;
379
380 TRACE("FsGetFirstNameFromPath() Path = %s FirstName = %s\n", Path, Buffer);
381}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLenum GLsizei len
Definition: glext.h:6722

Referenced by Ext2LookupFile(), FatLookupFile(), IsoLookupFile(), and NtfsLookupFile().

◆ FsGetNumPathParts()

ULONG FsGetNumPathParts ( PCSTR  Path)

Definition at line 328 of file fs.c.

329{
330 size_t i;
331 size_t len;
332 ULONG num;
333
334 len = strlen(Path);
335
336 for (i = 0, num = 0; i < len; i++)
337 {
338 if ((Path[i] == '\\') || (Path[i] == '/'))
339 {
340 num++;
341 }
342 }
343 num++;
344
345 TRACE("FsGetNumPathParts() Path = %s NumPathParts = %d\n", Path, num);
346
347 return num;
348}
GLuint GLuint num
Definition: glext.h:9618

Referenced by Ext2LookupFile(), FatLookupFile(), IsoLookupFile(), and NtfsLookupFile().

◆ FsGetServiceName()

PCWSTR FsGetServiceName ( ULONG  FileId)

Definition at line 402 of file fs.c.

403{
404 if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
405 return NULL;
406 return FileData[FileId].FuncTable->ServiceName;
407}
PCWSTR ServiceName
Definition: fs.h:31

Referenced by WinLdrLoadSystemHive().

◆ FsInit()

VOID FsInit ( VOID  )

Definition at line 430 of file fs.c.

431{
432 ULONG i;
433
435 for (i = 0; i < MAX_FDS; i++)
436 FileData[i].DeviceId = (ULONG)-1;
437
439}
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by BootMain().

◆ FsOpenFile()

ARC_STATUS FsOpenFile ( IN PCSTR  FileName,
IN PCSTR DefaultPath  OPTIONAL,
IN OPENMODE  OpenMode,
OUT PULONG  FileId 
)

Definition at line 266 of file fs.c.

271{
273 SIZE_T cchPathLen;
274 CHAR FullPath[MAX_PATH] = "";
275
276 /*
277 * Check whether FileName is a full path and if not, create a full
278 * file name using the user-provided default path (if present).
279 *
280 * See ArcOpen(): Search last ')', which delimits device and path.
281 */
282 if (strrchr(FileName, ')') == NULL)
283 {
284 /* This is not a full path: prepend the user-provided default path */
285 if (DefaultPath)
286 {
287 Status = RtlStringCbCopyA(FullPath, sizeof(FullPath), DefaultPath);
288 if (!NT_SUCCESS(Status))
289 return ENAMETOOLONG;
290 }
291
292 /* Append a path separator if needed */
293
294 cchPathLen = min(sizeof(FullPath)/sizeof(CHAR), strlen(FullPath));
295 if (cchPathLen >= sizeof(FullPath)/sizeof(CHAR))
296 return ENAMETOOLONG;
297
298 if ((*FileName != '\\' && *FileName != '/') &&
299 cchPathLen > 0 && (FullPath[cchPathLen-1] != '\\' && FullPath[cchPathLen-1] != '/'))
300 {
301 /* FileName does not start with '\' and FullPath does not end with '\' */
302 Status = RtlStringCbCatA(FullPath, sizeof(FullPath), "\\");
303 if (!NT_SUCCESS(Status))
304 return ENAMETOOLONG;
305 }
306 else if ((*FileName == '\\' || *FileName == '/') &&
307 cchPathLen > 0 && (FullPath[cchPathLen-1] == '\\' || FullPath[cchPathLen-1] == '/'))
308 {
309 /* FileName starts with '\' and FullPath ends with '\' */
310 while (*FileName == '\\' || *FileName == '/')
311 ++FileName; // Skip any backslash
312 }
313 }
314 /* Append (or just copy) the remaining file name */
315 Status = RtlStringCbCatA(FullPath, sizeof(FullPath), FileName);
316 if (!NT_SUCCESS(Status))
317 return ENAMETOOLONG;
318
319 /* Open the file */
320 return ArcOpen(FullPath, OpenMode, FileId);
321}
LONG NTSTATUS
Definition: precomp.h:26
ARC_STATUS ArcOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: fs.c:56
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define MAX_PATH
Definition: compat.h:34
#define min(a, b)
Definition: monoChain.cc:55
NTSTRSAFEAPI RtlStringCbCatA(_Inout_updates_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:625
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:156
#define ENAMETOOLONG
Definition: errno.h:55

Referenced by IniFileInitialize(), and RamDiskLoadVirtualFile().

◆ FsRegisterDevice()

VOID FsRegisterDevice ( CHAR Prefix,
const DEVVTBL FuncTable 
)

Definition at line 383 of file fs.c.

384{
385 DEVICE* pNewEntry;
387
388 TRACE("FsRegisterDevice() Prefix = %s\n", Prefix);
389
390 Length = strlen(Prefix) + 1;
391 pNewEntry = FrLdrTempAlloc(sizeof(DEVICE) + Length, TAG_DEVICE);
392 if (!pNewEntry)
393 return;
394 pNewEntry->FuncTable = FuncTable;
395 pNewEntry->ReferenceCount = 0;
396 pNewEntry->Prefix = (CHAR*)(pNewEntry + 1);
397 RtlCopyMemory(pNewEntry->Prefix, Prefix, Length);
398
400}
#define TAG_DEVICE
Definition: fs.c:31
#define InsertHeadList(ListHead, Entry)
const DEVVTBL * FuncTable
Definition: fs.c:45
CHAR * Prefix
Definition: fs.c:46
LIST_ENTRY ListEntry
Definition: fs.c:44
ULONG ReferenceCount
Definition: fs.c:48
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1630

Referenced by GetHarddiskInformation(), PcInitializeBootDevices(), PxeInit(), RamDiskInitialize(), SpiScanAdapter(), and SpiScanDevice().

◆ FsSetDeviceSpecific()

VOID FsSetDeviceSpecific ( ULONG  FileId,
VOID Specific 
)

Definition at line 409 of file fs.c.

410{
411 if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
412 return;
413 FileData[FileId].Specific = Specific;
414}

Referenced by BtrFsOpen(), DiskOpen(), Ext2Open(), FatOpen(), IsoOpen(), and NtfsOpen().

Variable Documentation

◆ DeviceListHead

LIST_ENTRY DeviceListHead
static

Definition at line 52 of file fs.c.

Referenced by ArcOpen(), FsInit(), FsRegisterDevice(), and IsaFdoRemoveDevice().

◆ FileData