882{
887
888 TRACE(
"Enter NtfsMount(%lu)\n", DeviceId);
889
890
891
892
897
898
899
900
904 {
907 }
910 {
913 }
914
915
916
917
919 {
922 }
923
924
925
926
927 Volume->ClusterSize =
Volume->BootSector.SectorsPerCluster *
Volume->BootSector.BytesPerSector;
928 if (
Volume->BootSector.ClustersPerMftRecord > 0)
929 Volume->MftRecordSize =
Volume->BootSector.ClustersPerMftRecord *
Volume->ClusterSize;
930 else
931 Volume->MftRecordSize = 1 << (-
Volume->BootSector.ClustersPerMftRecord);
932 if (
Volume->BootSector.ClustersPerIndexRecord > 0)
933 Volume->IndexRecordSize =
Volume->BootSector.ClustersPerIndexRecord *
Volume->ClusterSize;
934 else
935 Volume->IndexRecordSize = 1 << (-
Volume->BootSector.ClustersPerIndexRecord);
936
938 TRACE(
"ClustersPerMftRecord: %d\n",
Volume->BootSector.ClustersPerMftRecord);
939 TRACE(
"ClustersPerIndexRecord: %d\n",
Volume->BootSector.ClustersPerIndexRecord);
940 TRACE(
"MftRecordSize: 0x%x\n",
Volume->MftRecordSize);
941 TRACE(
"IndexRecordSize: 0x%x\n",
Volume->IndexRecordSize);
942
943
944
945
946 TRACE(
"Reading MFT index...\n");
948 if (!
Volume->MasterFileTable)
949 {
952 }
956 {
961 }
964 {
969 }
970
971
972
973
975 if (!
Volume->TemporarySector)
976 {
981 }
982
983
984
985
986 Volume->DeviceId = DeviceId;
987
988
989
990
991 TRACE(
"Searching for DATA attribute...\n");
994 {
999 }
1000
1001
1002
1003
1005
1006
1007
1008
1009 TRACE(
"NtfsMount(%lu) success\n", DeviceId);
1011}
#define NTFS_ATTR_TYPE_DATA
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
VOID FileSystemError(PCSTR ErrorString)
ARC_STATUS ArcRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
FORCEINLINE PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
PNTFS_VOLUME_INFO NtfsVolumes[MAX_FDS]
const DEVVTBL NtfsFuncTable
static PNTFS_ATTR_CONTEXT NtfsFindAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_MFT_RECORD MftRecord, ULONG Type, const WCHAR *Name)
#define RtlEqualMemory(dst, src, len)
#define RtlZeroMemory(Destination, Length)