1066{
1071
1072 TRACE(
"Enter NtfsMount(%lu)\n", DeviceId);
1073
1074
1075
1076
1081
1082
1083
1084
1088 {
1091 }
1094 {
1097 }
1098
1099
1100
1101
1103 {
1106 }
1107
1108
1109
1110
1111 Volume->ClusterSize =
Volume->BootSector.SectorsPerCluster *
Volume->BootSector.BytesPerSector;
1112 if (
Volume->BootSector.ClustersPerMftRecord > 0)
1113 Volume->MftRecordSize =
Volume->BootSector.ClustersPerMftRecord *
Volume->ClusterSize;
1114 else
1115 Volume->MftRecordSize = 1 << (-
Volume->BootSector.ClustersPerMftRecord);
1116 if (
Volume->BootSector.ClustersPerIndexRecord > 0)
1117 Volume->IndexRecordSize =
Volume->BootSector.ClustersPerIndexRecord *
Volume->ClusterSize;
1118 else
1119 Volume->IndexRecordSize = 1 << (-
Volume->BootSector.ClustersPerIndexRecord);
1120
1121 TRACE(
"ClusterSize: 0x%x\n",
Volume->ClusterSize);
1122 TRACE(
"ClustersPerMftRecord: %d\n",
Volume->BootSector.ClustersPerMftRecord);
1123 TRACE(
"ClustersPerIndexRecord: %d\n",
Volume->BootSector.ClustersPerIndexRecord);
1124 TRACE(
"MftRecordSize: 0x%x\n",
Volume->MftRecordSize);
1125 TRACE(
"IndexRecordSize: 0x%x\n",
Volume->IndexRecordSize);
1126
1127
1128
1129
1130 TRACE(
"Reading MFT index...\n");
1132 if (!
Volume->MasterFileTable)
1133 {
1136 }
1140 {
1145 }
1148 {
1153 }
1154
1155
1156
1157
1159 if (!
Volume->TemporarySector)
1160 {
1165 }
1166
1167
1168
1169
1170 Volume->DeviceId = DeviceId;
1171
1172
1173
1174
1175 TRACE(
"Searching for DATA attribute...\n");
1178 {
1183 }
1184
1185
1186
1187
1189
1190
1191
1192
1193 TRACE(
"NtfsMount(%lu) success\n", DeviceId);
1195}
#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, ULONGLONG MftIndex, ULONG Type, const WCHAR *Name)
#define RtlEqualMemory(dst, src, len)
#define RtlZeroMemory(Destination, Length)