[FREELDR] Improve some *GetFileInformation() traces.

This commit is contained in:
Hermès Bélusca-Maïto 2019-07-30 00:57:22 +02:00
parent ef76709b3d
commit b382145539
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
9 changed files with 22 additions and 29 deletions

View file

@ -64,7 +64,7 @@ DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.QuadPart = Context->SectorCount * Context->SectorSize;
Information->CurrentAddress.QuadPart = Context->SectorNumber * Context->SectorSize;

View file

@ -34,7 +34,7 @@ static ARC_STATUS RamDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Infor
//
// Give current seek offset and ram disk size to caller
//
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.LowPart = gRamDiskSize;
Information->CurrentAddress.LowPart = gRamDiskOffset;

View file

@ -179,7 +179,7 @@ static ARC_STATUS DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Informat
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.QuadPart = Context->SectorCount * Context->SectorSize;
Information->CurrentAddress.QuadPart = Context->SectorNumber * Context->SectorSize;

View file

@ -1123,16 +1123,12 @@ ARC_STATUS BtrFsGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
{
pbtrfs_file_info phandle = FsGetDeviceSpecific(FileId);
TRACE("BtrFsGetFileInformation %lu\n", FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.QuadPart = phandle->inode.size;
Information->CurrentAddress.QuadPart = phandle->position;
TRACE("BtrFsGetFileInformation() FileSize = %llu\n",
Information->EndingAddress.QuadPart);
TRACE("BtrFsGetFileInformation() FilePointer = %llu\n",
Information->CurrentAddress.QuadPart);
TRACE("BtrFsGetFileInformation(%lu) -> FileSize = %llu, FilePointer = 0x%llx\n",
FileId, Information->EndingAddress.QuadPart, Information->CurrentAddress.QuadPart);
return ESUCCESS;
}

View file

@ -1207,14 +1207,12 @@ ARC_STATUS Ext2GetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.QuadPart = FileHandle->FileSize;
Information->CurrentAddress.QuadPart = FileHandle->FilePointer;
TRACE("Ext2GetFileInformation() FileSize = %d\n",
Information->EndingAddress.LowPart);
TRACE("Ext2GetFileInformation() FilePointer = %d\n",
Information->CurrentAddress.LowPart);
TRACE("Ext2GetFileInformation(%lu) -> FileSize = %llu, FilePointer = 0x%llx\n",
FileId, Information->EndingAddress.QuadPart, Information->CurrentAddress.QuadPart);
return ESUCCESS;
}

View file

@ -1411,14 +1411,12 @@ ARC_STATUS FatGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PFAT_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.LowPart = FileHandle->FileSize;
Information->CurrentAddress.LowPart = FileHandle->FilePointer;
TRACE("FatGetFileInformation() FileSize = %d\n",
Information->EndingAddress.LowPart);
TRACE("FatGetFileInformation() FilePointer = %d\n",
Information->CurrentAddress.LowPart);
TRACE("FatGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
FileId, Information->EndingAddress.LowPart, Information->CurrentAddress.LowPart);
return ESUCCESS;
}

View file

@ -253,13 +253,13 @@ ARC_STATUS IsoGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PISO_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
TRACE("IsoGetFileInformation() FileSize = %d\n", FileHandle->FileSize);
TRACE("IsoGetFileInformation() FilePointer = %d\n", FileHandle->FilePointer);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
RtlZeroMemory(Information, sizeof(*Information));
Information->EndingAddress.LowPart = FileHandle->FileSize;
Information->CurrentAddress.LowPart = FileHandle->FilePointer;
TRACE("IsoGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
FileId, Information->EndingAddress.LowPart, Information->CurrentAddress.LowPart);
return ESUCCESS;
}

View file

@ -766,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;
}

View file

@ -145,6 +145,9 @@ static ARC_STATUS PxeGetFileInformation(ULONG FileId, FILEINFORMATION* Informati
Information->EndingAddress.LowPart = _FileSize;
Information->CurrentAddress.LowPart = _FilePosition;
TRACE("PxeGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
FileId, Information->EndingAddress.LowPart, Information->CurrentAddress.LowPart);
return ESUCCESS;
}