[FREELDR] Diverse enhancements.
[reactos.git] / boot / freeldr / freeldr / lib / fs / ntfs.c
index 8aa5ea4..e68e404 100644 (file)
@@ -320,9 +320,6 @@ static ULONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT Cont
             }
             else
                 DataRunStartLCN = -1;
-
-            if (*DataRun == 0)
-                return AlreadyRead;
         }
 
         while (Length > 0)
@@ -769,14 +766,12 @@ ARC_STATUS NtfsGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
 {
     PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
 
-    RtlZeroMemory(Information, sizeof(FILEINFORMATION));
+    RtlZeroMemory(Information, sizeof(*Information));
     Information->EndingAddress.QuadPart = NtfsGetAttributeSize(&FileHandle->DataContext->Record);
     Information->CurrentAddress.QuadPart = FileHandle->Offset;
 
-    TRACE("NtfsGetFileInformation() FileSize = %d\n",
-        Information->EndingAddress.LowPart);
-    TRACE("NtfsGetFileInformation() FilePointer = %d\n",
-        Information->CurrentAddress.LowPart);
+    TRACE("NtfsGetFileInformation(%lu) -> FileSize = %llu, FilePointer = 0x%llx\n",
+          FileId, Information->EndingAddress.QuadPart, Information->CurrentAddress.QuadPart);
 
     return ESUCCESS;
 }
@@ -882,6 +877,8 @@ const DEVVTBL* NtfsMount(ULONG DeviceId)
     ULONG Count;
     ARC_STATUS Status;
 
+    TRACE("Enter NtfsMount(%lu)\n", DeviceId);
+
     //
     // Allocate data for volume information
     //
@@ -893,8 +890,7 @@ const DEVVTBL* NtfsMount(ULONG DeviceId)
     //
     // Read the BootSector
     //
-    Position.HighPart = 0;
-    Position.LowPart = 0;
+    Position.QuadPart = 0;
     Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
     if (Status != ESUCCESS)
     {
@@ -1002,6 +998,7 @@ const DEVVTBL* NtfsMount(ULONG DeviceId)
     //
     // Return success
     //
+    TRACE("NtfsMount(%lu) success\n", DeviceId);
     return &NtfsFuncTable;
 }