Go to the source code of this file.
|
static ARC_STATUS | RamDiskClose (ULONG FileId) |
|
static ARC_STATUS | RamDiskGetFileInformation (ULONG FileId, FILEINFORMATION *Information) |
|
static ARC_STATUS | RamDiskOpen (CHAR *Path, OPENMODE OpenMode, ULONG *FileId) |
|
static ARC_STATUS | RamDiskRead (ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count) |
|
static ARC_STATUS | RamDiskSeek (ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode) |
|
static ARC_STATUS | RamDiskLoadVirtualFile (IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL) |
|
ARC_STATUS | RamDiskInitialize (IN BOOLEAN InitRamDisk, IN PCSTR LoadOptions OPTIONAL, IN PCSTR DefaultPath OPTIONAL) |
|
◆ RamDiskClose()
◆ RamDiskGetFileInformation()
Definition at line 35 of file ramdisk.c.
36{
40
42}
static ULONGLONG RamDiskOffset
static ULONGLONG RamDiskImageLength
#define RtlZeroMemory(Destination, Length)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
◆ RamDiskInitialize()
Definition at line 206 of file ramdisk.c.
210{
211
215 {
216
218 }
224
225 if (InitRamDisk)
226 {
227
230
231
232
236 }
237 else
238 {
239
242
243
244 if (LoadOptions)
245 {
248
249
252 {
253
257 }
258
259
261 if (Option)
262 {
264 }
265
266
268 if (Option)
269 {
271 }
272 }
273
275 {
279 }
280 }
281
282
285
286
288 {
291 }
292
294}
__int64 CDECL _atoi64(const char *nptr)
static BOOLEAN RamDiskDeviceRegistered
static ULONGLONG RamDiskFileSize
static ULONG RamDiskImageOffset
static ARC_STATUS RamDiskLoadVirtualFile(IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL)
static const DEVVTBL RamDiskVtbl
VOID FsRegisterDevice(_In_ PCSTR DeviceName, _In_ const DEVVTBL *FuncTable)
VOID MmFreeMemory(PVOID MemoryPointer)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ HANDLE _In_ ULONG FileNameLength
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
PCSTR NtLdrGetOption(IN PCSTR Options, IN PCSTR OptionName)
PCSTR NtLdrGetOptionEx(IN PCSTR Options, IN PCSTR OptionName, OUT PULONG OptionLength OPTIONAL)
NTSTRSAFEAPI RtlStringCbCopyNA(_Out_writes_bytes_(cbDest) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_reads_bytes_(cbToCopy) STRSAFE_LPCSTR pszSrc, _In_ size_t cbToCopy)
Referenced by ArmHwDetect(), LoadAndBootWindows(), and LoadReactOSSetup().
◆ RamDiskLoadVirtualFile()
Definition at line 106 of file ramdisk.c.
109{
114 ULONG PercentPerChunk, Percent;
117
118
120
121
125
126
129 {
132 }
133
134
136 {
140 }
143
144
147 PercentPerChunk = 0;
148 else
152 {
155 UiMessageBox(
"Failed to allocate memory for RAM disk.");
157 }
158
159
160
161
162 Percent = 0;
164 {
165
167 {
168
170 }
171
172
174 Percent += PercentPerChunk;
175
176
180 {
185 }
186
187
189 {
196 }
197 }
199
201
203}
ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
ARC_STATUS FsOpenFile(IN PCSTR FileName, IN PCSTR DefaultPath OPTIONAL, IN OPENMODE OpenMode, OUT PULONG FileId)
ARC_STATUS ArcClose(_In_ ULONG FileId)
ARC_STATUS ArcRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
PVOID MmAllocateMemoryWithType(SIZE_T MemorySize, TYPE_OF_MEMORY MemoryType)
VOID UiUpdateProgressBar(_In_ ULONG Percentage, _In_opt_ PCSTR ProgressText)
VOID UiDrawProgressBarCenter(_In_ PCSTR ProgressText)
VOID UiMessageBox(_In_ PCSTR Format,...)
_Inout_ PUCHAR _In_ PUCHAR _Out_ PUCHAR _Out_ PULONG ChunkSize
Referenced by RamDiskInitialize().
◆ RamDiskOpen()
◆ RamDiskRead()
Definition at line 50 of file ramdisk.c.
51{
53
54
56 {
59 }
60
61
62
64
65
69
71}
#define RtlCopyMemory(Destination, Source, Length)
◆ RamDiskSeek()
Definition at line 73 of file ramdisk.c.
74{
76
77 switch (SeekMode)
78 {
80 break;
83 break;
84 default:
87 }
88
91
94}
◆ gInitRamDiskBase
◆ gInitRamDiskSize
ULONG gInitRamDiskSize = 0 |
◆ RamDiskBase
◆ RamDiskDeviceRegistered
◆ RamDiskFileSize
◆ RamDiskImageLength
◆ RamDiskImageOffset
◆ RamDiskOffset
◆ RamDiskVtbl
Initial value:=
{
}
static ARC_STATUS RamDiskOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
static ARC_STATUS RamDiskRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
static ARC_STATUS RamDiskSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
static ARC_STATUS RamDiskClose(ULONG FileId)
static ARC_STATUS RamDiskGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition at line 96 of file ramdisk.c.
Referenced by RamDiskInitialize().