21#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
22 (pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
43 DPRINT(
"VfatHasFileSystem\n");
45 *RecognizedFS =
FALSE;
57 DPRINT(
"VfatBlockDeviceIoControl failed (%x)\n",
Status);
75 DPRINT(
"VfatBlockDeviceIoControl failed (%x)\n",
Status);
79 DPRINT(
"Partition Information:\n");
97 PartitionInfoIsValid =
TRUE;
107 PartitionInfoIsValid =
TRUE;
108 *RecognizedFS =
TRUE;
113 *RecognizedFS =
TRUE;
130 if (Boot->Signatur1 != 0xaa55)
132 *RecognizedFS =
FALSE;
136 Boot->BytesPerSector != 512 &&
137 Boot->BytesPerSector != 1024 &&
138 Boot->BytesPerSector != 2048 &&
139 Boot->BytesPerSector != 4096)
141 DPRINT1(
"BytesPerSector %u\n", Boot->BytesPerSector);
142 *RecognizedFS =
FALSE;
146 Boot->FATCount != 1 &&
149 DPRINT1(
"FATCount %u\n", Boot->FATCount);
150 *RecognizedFS =
FALSE;
154 Boot->Media != 0xf0 &&
155 Boot->Media != 0xf8 &&
156 Boot->Media != 0xf9 &&
157 Boot->Media != 0xfa &&
158 Boot->Media != 0xfb &&
159 Boot->Media != 0xfc &&
160 Boot->Media != 0xfd &&
161 Boot->Media != 0xfe &&
164 DPRINT1(
"Media %02x\n", Boot->Media);
165 *RecognizedFS =
FALSE;
169 Boot->SectorsPerCluster != 1 &&
170 Boot->SectorsPerCluster != 2 &&
171 Boot->SectorsPerCluster != 4 &&
172 Boot->SectorsPerCluster != 8 &&
173 Boot->SectorsPerCluster != 16 &&
174 Boot->SectorsPerCluster != 32 &&
175 Boot->SectorsPerCluster != 64 &&
176 Boot->SectorsPerCluster != 128)
178 DPRINT1(
"SectorsPerCluster %02x\n", Boot->SectorsPerCluster);
179 *RecognizedFS =
FALSE;
183 Boot->BytesPerSector * Boot->SectorsPerCluster > 64 * 1024)
185 DPRINT1(
"ClusterSize %d\n", Boot->BytesPerSector * Boot->SectorsPerCluster);
186 *RecognizedFS =
FALSE;
192 FatInfo.
FATStart = Boot->ReservedSectors;
198 FatInfo.
rootDirectorySectors = ((Boot->RootEntries * 32) + Boot->BytesPerSector - 1) / Boot->BytesPerSector;
201 FatInfo.
Sectors =
Sectors = Boot->Sectors ? Boot->Sectors : Boot->SectorsHuge;
229 if (PartitionInfoIsValid &&
232 *RecognizedFS =
FALSE;
235 if (pFatInfo && *RecognizedFS)
245 if (!*RecognizedFS && PartitionInfoIsValid)
248 if (BootFatX ==
NULL)
260 *RecognizedFS =
TRUE;
261 if (BootFatX->SysType[0] !=
'F' ||
262 BootFatX->SysType[1] !=
'A' ||
263 BootFatX->SysType[2] !=
'T' ||
264 BootFatX->SysType[3] !=
'X')
266 DPRINT1(
"SysType %02X%02X%02X%02X (%c%c%c%c)\n",
267 BootFatX->SysType[0], BootFatX->SysType[1], BootFatX->SysType[2], BootFatX->SysType[3],
268 isprint(BootFatX->SysType[0]) ? BootFatX->SysType[0] :
'.',
269 isprint(BootFatX->SysType[1]) ? BootFatX->SysType[1] :
'.',
270 isprint(BootFatX->SysType[2]) ? BootFatX->SysType[2] :
'.',
271 isprint(BootFatX->SysType[3]) ? BootFatX->SysType[3] :
'.');
273 *RecognizedFS =
FALSE;
277 BootFatX->SectorsPerCluster != 1 &&
278 BootFatX->SectorsPerCluster != 2 &&
279 BootFatX->SectorsPerCluster != 4 &&
280 BootFatX->SectorsPerCluster != 8 &&
281 BootFatX->SectorsPerCluster != 16 &&
282 BootFatX->SectorsPerCluster != 32 &&
283 BootFatX->SectorsPerCluster != 64 &&
284 BootFatX->SectorsPerCluster != 128)
286 DPRINT1(
"SectorsPerCluster %lu\n", BootFatX->SectorsPerCluster);
307 FatInfo.
VolumeID = BootFatX->VolumeID;
309 FatInfo.
FATCount = BootFatX->FATCount;
318 if (pFatInfo && *RecognizedFS)
327 DPRINT(
"VfatHasFileSystem done\n");
358 ULONG EntriesPerPage;
433 StringO.MaximumLength = StringO.Length =
Entry->FatX.FilenameLength;
448 if ((DirIndex % EntriesPerPage) == 0)
527 DPRINT(
"VfatMount(IrpContext %p)\n", IrpContext);
546 if (RecognizedFS ==
FALSE)
548 DPRINT(
"VFAT: Unrecognized Volume\n");
556 HashTableSize = 4099;
561 HashTableSize = 16411;
565 HashTableSize = 65537;
567 DPRINT(
"VFAT: Recognized volume\n");
572 DeviceToMount->Characteristics,
583 DeviceExt->HashTableSize = HashTableSize;
588 DeviceExt->OverflowQueueCount = 0;
589 DeviceExt->PostedRequestCount = 0;
593 DeviceToMount->Vpb =
Vpb;
597 DPRINT(
"BytesPerSector: %u\n", DeviceExt->FatInfo.BytesPerSector);
598 DPRINT(
"SectorsPerCluster: %u\n", DeviceExt->FatInfo.SectorsPerCluster);
599 DPRINT(
"FATCount: %u\n", DeviceExt->FatInfo.FATCount);
600 DPRINT(
"FATSectors: %u\n", DeviceExt->FatInfo.FATSectors);
601 DPRINT(
"RootStart: %u\n", DeviceExt->FatInfo.rootStart);
602 DPRINT(
"DataStart: %u\n", DeviceExt->FatInfo.dataStart);
603 if (DeviceExt->FatInfo.FatType ==
FAT32)
605 DPRINT(
"RootCluster: %u\n", DeviceExt->FatInfo.RootCluster);
608 switch (DeviceExt->FatInfo.FatType)
638 if (DeviceExt->FatInfo.FatType ==
FATX16 ||
639 DeviceExt->FatInfo.FatType ==
FATX32)
642 DeviceExt->BaseDateYear = 2000;
647 DeviceExt->BaseDateYear = 1980;
651 DeviceExt->StorageDevice = DeviceToMount;
652 DeviceExt->StorageDevice->Vpb->DeviceObject =
DeviceObject;
653 DeviceExt->StorageDevice->Vpb->RealDevice = DeviceExt->StorageDevice;
654 DeviceExt->StorageDevice->Vpb->Flags |=
VPB_MOUNTED;
655 DeviceObject->StackSize = DeviceExt->StorageDevice->StackSize + 1;
665 if (DeviceExt->SpareVPB ==
NULL)
674 if (DeviceExt->Statistics ==
NULL)
684 DeviceExt->Statistics[
i].Base.Version = 1;
685 DeviceExt->Statistics[
i].Base.SizeOfCompleteStructure =
sizeof(
STATISTICS);
700 DeviceExt->FATFileObject->PrivateCacheMap =
NULL;
723 DeviceExt->LastAvailableCluster = 2;
729 VolumeFcb =
vfatNewFCB(DeviceExt, &VolumeNameU);
730 if (VolumeFcb ==
NULL)
740 DeviceExt->VolumeFcb = VolumeFcb;
747 DeviceObject->Vpb->SerialNumber = DeviceExt->FatInfo.VolumeID;
754 Vpb->VolumeLabelLength = VolumeLabelU.
Length;
769 DPRINT1(
"Mounting a dirty volume\n");
789 DPRINT(
"Mount success\n");
797 if (DeviceExt && DeviceExt->FATFileObject)
808 DeviceExt->FATFileObject =
NULL;
812 if (DeviceExt && DeviceExt->SpareVPB)
814 if (DeviceExt && DeviceExt->Statistics)
841 DPRINT(
"VfatVerify(IrpContext %p)\n", IrpContext);
850 DPRINT(
"Already verified\n");
863 DPRINT(
"VfatBlockDeviceIoControl() failed (Status %lx)\n",
Status);
882 VolumeLabelU.
Buffer = BufferU;
883 VolumeLabelU.Length = 0;
884 VolumeLabelU.MaximumLength =
sizeof(BufferU);
896 VpbLabelU.
Length =
Vpb->VolumeLabelLength;
915 Vpb->RealDevice->Flags &= ~DO_VERIFY_VOLUME;
926 DPRINT(
"VfatGetVolumeBitmap (IrpContext %p)\n", IrpContext);
940 ULONG MaxExtentCount;
944 ULONG CurrentCluster;
948 DPRINT(
"VfatGetRetrievalPointers(IrpContext %p)\n", IrpContext);
954 Stack->Parameters.DeviceIoControl.Type3InputBuffer ==
NULL)
959 if (IrpContext->
Irp->UserBuffer ==
NULL ||
970 RetrievalPointers = IrpContext->
Irp->UserBuffer;
972 MaxExtentCount = ((
Stack->Parameters.DeviceIoControl.OutputBufferLength -
sizeof(RetrievalPointers->
ExtentCount) -
sizeof(RetrievalPointers->
StartingVcn)) /
sizeof(RetrievalPointers->
Extents[0]));
982 Vcn.
u.LowPart * DeviceExt->FatInfo.BytesPerCluster,
983 &CurrentCluster,
FALSE);
991 RetrievalPointers->
Extents[0].Lcn.u.HighPart = 0;
992 RetrievalPointers->
Extents[0].Lcn.u.LowPart = CurrentCluster - 2;
994 while (CurrentCluster != 0xffffffff && RetrievalPointers->
ExtentCount < MaxExtentCount)
996 LastCluster = CurrentCluster;
1004 if (LastCluster + 1 != CurrentCluster)
1008 if (RetrievalPointers->
ExtentCount < MaxExtentCount)
1011 RetrievalPointers->
Extents[RetrievalPointers->
ExtentCount].Lcn.u.LowPart = CurrentCluster - 2;
1030 DPRINT(
"VfatMoveFile(IrpContext %p)\n", IrpContext);
1041 DPRINT(
"VfatIsVolumeDirty(IrpContext %p)\n", IrpContext);
1070 DPRINT(
"VfatMarkVolumeDirty(IrpContext %p)\n", IrpContext);
1078 DeviceExt->VolumeFcb->Flags &= ~VCB_CLEAR_DIRTY;
1094 DPRINT(
"VfatLockOrUnlockVolume(%p, %d)\n", IrpContext,
Lock);
1099 Vpb = DeviceExt->FATFileObject->Vpb;
1127 if (
Lock && DeviceExt->OpenHandleCount != 1)
1139 ULONG HandleCount = 0;
1145 ListEntry = DeviceExt->FcbListHead.Flink;
1146 while (ListEntry != &DeviceExt->FcbListHead)
1149 ListEntry = ListEntry->
Flink;
1178 if (HandleCount > 2)
1195 DPRINT1(
"Can't lock: %u opened\n", DeviceExt->OpenHandleCount);
1197 ListEntry = DeviceExt->FcbListHead.Flink;
1198 while (ListEntry != &DeviceExt->FcbListHead)
1201 ListEntry = ListEntry->
Flink;
1220 DPRINT1(
"HACK: Using lock-hack!\n");
1245 DeviceExt->Flags &= ~VCB_VOLUME_LOCKED;
1246 Vpb->Flags &= ~VPB_LOCKED;
1264 DPRINT(
"VfatDismountVolume(%p)\n", IrpContext);
1303 DeviceExt->VolumeFcb->Flags &= ~VCB_IS_DIRTY;
1312 if (
Fcb == DeviceExt->RootFcb)
1313 DeviceExt->RootFcb =
NULL;
1314 else if (
Fcb == DeviceExt->VolumeFcb)
1315 DeviceExt->VolumeFcb =
NULL;
1325#ifndef ENABLE_SWAPOUT
1383 DPRINT(
"VfatFileSystemControl(IrpContext %p)\n", IrpContext);
1443 DPRINT(
"VFATFS: IRP_MN_VERIFY_VOLUME\n");
#define PARTITION_FAT32_XINT13
_In_ PFCB _In_ LONGLONG FileOffset
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
_Inout_ PIRP _In_ PDEVICE_OBJECT DeviceToVerify
#define IOCTL_DISK_CHECK_VERIFY
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
ULONG vfatDirEntryGetFirstCluster(PDEVICE_EXTENSION pDeviceExt, PDIR_ENTRY pFatDirEntry)
#define NT_SUCCESS(StatCode)
VOID vfat8Dot3ToString(PFAT_DIR_ENTRY pEntry, PUNICODE_STRING NameU)
NTSTATUS FAT32GetNextCluster(PDEVICE_EXTENSION DeviceExt, ULONG CurrentCluster, PULONG NextCluster)
NTSTATUS FAT12FindAndMarkAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
NTSTATUS CountAvailableClusters(PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER Clusters)
NTSTATUS FAT16SetDirtyStatus(PDEVICE_EXTENSION DeviceExt, BOOLEAN DirtyStatus)
NTSTATUS FAT16GetDirtyStatus(PDEVICE_EXTENSION DeviceExt, PBOOLEAN DirtyStatus)
NTSTATUS SetDirtyStatus(PDEVICE_EXTENSION DeviceExt, BOOLEAN DirtyStatus)
NTSTATUS FAT32GetDirtyStatus(PDEVICE_EXTENSION DeviceExt, PBOOLEAN DirtyStatus)
NTSTATUS FAT32WriteCluster(PDEVICE_EXTENSION DeviceExt, ULONG ClusterToWrite, ULONG NewValue, PULONG OldValue)
NTSTATUS FAT12WriteCluster(PDEVICE_EXTENSION DeviceExt, ULONG ClusterToWrite, ULONG NewValue, PULONG OldValue)
NTSTATUS FAT16FindAndMarkAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
NTSTATUS FAT12GetNextCluster(PDEVICE_EXTENSION DeviceExt, ULONG CurrentCluster, PULONG NextCluster)
NTSTATUS FAT32SetDirtyStatus(PDEVICE_EXTENSION DeviceExt, BOOLEAN DirtyStatus)
NTSTATUS FAT16GetNextCluster(PDEVICE_EXTENSION DeviceExt, ULONG CurrentCluster, PULONG NextCluster)
NTSTATUS FAT16WriteCluster(PDEVICE_EXTENSION DeviceExt, ULONG ClusterToWrite, ULONG NewValue, PULONG OldValue)
NTSTATUS GetDirtyStatus(PDEVICE_EXTENSION DeviceExt, PBOOLEAN DirtyStatus)
NTSTATUS FAT32FindAndMarkAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
NTSTATUS NextCluster(PDEVICE_EXTENSION DeviceExt, ULONG FirstCluster, PULONG CurrentCluster, BOOLEAN Extend)
NTSTATUS OffsetToCluster(PDEVICE_EXTENSION DeviceExt, ULONG FirstCluster, ULONG FileOffset, PULONG Cluster, BOOLEAN Extend)
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define RtlCompareMemory(s1, s2, l)
#define RemoveTailList(ListHead)
#define ExAcquireResourceExclusiveLite(res, wait)
#define DO_SYSTEM_BOOT_PARTITION
#define InitializeListHead(ListHead)
#define ExAcquireResourceSharedLite(res, wait)
#define KeInitializeSpinLock(sl)
#define ROUND_UP(n, align)
#define ClearFlag(_F, _SF)
#define VCB_VOLUME_LOCKED
#define VCB_DISMOUNT_PENDING
#define BooleanFlagOn(F, SF)
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
PVFAT_GLOBAL_DATA VfatGlobalData
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
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
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
NTSYSAPI NTSTATUS NTAPI RtlOemStringToUnicodeString(PUNICODE_STRING DestinationString, PCOEM_STRING SourceString, BOOLEAN AllocateDestinationString)
#define FSCTL_LOCK_VOLUME
#define FSCTL_MARK_VOLUME_DIRTY
#define FSCTL_UNLOCK_VOLUME
#define FSCTL_FILESYSTEM_GET_STATISTICS
#define FSCTL_DISMOUNT_VOLUME
struct _DISK_GEOMETRY DISK_GEOMETRY
struct _PARTITION_INFORMATION PARTITION_INFORMATION
#define IOCTL_DISK_GET_PARTITION_INFO
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define FSRTL_VOLUME_UNLOCK
#define FSRTL_VOLUME_LOCK
#define FSRTL_VOLUME_DISMOUNT
#define FSRTL_VOLUME_MOUNT
#define FSRTL_VOLUME_LOCK_FAILED
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
VOID NTAPI FsRtlNotifyInitializeSync(IN PNOTIFY_SYNC *NotifySync)
NTSTATUS NTAPI FsRtlNotifyVolumeEvent(IN PFILE_OBJECT FileObject, IN ULONG EventCode)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PFILE_OBJECT NTAPI IoCreateStreamFileObject(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
#define STATUS_INVALID_BUFFER_SIZE
#define STATUS_VOLUME_DISMOUNTED
VOID NTAPI CcUnpinData(IN PVOID Bcb)
BOOLEAN NTAPI CcMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
#define FILE_DEVICE_DISK_FILE_SYSTEM
struct STARTING_VCN_INPUT_BUFFER * PSTARTING_VCN_INPUT_BUFFER
#define FSCTL_IS_VOLUME_DIRTY
#define FSCTL_GET_RETRIEVAL_POINTERS
#define FSCTL_GET_VOLUME_BITMAP
#define FILESYSTEM_STATISTICS_TYPE_FAT
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
base of all file and directory entries
ULONG rootDirectorySectors
struct RETRIEVAL_POINTERS_BUFFER::@3323 Extents[1]
LARGE_INTEGER StartingVcn
PDRIVER_OBJECT DriverObject
CACHE_MANAGER_CALLBACKS CacheMgrCallbacks
LIST_ENTRY VolumeListHead
PDEVICE_OBJECT DeviceObject
PDEVICE_OBJECT DeviceObject
PDEVICE_EXTENSION DeviceExt
FSRTL_COMMON_FCB_HEADER RFCB
struct _IO_STACK_LOCATION::@3970::@3985 FileSystemControl
struct _IO_STACK_LOCATION::@3970::@3991 VerifyVolume
struct _IO_STACK_LOCATION::@3970::@3990 MountVolume
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
union _IRP::@1577 AssociatedIrp
struct _LIST_ENTRY * Flink
FSRTL_COMMON_FCB_HEADER RFCB
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNRECOGNIZED_VOLUME
#define STATUS_WRONG_VOLUME
#define STATUS_INVALID_USER_BUFFER
#define STATUS_VERIFY_REQUIRED
#define STATUS_INSUFFICIENT_RESOURCES
struct _LARGE_INTEGER::@2299 u
struct _FATDirEntry FAT_DIR_ENTRY
struct _FATXDirEntry FATX_DIR_ENTRY
#define VCB_IS_SYS_OR_HAS_PAGE
#define ENTRY_VOLUME(IsFatX, DirEntry)
union _DIR_ENTRY * PDIR_ENTRY
#define FATX_ENTRIES_PER_PAGE
struct _STATISTICS STATISTICS
FORCEINLINE BOOLEAN vfatFCBIsDirectory(PVFATFCB FCB)
struct _VFATCCB * PVFATCCB
#define ENTRY_END(IsFatX, DirEntry)
FORCEINLINE BOOLEAN vfatVolumeIsFatX(PDEVICE_EXTENSION DeviceExt)
#define FAT_ENTRIES_PER_PAGE
NTSTATUS VfatReadDisk(IN PDEVICE_OBJECT pDeviceObject, IN PLARGE_INTEGER ReadOffset, IN ULONG ReadLength, IN OUT PUCHAR Buffer, IN BOOLEAN Override)
NTSTATUS VfatBlockDeviceIoControl(IN PDEVICE_OBJECT DeviceObject, IN ULONG CtlCode, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer OPTIONAL, IN OUT PULONG OutputBufferSize, IN BOOLEAN Override)
PVFATFCB vfatOpenRootFCB(PDEVICE_EXTENSION pVCB)
VOID vfatDestroyFCB(PVFATFCB pFCB)
NTSTATUS vfatAttachFCBToFileObject(PDEVICE_EXTENSION vcb, PVFATFCB fcb, PFILE_OBJECT fileObject)
VOID vfatDestroyCCB(PVFATCCB pCcb)
PVFATFCB vfatNewFCB(PDEVICE_EXTENSION pVCB, PUNICODE_STRING pFileNameU)
VOID vfatReleaseFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
NTSTATUS VfatFlushVolume(PDEVICE_EXTENSION DeviceExt, PVFATFCB VolumeFcb)
static NTSTATUS VfatDismountVolume(PVFAT_IRP_CONTEXT IrpContext)
VFAT_DISPATCH FatXDispatch
static NTSTATUS VfatGetVolumeBitmap(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS VfatHasFileSystem(PDEVICE_OBJECT DeviceToMount, PBOOLEAN RecognizedFS, PFATINFO pFatInfo, BOOLEAN Override)
static NTSTATUS VfatMount(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS VfatGetRetrievalPointers(PVFAT_IRP_CONTEXT IrpContext)
VFAT_DISPATCH FatDispatch
static NTSTATUS VfatMoveFile(PVFAT_IRP_CONTEXT IrpContext)
NTSTATUS VfatFileSystemControl(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS ReadVolumeLabel(PVOID Device, ULONG Start, BOOLEAN IsFatX, PUNICODE_STRING VolumeLabel)
static NTSTATUS VfatIsVolumeDirty(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS VfatLockOrUnlockVolume(PVFAT_IRP_CONTEXT IrpContext, BOOLEAN Lock)
static NTSTATUS VfatGetStatistics(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS VfatMarkVolumeDirty(PVFAT_IRP_CONTEXT IrpContext)
static NTSTATUS VfatVerify(PVFAT_IRP_CONTEXT IrpContext)
_Must_inspect_result_ _In_ WDFDEVICE Device
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
_Must_inspect_result_ _In_ ULONG Flags
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
#define IRP_MN_VERIFY_VOLUME
#define IRP_MN_USER_FS_REQUEST
#define SL_ALLOW_RAW_MOUNT
#define IRP_MN_KERNEL_CALL
#define MAXIMUM_VOLUME_LABEL_LENGTH
#define IRP_MN_MOUNT_VOLUME
#define ObDereferenceObject