7 #include <pseh/pseh2.h>
10 #define INIT_SECTION __attribute__((section ("INIT")))
12 #define INIT_SECTION /* Done via alloc_text for MSC */
15 #define USE_ROS_CC_AND_FS
18 #define ENABLE_SWAPOUT
22 #define ROUND_DOWN(n, align) \
23 (((ULONG)n) & ~((align) - 1l))
25 #define ROUND_UP(n, align) \
26 ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
28 #define ROUND_DOWN_64(n, align) \
29 (((ULONGLONG)n) & ~((align) - 1LL))
31 #define ROUND_UP_64(n, align) \
32 ROUND_DOWN_64(((ULONGLONG)n) + (align) - 1LL, (align))
37 unsigned char magic0
, res0
, magic1
;
38 unsigned char OEMName
[8];
39 unsigned short BytesPerSector
;
40 unsigned char SectorsPerCluster
;
41 unsigned short ReservedSectors
;
42 unsigned char FATCount
;
43 unsigned short RootEntries
, Sectors
;
45 unsigned short FATSectors
, SectorsPerTrack
, Heads
;
46 unsigned long HiddenSectors
, SectorsHuge
;
47 unsigned char Drive
, Res1
, Sig
;
48 unsigned long VolumeID
;
49 unsigned char VolumeLabel
[11], SysType
[8];
50 unsigned char Res2
[448];
51 unsigned short Signatur1
;
56 unsigned char magic0
, res0
, magic1
; // 0
57 unsigned char OEMName
[8]; // 3
58 unsigned short BytesPerSector
; // 11
59 unsigned char SectorsPerCluster
; // 13
60 unsigned short ReservedSectors
; // 14
61 unsigned char FATCount
; // 16
62 unsigned short RootEntries
, Sectors
; // 17
63 unsigned char Media
; // 21
64 unsigned short FATSectors
, SectorsPerTrack
, Heads
; // 22
65 unsigned long HiddenSectors
, SectorsHuge
; // 28
66 unsigned long FATSectors32
; // 36
67 unsigned short ExtFlag
; // 40
68 unsigned short FSVersion
; // 42
69 unsigned long RootCluster
; // 44
70 unsigned short FSInfoSector
; // 48
71 unsigned short BootBackup
; // 50
72 unsigned char Res3
[12]; // 52
73 unsigned char Drive
; // 64
74 unsigned char Res4
; // 65
75 unsigned char ExtBootSignature
; // 66
76 unsigned long VolumeID
; // 67
77 unsigned char VolumeLabel
[11], SysType
[8]; // 71
78 unsigned char Res2
[420]; // 90
79 unsigned short Signature1
; // 510
82 struct _BootSectorFatX
84 unsigned char SysType
[4]; // 0
85 unsigned long VolumeID
; // 4
86 unsigned long SectorsPerCluster
; // 8
87 unsigned short FATCount
; // 12
88 unsigned long Unknown
; // 14
89 unsigned char Unused
[4078]; // 18
94 unsigned long ExtBootSignature2
; // 0
95 unsigned char Res6
[480]; // 4
96 unsigned long FSINFOSignature
; // 484
97 unsigned long FreeCluster
; // 488
98 unsigned long NextCluster
; // 492
99 unsigned char Res7
[12]; // 496
100 unsigned long Signatur2
; // 508
103 typedef struct _BootSector BootSector
;
109 struct { unsigned char Filename
[8], Ext
[3]; };
110 unsigned char ShortName
[11];
112 unsigned char Attrib
;
114 unsigned char CreationTimeMs
;
115 unsigned short CreationTime
,CreationDate
,AccessDate
;
118 unsigned short FirstClusterHigh
; // FAT32
119 unsigned short ExtendedAttributes
; // FAT12/FAT16
121 unsigned short UpdateTime
; //time create/update
122 unsigned short UpdateDate
; //date create/update
123 unsigned short FirstCluster
;
124 unsigned long FileSize
;
127 #define FAT_EAFILE "EA DATA. SF"
129 typedef struct _EAFileHeader FAT_EA_FILE_HEADER
, *PFAT_EA_FILE_HEADER
;
133 unsigned short Signature
; // ED
134 unsigned short Unknown
[15];
135 unsigned short EASetTable
[240];
138 typedef struct _EASetHeader FAT_EA_SET_HEADER
, *PFAT_EA_SET_HEADER
;
142 unsigned short Signature
; // EA
143 unsigned short Offset
; // relative offset, same value as in the EASetTable
144 unsigned short Unknown1
[2];
145 char TargetFileName
[12];
146 unsigned short Unknown2
[3];
147 unsigned int EALength
;
151 typedef struct _EAHeader FAT_EA_HEADER
, *PFAT_EA_HEADER
;
155 unsigned char Unknown
;
156 unsigned char EANameLength
;
157 unsigned short EAValueLength
;
162 typedef struct _FATDirEntry FAT_DIR_ENTRY
, *PFAT_DIR_ENTRY
;
166 unsigned char FilenameLength
; // 0
167 unsigned char Attrib
; // 1
168 unsigned char Filename
[42]; // 2
169 unsigned long FirstCluster
; // 44
170 unsigned long FileSize
; // 48
171 unsigned short UpdateTime
; // 52
172 unsigned short UpdateDate
; // 54
173 unsigned short CreationTime
; // 56
174 unsigned short CreationDate
; // 58
175 unsigned short AccessTime
; // 60
176 unsigned short AccessDate
; // 62
181 unsigned char id
; // sequence number for slot
182 WCHAR name0_4
[5]; // first 5 characters in name
183 unsigned char attr
; // attribute byte
184 unsigned char reserved
; // always 0
185 unsigned char alias_checksum
; // checksum for 8.3 alias
186 WCHAR name5_10
[6]; // 6 more characters in name
187 unsigned char start
[2]; // starting cluster number
188 WCHAR name11_12
[2]; // last 2 characters in name
191 typedef struct _slot slot
;
195 #define VFAT_CASE_LOWER_BASE 8 // base is lower case
196 #define VFAT_CASE_LOWER_EXT 16 // extension is lower case
198 #define LONGNAME_MAX_LENGTH 256 // max length for a long filename
200 #define ENTRY_DELETED(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ? FATX_ENTRY_DELETED(&((DirEntry)->FatX)) : FAT_ENTRY_DELETED(&((DirEntry)->Fat)))
201 #define ENTRY_VOLUME(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ? FATX_ENTRY_VOLUME(&((DirEntry)->FatX)) : FAT_ENTRY_VOLUME(&((DirEntry)->Fat)))
202 #define ENTRY_END(DeviceExt, DirEntry) (vfatVolumeIsFatX(DeviceExt) ? FATX_ENTRY_END(&((DirEntry)->FatX)) : FAT_ENTRY_END(&((DirEntry)->Fat)))
204 #define FAT_ENTRY_DELETED(DirEntry) ((DirEntry)->Filename[0] == 0xe5)
205 #define FAT_ENTRY_END(DirEntry) ((DirEntry)->Filename[0] == 0)
206 #define FAT_ENTRY_LONG(DirEntry) (((DirEntry)->Attrib & 0x3f) == 0x0f)
207 #define FAT_ENTRY_VOLUME(DirEntry) (((DirEntry)->Attrib & 0x1f) == 0x08)
209 #define FATX_ENTRY_DELETED(DirEntry) ((DirEntry)->FilenameLength == 0xe5)
210 #define FATX_ENTRY_END(DirEntry) ((DirEntry)->FilenameLength == 0xff)
211 #define FATX_ENTRY_LONG(DirEntry) (FALSE)
212 #define FATX_ENTRY_VOLUME(DirEntry) (((DirEntry)->Attrib & 0x1f) == 0x08)
214 #define FAT_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof (FAT_DIR_ENTRY))
215 #define FATX_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof (FATX_DIR_ENTRY))
217 typedef struct _FATXDirEntry FATX_DIR_ENTRY
, *PFATX_DIR_ENTRY
;
225 typedef union _DIR_ENTRY DIR_ENTRY
, *PDIR_ENTRY
;
227 #define BLOCKSIZE 512
235 #define VCB_VOLUME_LOCKED 0x0001
236 #define VCB_DISMOUNT_PENDING 0x0002
237 #define VCB_IS_FATX 0x0004
238 #define VCB_IS_DIRTY 0x4000 /* Volume is dirty */
239 #define VCB_CLEAR_DIRTY 0x8000 /* Clean dirty flag at shutdown */
244 CHAR VolumeLabel
[11];
248 ULONG rootDirectorySectors
;
252 ULONG SectorsPerCluster
;
253 ULONG BytesPerSector
;
254 ULONG BytesPerCluster
;
255 ULONG NumberOfClusters
;
259 } FATINFO
, *PFATINFO
;
262 struct _VFAT_DIRENTRY_CONTEXT
;
263 struct _VFAT_MOVE_CONTEXT
;
265 typedef struct _HASHENTRY
268 struct _VFATFCB
* self
;
269 struct _HASHENTRY
* next
;
273 typedef struct DEVICE_EXTENSION
*PDEVICE_EXTENSION
;
275 typedef NTSTATUS (*PGET_NEXT_CLUSTER
)(PDEVICE_EXTENSION
,ULONG
,PULONG
);
276 typedef NTSTATUS (*PFIND_AND_MARK_AVAILABLE_CLUSTER
)(PDEVICE_EXTENSION
,PULONG
);
277 typedef NTSTATUS (*PWRITE_CLUSTER
)(PDEVICE_EXTENSION
,ULONG
,ULONG
,PULONG
);
279 typedef BOOLEAN (*PIS_DIRECTORY_EMPTY
)(struct _VFATFCB
*);
280 typedef NTSTATUS (*PADD_ENTRY
)(PDEVICE_EXTENSION
,PUNICODE_STRING
,struct _VFATFCB
**,struct _VFATFCB
*,ULONG
,UCHAR
,struct _VFAT_MOVE_CONTEXT
*);
281 typedef NTSTATUS (*PDEL_ENTRY
)(PDEVICE_EXTENSION
,struct _VFATFCB
*,struct _VFAT_MOVE_CONTEXT
*);
282 typedef NTSTATUS (*PGET_NEXT_DIR_ENTRY
)(PVOID
*,PVOID
*,struct _VFATFCB
*,struct _VFAT_DIRENTRY_CONTEXT
*,BOOLEAN
);
284 typedef struct _VFAT_DISPATCH
286 PIS_DIRECTORY_EMPTY IsDirectoryEmpty
;
289 PGET_NEXT_DIR_ENTRY GetNextDirEntry
;
290 } VFAT_DISPATCH
, *PVFAT_DISPATCH
;
292 typedef struct DEVICE_EXTENSION
294 ERESOURCE DirResource
;
295 ERESOURCE FatResource
;
297 KSPIN_LOCK FcbListLock
;
298 LIST_ENTRY FcbListHead
;
300 struct _HASHENTRY
**FcbHashTable
;
302 PDEVICE_OBJECT VolumeDevice
;
303 PDEVICE_OBJECT StorageDevice
;
304 PFILE_OBJECT FATFileObject
;
306 ULONG LastAvailableCluster
;
307 ULONG AvailableClusters
;
308 BOOLEAN AvailableClustersValid
;
310 struct _VFATFCB
*VolumeFcb
;
312 /* Pointers to functions for manipulating FAT. */
313 PGET_NEXT_CLUSTER GetNextCluster
;
314 PFIND_AND_MARK_AVAILABLE_CLUSTER FindAndMarkAvailableCluster
;
315 PWRITE_CLUSTER WriteCluster
;
316 ULONG CleanShutBitMask
;
320 LIST_ENTRY VolumeListEntry
;
323 LIST_ENTRY NotifyList
;
324 PNOTIFY_SYNC NotifySync
;
326 /* Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE */
327 ULONG OpenHandleCount
;
329 /* VPBs for dismount */
333 /* Pointers to functions for manipulating directory entries. */
334 VFAT_DISPATCH Dispatch
;
335 } DEVICE_EXTENSION
, VCB
, *PVCB
;
339 VfatIsDirectoryEmpty(PDEVICE_EXTENSION DeviceExt
,
340 struct _VFATFCB
* Fcb
)
342 return DeviceExt
->Dispatch
.IsDirectoryEmpty(Fcb
);
347 VfatAddEntry(PDEVICE_EXTENSION DeviceExt
,
348 PUNICODE_STRING NameU
,
349 struct _VFATFCB
** Fcb
,
350 struct _VFATFCB
* ParentFcb
,
351 ULONG RequestedOptions
,
353 struct _VFAT_MOVE_CONTEXT
* MoveContext
)
355 return DeviceExt
->Dispatch
.AddEntry(DeviceExt
, NameU
, Fcb
, ParentFcb
, RequestedOptions
, ReqAttr
, MoveContext
);
360 VfatDelEntry(PDEVICE_EXTENSION DeviceExt
,
361 struct _VFATFCB
* Fcb
,
362 struct _VFAT_MOVE_CONTEXT
* MoveContext
)
364 return DeviceExt
->Dispatch
.DelEntry(DeviceExt
, Fcb
, MoveContext
);
369 VfatGetNextDirEntry(PDEVICE_EXTENSION DeviceExt
,
372 struct _VFATFCB
* pDirFcb
,
373 struct _VFAT_DIRENTRY_CONTEXT
* DirContext
,
376 return DeviceExt
->Dispatch
.GetNextDirEntry(pContext
, pPage
, pDirFcb
, DirContext
, First
);
379 #define VFAT_BREAK_ON_CORRUPTION 1
383 PDRIVER_OBJECT DriverObject
;
384 PDEVICE_OBJECT DeviceObject
;
386 ERESOURCE VolumeListLock
;
387 LIST_ENTRY VolumeListHead
;
388 NPAGED_LOOKASIDE_LIST FcbLookasideList
;
389 NPAGED_LOOKASIDE_LIST CcbLookasideList
;
390 NPAGED_LOOKASIDE_LIST IrpContextLookasideList
;
391 FAST_IO_DISPATCH FastIoDispatch
;
392 CACHE_MANAGER_CALLBACKS CacheMgrCallbacks
;
393 } VFAT_GLOBAL_DATA
, *PVFAT_GLOBAL_DATA
;
395 extern PVFAT_GLOBAL_DATA VfatGlobalData
;
397 #define FCB_CACHE_INITIALIZED 0x0001
398 #define FCB_DELETE_PENDING 0x0002
399 #define FCB_IS_FAT 0x0004
400 #define FCB_IS_PAGE_FILE 0x0008
401 #define FCB_IS_VOLUME 0x0010
402 #define FCB_IS_DIRTY 0x0020
404 typedef struct _VFATFCB
406 /* FCB header required by ROS/NT */
407 FSRTL_COMMON_FCB_HEADER RFCB
;
408 SECTION_OBJECT_POINTERS SectionObjectPointers
;
409 ERESOURCE MainResource
;
410 ERESOURCE PagingIoResource
;
411 /* end FCB header required by ROS/NT */
413 /* directory entry for this file or directory */
416 /* Pointer to attributes in entry */
419 /* long file name, points into PathNameBuffer */
420 UNICODE_STRING LongNameU
;
422 /* short file name */
423 UNICODE_STRING ShortNameU
;
425 /* directory name, points into PathNameBuffer */
426 UNICODE_STRING DirNameU
;
428 /* path + long file name 260 max*/
429 UNICODE_STRING PathNameU
;
431 /* buffer for PathNameU */
432 PWCHAR PathNameBuffer
;
434 /* buffer for ShortNameU */
435 WCHAR ShortNameBuffer
[13];
440 /* List of FCB's for this volume */
441 LIST_ENTRY FcbListEntry
;
443 /* List of FCB's for the parent */
444 LIST_ENTRY ParentListEntry
;
446 /* pointer to the parent fcb */
447 struct _VFATFCB
*parentFcb
;
449 /* List for the children */
450 LIST_ENTRY ParentListHead
;
452 /* Flags for the fcb */
455 /* pointer to the file object which has initialized the fcb */
456 PFILE_OBJECT FileObject
;
458 /* Directory index for the short name entry */
461 /* Directory index where the long name starts */
464 /* Share access for the file object */
465 SHARE_ACCESS FCBShareAccess
;
467 /* Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP */
468 ULONG OpenHandleCount
;
470 /* Entry into the hash table for the path + long name */
473 /* Entry into the hash table for the path + short name */
476 /* List of byte-range locks for this file */
480 * Optimization: caching of last read/write cluster+offset pair. Can't
481 * be in VFATCCB because it must be reset everytime the allocated clusters
484 FAST_MUTEX LastMutex
;
487 } VFATFCB
, *PVFATFCB
;
489 typedef struct _VFATCCB
491 LARGE_INTEGER CurrentByteOffset
;
492 /* for DirectoryControl */
494 /* for DirectoryControl */
495 UNICODE_STRING SearchPattern
;
496 } VFATCCB
, *PVFATCCB
;
498 #define TAG_CCB 'BCCV'
499 #define TAG_FCB 'BCFV'
500 #define TAG_IRP 'PRIV'
501 #define TAG_VFAT 'TAFV'
503 #define ENTRIES_PER_SECTOR (BLOCKSIZE / sizeof(FATDirEntry))
505 typedef struct __DOSTIME
513 typedef struct __DOSDATE
521 #define IRPCONTEXT_CANWAIT 0x0001
522 #define IRPCONTEXT_COMPLETE 0x0002
523 #define IRPCONTEXT_QUEUE 0x0004
524 #define IRPCONTEXT_PENDINGRETURNED 0x0008
529 PDEVICE_OBJECT DeviceObject
;
530 PDEVICE_EXTENSION DeviceExt
;
532 WORK_QUEUE_ITEM WorkQueueItem
;
533 PIO_STACK_LOCATION Stack
;
536 PFILE_OBJECT FileObject
;
540 } VFAT_IRP_CONTEXT
, *PVFAT_IRP_CONTEXT
;
542 typedef struct _VFAT_DIRENTRY_CONTEXT
547 UNICODE_STRING LongNameU
;
548 UNICODE_STRING ShortNameU
;
549 } VFAT_DIRENTRY_CONTEXT
, *PVFAT_DIRENTRY_CONTEXT
;
551 typedef struct _VFAT_MOVE_CONTEXT
558 } VFAT_MOVE_CONTEXT
, *PVFAT_MOVE_CONTEXT
;
562 VfatMarkIrpContextForQueue(PVFAT_IRP_CONTEXT IrpContext
)
564 PULONG Flags
= &IrpContext
->Flags
;
566 *Flags
&= ~IRPCONTEXT_COMPLETE
;
567 *Flags
|= IRPCONTEXT_QUEUE
;
569 return STATUS_PENDING
;
574 vfatFCBIsDirectory(PVFATFCB FCB
)
576 return BooleanFlagOn(*FCB
->Attributes
, FILE_ATTRIBUTE_DIRECTORY
);
581 vfatFCBIsReadOnly(PVFATFCB FCB
)
583 return BooleanFlagOn(*FCB
->Attributes
, FILE_ATTRIBUTE_READONLY
);
588 vfatVolumeIsFatX(PDEVICE_EXTENSION DeviceExt
)
590 return BooleanFlagOn(DeviceExt
->Flags
, VCB_IS_FATX
);
597 IN PDEVICE_OBJECT pDeviceObject
,
598 IN PLARGE_INTEGER ReadOffset
,
601 IN BOOLEAN Override
);
605 IN PVFAT_IRP_CONTEXT IrpContext
,
606 IN PLARGE_INTEGER ReadOffset
,
608 IN ULONG BufferOffset
,
612 VfatWriteDiskPartial(
613 IN PVFAT_IRP_CONTEXT IrpContext
,
614 IN PLARGE_INTEGER WriteOffset
,
615 IN ULONG WriteLength
,
616 IN ULONG BufferOffset
,
620 VfatBlockDeviceIoControl(
621 IN PDEVICE_OBJECT DeviceObject
,
623 IN PVOID InputBuffer
,
624 IN ULONG InputBufferSize
,
625 IN OUT PVOID OutputBuffer
,
626 IN OUT PULONG pOutputBufferSize
,
627 IN BOOLEAN Override
);
633 PVFAT_IRP_CONTEXT IrpContext
);
639 PVFAT_IRP_CONTEXT IrpContext
);
643 PDEVICE_EXTENSION DeviceExt
,
644 PFILE_OBJECT FileObject
);
650 PVFAT_IRP_CONTEXT IrpContext
);
654 PDEVICE_EXTENSION DeviceExt
,
656 PUNICODE_STRING FileToFindU
,
657 PVFAT_DIRENTRY_CONTEXT DirContext
,
662 PFAT_DIR_ENTRY pEntry
,
663 PUNICODE_STRING NameU
);
667 PDEVICE_EXTENSION DeviceExt
,
673 VfatDirectoryControl(
674 PVFAT_IRP_CONTEXT IrpContext
);
677 FsdDosDateTimeToSystemTime(
678 PDEVICE_EXTENSION DeviceExt
,
681 PLARGE_INTEGER SystemTime
);
684 FsdSystemTimeToDosDateTime(
685 PDEVICE_EXTENSION DeviceExt
,
686 PLARGE_INTEGER SystemTime
,
693 vfatDirEntryGetFirstCluster(
694 PDEVICE_EXTENSION pDeviceExt
,
695 PDIR_ENTRY pDirEntry
);
706 PDEVICE_EXTENSION DeviceExt
,
713 IN PDEVICE_EXTENSION DeviceExt
,
715 IN PUNICODE_STRING FileName
,
716 IN BOOLEAN CaseChangeOnly
);
720 IN PDEVICE_EXTENSION DeviceExt
,
722 IN PUNICODE_STRING FileName
,
723 IN PVFATFCB ParentFcb
);
728 VfatSetExtendedAttributes(
729 PFILE_OBJECT FileObject
,
736 VfatInitFastIoRoutines(
737 PFAST_IO_DISPATCH FastIoDispatch
);
741 VfatAcquireForLazyWrite(
747 VfatReleaseFromLazyWrite(
752 VfatAcquireForReadAhead(
758 VfatReleaseFromReadAhead(
765 PDEVICE_EXTENSION DeviceExt
,
766 ULONG CurrentCluster
,
770 FAT12FindAndMarkAvailableCluster(
771 PDEVICE_EXTENSION DeviceExt
,
776 PDEVICE_EXTENSION DeviceExt
,
777 ULONG ClusterToWrite
,
783 PDEVICE_EXTENSION DeviceExt
,
784 ULONG CurrentCluster
,
788 FAT16FindAndMarkAvailableCluster(
789 PDEVICE_EXTENSION DeviceExt
,
794 PDEVICE_EXTENSION DeviceExt
,
795 ULONG ClusterToWrite
,
801 PDEVICE_EXTENSION DeviceExt
,
802 ULONG CurrentCluster
,
806 FAT32FindAndMarkAvailableCluster(
807 PDEVICE_EXTENSION DeviceExt
,
812 PDEVICE_EXTENSION DeviceExt
,
813 ULONG ClusterToWrite
,
819 PDEVICE_EXTENSION DeviceExt
,
827 PDEVICE_EXTENSION DeviceExt
,
832 PDEVICE_EXTENSION DeviceExt
,
833 ULONG CurrentCluster
,
837 GetNextClusterExtend(
838 PDEVICE_EXTENSION DeviceExt
,
839 ULONG CurrentCluster
,
843 CountAvailableClusters(
844 PDEVICE_EXTENSION DeviceExt
,
845 PLARGE_INTEGER Clusters
);
849 PDEVICE_EXTENSION DeviceExt
,
850 ULONG ClusterToWrite
,
857 PDEVICE_EXTENSION pVCB
,
858 PUNICODE_STRING pFileNameU
);
861 vfatSetFCBNewDirName(
862 PDEVICE_EXTENSION pVCB
,
868 PDEVICE_EXTENSION pVCB
,
870 PVFAT_DIRENTRY_CONTEXT DirContext
,
883 PDEVICE_EXTENSION pVCB
,
888 PDEVICE_EXTENSION pVCB
,
892 vfatGrabFCBFromTable(
893 PDEVICE_EXTENSION pDeviceExt
,
894 PUNICODE_STRING pFileNameU
);
898 PDEVICE_EXTENSION pVCB
);
902 PDEVICE_EXTENSION pVCB
);
913 vfatAttachFCBToFileObject(
914 PDEVICE_EXTENSION vcb
,
916 PFILE_OBJECT fileObject
);
920 PDEVICE_EXTENSION pVCB
,
922 PUNICODE_STRING FileToFindU
,
927 PDEVICE_EXTENSION pVCB
,
928 PVFATFCB
*pParentFCB
,
930 PUNICODE_STRING pFileNameU
);
933 vfatMakeFCBFromDirEntry(
935 PVFATFCB directoryFCB
,
936 PVFAT_DIRENTRY_CONTEXT DirContext
,
942 VfatGetStandardInformation(
944 PFILE_STANDARD_INFORMATION StandardInfo
,
945 PULONG BufferLength
);
948 VfatGetBasicInformation(
949 PFILE_OBJECT FileObject
,
951 PDEVICE_OBJECT DeviceObject
,
952 PFILE_BASIC_INFORMATION BasicInfo
,
953 PULONG BufferLength
);
956 VfatQueryInformation(
957 PVFAT_IRP_CONTEXT IrpContext
);
961 PVFAT_IRP_CONTEXT IrpContext
);
964 VfatSetAllocationSizeInformation(
965 PFILE_OBJECT FileObject
,
967 PDEVICE_EXTENSION DeviceExt
,
968 PLARGE_INTEGER AllocationSize
);
974 PVFAT_IRP_CONTEXT IrpContext
);
978 PDEVICE_EXTENSION DeviceExt
,
984 VfatFileSystemControl(
985 PVFAT_IRP_CONTEXT IrpContext
);
992 PDRIVER_OBJECT DriverObject
,
993 PUNICODE_STRING RegistryPath
);
1004 PDEVICE_OBJECT DeviceObject
,
1019 VfatCheckForDismount(
1020 IN PDEVICE_EXTENSION DeviceExt
,
1027 PVFAT_IRP_CONTEXT IrpContext
);
1033 PVFAT_IRP_CONTEXT IrpContext
);
1037 PVFAT_IRP_CONTEXT IrpContext
);
1041 PDEVICE_EXTENSION DeviceExt
,
1043 PULONG CurrentCluster
,
1054 PDEVICE_OBJECT DeviceObject
,
1061 PUNICODE_STRING PathNameU
,
1062 PUNICODE_STRING DirNameU
,
1063 PUNICODE_STRING FileNameU
);
1077 VfatQueryVolumeInformation(
1078 PVFAT_IRP_CONTEXT IrpContext
);
1081 VfatSetVolumeInformation(
1082 PVFAT_IRP_CONTEXT IrpContext
);
1084 #endif /* _FASTFAT_PCH_ */