ReactOS 0.4.16-dev-197-g92996da
volume.c
Go to the documentation of this file.
1/*
2 * PROJECT: VFAT Filesystem
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Volume routines
5 * COPYRIGHT: Copyright 1998 Jason Filby <jasonfilby@yahoo.com>
6 * Copyright 2004-2022 Hervé Poussineau <hpoussin@reactos.org>
7 */
8
9/* INCLUDES *****************************************************************/
10
11#include "vfat.h"
12
13#define NDEBUG
14#include <debug.h>
15
16/* FUNCTIONS ****************************************************************/
17
18static
24{
26 PDEVICE_EXTENSION DeviceExt;
27
28 DPRINT("FsdGetFsVolumeInformation()\n");
29 DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
30 DPRINT("BufferLength %lu\n", *BufferLength);
31
32 DPRINT("Required length %lu\n", FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + DeviceObject->Vpb->VolumeLabelLength);
33 DPRINT("LabelLength %hu\n", DeviceObject->Vpb->VolumeLabelLength);
34 DPRINT("Label %.*S\n", DeviceObject->Vpb->VolumeLabelLength / sizeof(WCHAR), DeviceObject->Vpb->VolumeLabel);
35
38
39 DeviceExt = DeviceObject->DeviceExtension;
40
41 /* valid entries */
42 FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
43 FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
44 if (*BufferLength < DeviceObject->Vpb->VolumeLabelLength)
45 {
47 RtlCopyMemory(FsVolumeInfo->VolumeLabel,
48 DeviceObject->Vpb->VolumeLabel,
50 }
51 else
52 {
54 RtlCopyMemory(FsVolumeInfo->VolumeLabel,
55 DeviceObject->Vpb->VolumeLabel,
56 FsVolumeInfo->VolumeLabelLength);
57 *BufferLength -= DeviceObject->Vpb->VolumeLabelLength;
58 }
59
60 if (vfatVolumeIsFatX(DeviceExt))
61 {
63 DeviceExt->VolumeFcb->entry.FatX.CreationDate,
64 DeviceExt->VolumeFcb->entry.FatX.CreationTime,
65 &FsVolumeInfo->VolumeCreationTime);
66 }
67 else
68 {
70 DeviceExt->VolumeFcb->entry.Fat.CreationDate,
71 DeviceExt->VolumeFcb->entry.Fat.CreationTime,
72 &FsVolumeInfo->VolumeCreationTime);
73 }
74
75 FsVolumeInfo->SupportsObjects = FALSE;
76
77 DPRINT("Finished FsdGetFsVolumeInformation()\n");
78 DPRINT("BufferLength %lu\n", *BufferLength);
79
80 return Status;
81}
82
83
84static
87 PDEVICE_EXTENSION DeviceExt,
88 PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
90{
94
95 DPRINT("FsdGetFsAttributeInformation()\n");
96 DPRINT("FsAttributeInfo = %p\n", FsAttributeInfo);
97 DPRINT("BufferLength %lu\n", *BufferLength);
98
101
102 switch (DeviceExt->FatInfo.FatType)
103 {
104 case FAT12: pName = L"FAT"; break;
105 case FAT16: pName = L"FAT"; break;
106 case FAT32: pName = L"FAT32"; break;
107 case FATX16: pName = L"FATX"; break;
108 case FATX32: pName = L"FATX"; break;
109 default: return STATUS_NOT_SUPPORTED;
110 }
111
112 Length = wcslen(pName) * sizeof(WCHAR);
113 DPRINT("Required length %lu\n", (FIELD_OFFSET(FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName) + Length));
114
115 if (*BufferLength < Length)
116 {
119 }
120 else
121 {
123 }
124
125 FsAttributeInfo->FileSystemAttributes =
127
128 FsAttributeInfo->MaximumComponentNameLength = 255;
129
130 FsAttributeInfo->FileSystemNameLength = Length;
131
132 RtlCopyMemory(FsAttributeInfo->FileSystemName, pName, Length);
133
134 DPRINT("Finished FsdGetFsAttributeInformation()\n");
135
137 DPRINT("BufferLength %lu\n", *BufferLength);
138
139 return Status;
140}
141
142
143static
147 PFILE_FS_SIZE_INFORMATION FsSizeInfo,
149{
150 PDEVICE_EXTENSION DeviceExt;
152
153 DPRINT("FsdGetFsSizeInformation()\n");
154 DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
155
157
158 DeviceExt = DeviceObject->DeviceExtension;
159 Status = CountAvailableClusters(DeviceExt, &FsSizeInfo->AvailableAllocationUnits);
160
161 FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
162 FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
163 FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
164
165 DPRINT("Finished FsdGetFsSizeInformation()\n");
166 if (NT_SUCCESS(Status))
168
169 return Status;
170}
171
172
173static
177 PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
179{
180 DPRINT("FsdGetFsDeviceInformation()\n");
181 DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
182 DPRINT("BufferLength %lu\n", *BufferLength);
183 DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
184
186
187 FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
188 FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
189
190 DPRINT("FsdGetFsDeviceInformation() finished.\n");
191
193 DPRINT("BufferLength %lu\n", *BufferLength);
194
195 return STATUS_SUCCESS;
196}
197
198
199static
205{
206 PDEVICE_EXTENSION DeviceExt;
208
209 DPRINT("FsdGetFsFullSizeInformation()\n");
210 DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
211
213
214 DeviceExt = DeviceObject->DeviceExtension;
216
217 FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
219 FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
220 FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
221
222 DPRINT("Finished FsdGetFsFullSizeInformation()\n");
223 if (NT_SUCCESS(Status))
225
226 return Status;
227}
228
229
230static
234 PFILE_FS_LABEL_INFORMATION FsLabelInfo)
235{
236 PDEVICE_EXTENSION DeviceExt;
238 ULONG DirIndex = 0;
240 PVFATFCB pRootFcb;
242 BOOLEAN LabelFound = FALSE;
243 DIR_ENTRY VolumeLabelDirEntry;
244 ULONG VolumeLabelDirIndex;
245 ULONG LabelLen;
247 OEM_STRING StringO;
249 CHAR cString[43];
250 ULONG SizeDirEntry;
251 ULONG EntriesPerPage;
252 BOOLEAN IsFatX;
253
254 DPRINT("FsdSetFsLabelInformation()\n");
255
256 DeviceExt = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
257 IsFatX = vfatVolumeIsFatX(DeviceExt);
258
259 if (sizeof(DeviceObject->Vpb->VolumeLabel) < FsLabelInfo->VolumeLabelLength)
260 {
262 }
263
264 if (IsFatX)
265 {
266 if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 42)
268
269 SizeDirEntry = sizeof(FATX_DIR_ENTRY);
270 EntriesPerPage = FATX_ENTRIES_PER_PAGE;
271 }
272 else
273 {
274 if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 11)
276
277 SizeDirEntry = sizeof(FAT_DIR_ENTRY);
278 EntriesPerPage = FAT_ENTRIES_PER_PAGE;
279 }
280
281 /* Create Volume label dir entry */
282 LabelLen = FsLabelInfo->VolumeLabelLength / sizeof(WCHAR);
283 RtlZeroMemory(&VolumeLabelDirEntry, SizeDirEntry);
284 StringW.Buffer = FsLabelInfo->VolumeLabel;
285 StringW.Length = StringW.MaximumLength = (USHORT)FsLabelInfo->VolumeLabelLength;
286 StringO.Buffer = cString;
287 StringO.Length = 0;
288 StringO.MaximumLength = 42;
290 if (!NT_SUCCESS(Status))
291 return Status;
292
293 if (IsFatX)
294 {
295 RtlCopyMemory(VolumeLabelDirEntry.FatX.Filename, cString, LabelLen);
296 memset(&VolumeLabelDirEntry.FatX.Filename[LabelLen], ' ', 42 - LabelLen);
297 VolumeLabelDirEntry.FatX.Attrib = _A_VOLID;
298 }
299 else
300 {
301 RtlCopyMemory(VolumeLabelDirEntry.Fat.Filename, cString, max(sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen));
302 if (LabelLen > sizeof(VolumeLabelDirEntry.Fat.Filename))
303 {
304 memset(VolumeLabelDirEntry.Fat.Ext, ' ', sizeof(VolumeLabelDirEntry.Fat.Ext));
305 RtlCopyMemory(VolumeLabelDirEntry.Fat.Ext, cString + sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen - sizeof(VolumeLabelDirEntry.Fat.Filename));
306 }
307 else
308 {
309 memset(&VolumeLabelDirEntry.Fat.Filename[LabelLen], ' ', sizeof(VolumeLabelDirEntry.Fat.Filename) - LabelLen);
310 }
311 VolumeLabelDirEntry.Fat.Attrib = _A_VOLID;
312 }
313
314 pRootFcb = vfatOpenRootFCB(DeviceExt);
315 Status = vfatFCBInitializeCacheFromVolume(DeviceExt, pRootFcb);
316 if (!NT_SUCCESS(Status))
317 {
318 return Status;
319 }
320
321 /* Search existing volume entry on disk */
322 FileOffset.QuadPart = 0;
324 {
325 CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
326 }
328 {
330 }
331 _SEH2_END;
332
333 if (NT_SUCCESS(Status))
334 {
335 while (TRUE)
336 {
337 if (ENTRY_VOLUME(IsFatX, Entry))
338 {
339 /* Update entry */
340 LabelFound = TRUE;
341 RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
344 break;
345 }
346
347 if (ENTRY_END(IsFatX, Entry))
348 {
349 break;
350 }
351
352 DirIndex++;
353 Entry = (PDIR_ENTRY)((ULONG_PTR)Entry + SizeDirEntry);
354 if ((DirIndex % EntriesPerPage) == 0)
355 {
357 FileOffset.u.LowPart += PAGE_SIZE;
359 {
360 CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
361 }
363 {
365 }
366 _SEH2_END;
367
368 if (!NT_SUCCESS(Status))
369 {
370 Context = NULL;
371 break;
372 }
373 }
374 }
375
376 if (Context)
377 {
379 }
380 }
381
382 if (!LabelFound)
383 {
384 /* Add new entry for label */
385 if (!vfatFindDirSpace(DeviceExt, pRootFcb, 1, &VolumeLabelDirIndex))
387 else
388 {
389 FileOffset.u.HighPart = 0;
390 FileOffset.u.LowPart = VolumeLabelDirIndex * SizeDirEntry;
391
394 {
395 CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
396 }
398 {
400 }
401 _SEH2_END;
402
403 if (NT_SUCCESS(Status))
404 {
405 RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
409 }
410 }
411 }
412
413 vfatReleaseFCB(DeviceExt, pRootFcb);
414 if (!NT_SUCCESS(Status))
415 {
416 return Status;
417 }
418
419 /* Update volume label in memory */
420 DeviceObject->Vpb->VolumeLabelLength = (USHORT)FsLabelInfo->VolumeLabelLength;
421 RtlCopyMemory(DeviceObject->Vpb->VolumeLabel, FsLabelInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabelLength);
422
423 return Status;
424}
425
426
427/*
428 * FUNCTION: Retrieve the specified volume information
429 */
432 PVFAT_IRP_CONTEXT IrpContext)
433{
436 PVOID SystemBuffer;
438
439 /* PRECONDITION */
440 ASSERT(IrpContext);
441
442 DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
443
446 {
447 DPRINT1("DirResource failed!\n");
448 return VfatMarkIrpContextForQueue(IrpContext);
449 }
450
451 /* INITIALIZATION */
452 FsInformationClass = IrpContext->Stack->Parameters.QueryVolume.FsInformationClass;
453 BufferLength = IrpContext->Stack->Parameters.QueryVolume.Length;
454 SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
455
456 DPRINT("FsInformationClass %d\n", FsInformationClass);
457 DPRINT("SystemBuffer %p\n", SystemBuffer);
458
459 RtlZeroMemory(SystemBuffer, BufferLength);
460
461 switch (FsInformationClass)
462 {
465 SystemBuffer,
466 &BufferLength);
467 break;
468
471 SystemBuffer,
472 &BufferLength);
473 break;
474
476 RC = FsdGetFsSizeInformation(IrpContext->DeviceObject,
477 SystemBuffer,
478 &BufferLength);
479 break;
480
483 SystemBuffer,
484 &BufferLength);
485 break;
486
489 SystemBuffer,
490 &BufferLength);
491 break;
492
493 default:
495 }
496
498
499 IrpContext->Irp->IoStatus.Information =
500 IrpContext->Stack->Parameters.QueryVolume.Length - BufferLength;
501
502 return RC;
503}
504
505
506/*
507 * FUNCTION: Set the specified volume information
508 */
511 PVFAT_IRP_CONTEXT IrpContext)
512{
515 PVOID SystemBuffer;
517 PIO_STACK_LOCATION Stack = IrpContext->Stack;
518
519 /* PRECONDITION */
520 ASSERT(IrpContext);
521
522 DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
523
526 {
527 return VfatMarkIrpContextForQueue(IrpContext);
528 }
529
530 FsInformationClass = Stack->Parameters.SetVolume.FsInformationClass;
531 BufferLength = Stack->Parameters.SetVolume.Length;
532 SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
533
534 DPRINT("FsInformationClass %d\n", FsInformationClass);
535 DPRINT("BufferLength %u\n", BufferLength);
536 DPRINT("SystemBuffer %p\n", SystemBuffer);
537
538 switch (FsInformationClass)
539 {
542 SystemBuffer);
543 break;
544
545 default:
547 }
548
550 IrpContext->Irp->IoStatus.Information = 0;
551
552 return Status;
553}
554
555/* EOF */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define FAT32
Definition: fat.h:169
#define FATX16
Definition: fat.h:170
#define FATX32
Definition: fat.h:171
#define FAT12
Definition: fat.h:167
#define FAT16
Definition: fat.h:168
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
Definition: cachesub.c:121
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
BOOLEAN vfatFindDirSpace(IN PDEVICE_EXTENSION DeviceExt, IN PVFATFCB pDirFcb, IN ULONG nbSlots, OUT PULONG start)
Definition: dirwr.c:258
NTSTATUS vfatFCBInitializeCacheFromVolume(PVCB vcb, PVFATFCB fcb)
Definition: dirwr.c:22
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
struct _BEEP_DEVICE_EXTENSION * PDEVICE_EXTENSION
#define IRPCONTEXT_CANWAIT
Definition: ntfs.h:474
BOOLEAN FsdDosDateTimeToSystemTime(PDEVICE_EXTENSION DeviceExt, USHORT DosDate, USHORT DosTime, PLARGE_INTEGER SystemTime)
Definition: dir.c:21
NTSTATUS CountAvailableClusters(PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER Clusters)
Definition: fat.c:541
static NTSTATUS FsdGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_SIZE_INFORMATION FsSizeInfo, PULONG BufferLength)
Definition: volume.c:145
NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:510
NTSTATUS VfatQueryVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:431
static NTSTATUS FsdGetFsAttributeInformation(PDEVICE_EXTENSION DeviceExt, PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo, PULONG BufferLength)
Definition: volume.c:86
static NTSTATUS FsdGetFsFullSizeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_FULL_SIZE_INFORMATION FsSizeInfo, PULONG BufferLength)
Definition: volume.c:201
static NTSTATUS FsdGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_VOLUME_INFORMATION FsVolumeInfo, PULONG BufferLength)
Definition: volume.c:20
static NTSTATUS FsdGetFsDeviceInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, PULONG BufferLength)
Definition: volume.c:175
static NTSTATUS FsdSetFsLabelInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_LABEL_INFORMATION FsLabelInfo)
Definition: volume.c:232
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1676
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ FS_INFORMATION_CLASS FsInformationClass
Definition: fltkernel.h:1330
@ FileFsDeviceInformation
Definition: from_kernel.h:222
@ FileFsLabelInformation
Definition: from_kernel.h:220
@ FileFsAttributeInformation
Definition: from_kernel.h:223
@ FileFsVolumeInformation
Definition: from_kernel.h:219
@ FileFsSizeInformation
Definition: from_kernel.h:221
struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
enum _FSINFOCLASS FS_INFORMATION_CLASS
struct _FILE_FS_FULL_SIZE_INFORMATION FILE_FS_FULL_SIZE_INFORMATION
#define FILE_CASE_PRESERVED_NAMES
Definition: from_kernel.h:234
#define FILE_UNICODE_ON_DISK
Definition: from_kernel.h:235
Status
Definition: gdiplustypes.h:25
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static const WCHAR StringW[]
Definition: global.c:49
#define ASSERT(a)
Definition: mode.c:44
static FsInfoType * FsVolumeInfo(char *fpath)
Definition: disk.c:974
static LPSTR pName
Definition: security.c:75
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define PIN_WAIT
#define FileFsFullSizeInformation
Definition: ntifs_ex.h:389
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
#define STATUS_NAME_TOO_LONG
Definition: ntstatus.h:498
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
VOID NTAPI CcUnpinData(IN PVOID Bcb)
Definition: pinsup.c:955
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pinsup.c:802
#define FILE_DEVICE_DISK
Definition: winioctl.h:52
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _A_VOLID
Definition: dos.h:33
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define DPRINT
Definition: sndvol32.h:73
base of all file and directory entries
Definition: entries.h:83
PDEVICE_OBJECT DeviceObject
Definition: vfat.h:584
ULONG Flags
Definition: vfat.h:586
PIO_STACK_LOCATION Stack
Definition: vfat.h:588
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char Filename[8]
Definition: vfat.h:114
unsigned char Ext[3]
Definition: vfat.h:114
unsigned char Attrib
Definition: vfat.h:117
unsigned char Attrib
Definition: vfat.h:172
unsigned char Filename[42]
Definition: vfat.h:173
LARGE_INTEGER ActualAvailableAllocationUnits
Definition: from_kernel.h:272
LARGE_INTEGER CallerAvailableAllocationUnits
Definition: from_kernel.h:271
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:270
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:263
LARGE_INTEGER AvailableAllocationUnits
Definition: from_kernel.h:264
struct _IO_STACK_LOCATION::@3974::@3987 QueryVolume
union _IO_STACK_LOCATION::@1575 Parameters
union _IRP::@1577 AssociatedIrp
PVOID SystemBuffer
IO_STATUS_BLOCK IoStatus
Definition: vfat.h:448
PFILE_OBJECT FileObject
Definition: vfat.h:499
#define max(a, b)
Definition: svc.c:63
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_DISK_FULL
Definition: udferr_usr.h:155
STRING OEM_STRING
Definition: umtypes.h:203
Definition: vfat.h:225
FAT_DIR_ENTRY Fat
Definition: vfat.h:226
FATX_DIR_ENTRY FatX
Definition: vfat.h:227
LONGLONG QuadPart
Definition: typedefs.h:114
struct _FATDirEntry FAT_DIR_ENTRY
Definition: vfat.h:167
struct _FATXDirEntry FATX_DIR_ENTRY
Definition: vfat.h:222
#define ENTRY_VOLUME(IsFatX, DirEntry)
Definition: vfat.h:206
union _DIR_ENTRY * PDIR_ENTRY
Definition: vfat.h:230
#define FATX_ENTRIES_PER_PAGE
Definition: vfat.h:220
#define ENTRY_END(IsFatX, DirEntry)
Definition: vfat.h:207
FORCEINLINE BOOLEAN vfatVolumeIsFatX(PDEVICE_EXTENSION DeviceExt)
Definition: vfat.h:651
FORCEINLINE NTSTATUS VfatMarkIrpContextForQueue(PVFAT_IRP_CONTEXT IrpContext)
Definition: vfat.h:625
#define FAT_ENTRIES_PER_PAGE
Definition: vfat.h:219
PVFATFCB vfatOpenRootFCB(PDEVICE_EXTENSION pVCB)
Definition: fcb.c:708
VOID vfatReleaseFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
Definition: fcb.c:335
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175