939{
944
945 TRACE(
"Enter NtfsMount(%lu)\n", DeviceId);
946
947
948
949
954
955
956
957
961 {
964 }
967 {
970 }
971
972
973
974
976 {
979 }
980
981
982
983
984 Volume->ClusterSize =
Volume->BootSector.SectorsPerCluster *
Volume->BootSector.BytesPerSector;
985 if (
Volume->BootSector.ClustersPerMftRecord > 0)
986 Volume->MftRecordSize =
Volume->BootSector.ClustersPerMftRecord *
Volume->ClusterSize;
987 else
988 Volume->MftRecordSize = 1 << (-
Volume->BootSector.ClustersPerMftRecord);
989 if (
Volume->BootSector.ClustersPerIndexRecord > 0)
990 Volume->IndexRecordSize =
Volume->BootSector.ClustersPerIndexRecord *
Volume->ClusterSize;
991 else
992 Volume->IndexRecordSize = 1 << (-
Volume->BootSector.ClustersPerIndexRecord);
993
995 TRACE(
"ClustersPerMftRecord: %d\n",
Volume->BootSector.ClustersPerMftRecord);
996 TRACE(
"ClustersPerIndexRecord: %d\n",
Volume->BootSector.ClustersPerIndexRecord);
997 TRACE(
"MftRecordSize: 0x%x\n",
Volume->MftRecordSize);
998 TRACE(
"IndexRecordSize: 0x%x\n",
Volume->IndexRecordSize);
999
1000
1001
1002
1003 TRACE(
"Reading MFT index...\n");
1005 if (!
Volume->MasterFileTable)
1006 {
1009 }
1013 {
1018 }
1021 {
1026 }
1027
1028
1029
1030
1032 if (!
Volume->TemporarySector)
1033 {
1038 }
1039
1040
1041
1042
1043 Volume->DeviceId = DeviceId;
1044
1045
1046
1047
1048 TRACE(
"Searching for DATA attribute...\n");
1051 {
1056 }
1057
1058
1059
1060
1062
1063
1064
1065
1066 TRACE(
"NtfsMount(%lu) success\n", DeviceId);
1068}
#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)
VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
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)