407{
412 ULONG RequestedDisposition, RequestedOptions;
424
425
427 RequestedDisposition = ((
Stack->Parameters.Create.Options >> 24) & 0xff);
431
434
436 {
438 }
439
440
443 {
445 }
446
449 {
451 }
452
453
455 {
457 }
458
459
463 FileObject->RelatedFileObject->FsContext == DeviceExt->VolumeFcb))
464 {
465 DPRINT(
"Volume opening\n");
466
469 {
471 }
472
475 {
477 }
478
479 if (OpenTargetDir)
480 {
482 }
483
485 {
487 }
488
490
491 pFcb = DeviceExt->VolumeFcb;
492
494 {
496 Stack->Parameters.Create.ShareAccess,
499 }
500 else
501 {
503 Stack->Parameters.Create.ShareAccess,
508 {
511 }
512 }
513
515 DeviceExt->OpenHandleCount++;
518
521 }
522
524 FileObject->RelatedFileObject->FsContext == DeviceExt->VolumeFcb)
525 {
528 }
529
530
534
537 {
538 if (*
c ==
L'\\' ||
c == PathNameU.
Buffer)
539 {
540 if (Dots &&
last >
c)
541 {
543 }
544 if (*
c ==
L'\\' && (
c - 1) > PathNameU.
Buffer &&
546 {
548 }
549
552 }
554 {
556 }
557
559 {
561 }
562 }
563
564
567 {
569 }
570
572 {
574 }
575
576 TrailingBackslash =
FALSE;
578 {
580 TrailingBackslash =
TRUE;
581 }
582
584 {
586 }
587
588
589 if (!OpenTargetDir)
590 {
592
594 }
595 else
596 {
599
601
604 {
606 }
607
610 {
613 }
614 else
615 {
617 }
618
620
621
623 {
626 }
627
628
630 {
632 }
633
635 {
636
638
639
640
644#if 0
645
649
650
653#endif
654 }
655 else
656 {
657
658
659
661
662
663 }
664
665
667 {
669 }
670
672 {
675
677 {
679 Stack->Parameters.Create.ShareAccess,
682 }
683 else
684 {
686 Stack->Parameters.Create.ShareAccess,
691 {
695 }
696 }
697
700 {
702 }
703
705 DeviceExt->OpenHandleCount++;
706 }
708 {
710 }
711
713 {
715 }
716 else
717 {
719 }
720
722 }
723
724
725
726
727
733 {
735 {
737 }
740 }
741
743 {
744 DPRINT1(
"VfatOpenFile failed for '%wZ', status %x\n", &PathNameU,
Status);
747 }
748
754
755
757 {
762 {
764 {
765 if (TrailingBackslash)
766 {
770 }
772 }
774
776 {
780 }
785 {
788 {
792 }
793
796 pFcb,
797 DeviceExt,
798 &
Irp->Overlay.AllocationSize);
800 Irp->AssociatedIrp.SystemBuffer,
801 Stack->Parameters.Create.EaLength);
802
803 if (PagingFileCreate)
804 {
807 }
808 }
809 else
810 {
813 }
814 }
815 else
816 {
820 }
821 }
822 else
823 {
825 {
827 }
828
830
831
833 {
836 {
839 }
843 }
844
846 {
848 Stack->Parameters.Create.ShareAccess,
853 {
857 }
858 }
859
860
861
862
865 {
869 }
872 {
876 }
878 {
882 }
883#ifndef USE_ROS_CC_AND_FS
885 {
890 {
892 {
900 }
901 }
902 }
903#endif
904 if (PagingFileCreate)
905 {
906
907
908
909
910
911
912
913
915 {
917 {
921 }
922 }
923 else
924 {
927 }
928 }
929 else
930 {
932 {
936 }
937 }
938
942 {
945 {
949 }
950
952 {
954
956 {
958 }
959 else
960 {
962 }
964
967 {
971 }
972 else
973 {
977 }
978
980 }
981
984 pFcb,
985 DeviceExt,
986 &
Irp->Overlay.AllocationSize);
989 {
993 }
994 }
995
997 {
999 }
1002 {
1004 }
1005 else
1006 {
1008 }
1009 }
1010
1012 {
1014 Stack->Parameters.Create.ShareAccess,
1017 }
1018 else
1019 {
1022 }
1023
1026 {
1028 }
1029
1031 {
1033 pFcb,
1037 }
1040 {
1042 pFcb,
1045 }
1046
1048 DeviceExt->OpenHandleCount++;
1049
1050
1051
1052
1055 {
1057 }
1058 else
1059 {
1061 }
1062
1064}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
#define FILE_DELETE_ON_CLOSE
NTSTATUS VfatUpdateEntry(IN PDEVICE_EXTENSION DeviceExt, IN PVFATFCB pFcb)
NTSTATUS VfatCloseFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject)
static NTSTATUS VfatOpenFile(PDEVICE_EXTENSION DeviceExt, PUNICODE_STRING PathNameU, PFILE_OBJECT FileObject, ULONG RequestedDisposition, ULONG RequestedOptions, PVFATFCB *ParentFcb)
BOOLEAN FsdSystemTimeToDosDateTime(PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER SystemTime, PUSHORT pDosDate, PUSHORT pDosTime)
NTSTATUS VfatSetExtendedAttributes(PFILE_OBJECT FileObject, PVOID Ea, ULONG EaLength)
BOOLEAN vfatIsLongIllegal(WCHAR c)
BOOLEAN IsDotOrDotDot(PCUNICODE_STRING Name)
#define KeQuerySystemTime(t)
#define VCB_VOLUME_LOCKED
#define CCB_DELETE_ON_CLOSE
#define FILE_OPEN_BY_FILE_ID
#define FILE_OVERWRITE_IF
#define FILE_DOES_NOT_EXIST
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_VALID_OPTION_FLAGS
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
VOID NTAPI IoSetShareAccess(IN ACCESS_MASK DesiredAccess, IN ULONG DesiredShareAccess, IN PFILE_OBJECT FileObject, OUT PSHARE_ACCESS ShareAccess)
NTSTATUS NTAPI IoCheckShareAccess(IN ACCESS_MASK DesiredAccess, IN ULONG DesiredShareAccess, IN PFILE_OBJECT FileObject, IN PSHARE_ACCESS ShareAccess, IN BOOLEAN Update)
VOID NTAPI IoUpdateShareAccess(IN PFILE_OBJECT FileObject, OUT PSHARE_ACCESS ShareAccess)
#define STATUS_DELETE_PENDING
#define STATUS_NOT_IMPLEMENTED
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
#define STATUS_CANNOT_DELETE
unsigned short UpdateDate
unsigned short UpdateTime
unsigned short UpdateDate
unsigned short UpdateTime
SHARE_ACCESS FCBShareAccess
SECTION_OBJECT_POINTERS SectionObjectPointers
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_FILE_IS_A_DIRECTORY
#define STATUS_NOT_A_DIRECTORY
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_SHARING_VIOLATION
#define STATUS_OBJECT_NAME_INVALID
#define vfatAddToStat(Vcb, Stat, Inc)
#define VCB_IS_SYS_OR_HAS_PAGE
FORCEINLINE NTSTATUS VfatAddEntry(PDEVICE_EXTENSION DeviceExt, PUNICODE_STRING NameU, struct _VFATFCB **Fcb, struct _VFATFCB *ParentFcb, ULONG RequestedOptions, UCHAR ReqAttr, struct _VFAT_MOVE_CONTEXT *MoveContext)
FORCEINLINE BOOLEAN vfatFCBIsDirectory(PVFATFCB FCB)
FORCEINLINE VOID vfatReportChange(IN PDEVICE_EXTENSION DeviceExt, IN PVFATFCB Fcb, IN ULONG FilterMatch, IN ULONG Action)
VOID vfatSplitPathName(PUNICODE_STRING PathNameU, PUNICODE_STRING DirNameU, PUNICODE_STRING FileNameU)
NTSTATUS vfatAttachFCBToFileObject(PDEVICE_EXTENSION vcb, PVFATFCB fcb, PFILE_OBJECT fileObject)
NTSTATUS vfatGetFCBForFile(PDEVICE_EXTENSION pVCB, PVFATFCB *pParentFCB, PVFATFCB *pFCB, PUNICODE_STRING pFileNameU)
VOID vfatGrabFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
NTSTATUS VfatSetAllocationSizeInformation(PFILE_OBJECT FileObject, PVFATFCB Fcb, PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER AllocationSize)
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
#define SL_OPEN_PAGING_FILE
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define FILE_NOTIFY_CHANGE_FILE_NAME
#define FILE_NOTIFY_CHANGE_LAST_WRITE
#define SL_OPEN_TARGET_DIRECTORY
#define FILE_ACTION_ADDED
#define FILE_NOTIFY_CHANGE_DIR_NAME