From: Conor McCarthy cmccarthy@codeweavers.com
--- dlls/ntdll/tests/file.c | 2 +- dlls/ntdll/unix/file.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index f30c0a22341..cc0afdbdb64 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1392,7 +1392,7 @@ static void test_file_full_size_information(void)
if (res == STATUS_NOT_IMPLEMENTED || res == STATUS_INVALID_PARAMETER) { - skip( "FileFsFullSizeInformationEx not supported.\n" ); + win_skip( "FileFsFullSizeInformationEx not supported.\n" ); CloseHandle( h ); return; } diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 8bc69557057..913ed5f32bc 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -2122,6 +2122,31 @@ static NTSTATUS get_full_size_info(int fd, FILE_FS_FULL_SIZE_INFORMATION *info) return STATUS_SUCCESS; }
+static NTSTATUS get_full_size_info_ex(int fd, FILE_FS_FULL_SIZE_INFORMATION_EX *info) +{ + FILE_FS_FULL_SIZE_INFORMATION full_info; + NTSTATUS status; + + if ((status = get_full_size_info(fd, &full_info)) != STATUS_SUCCESS) + return status; + + info->ActualTotalAllocationUnits = full_info.TotalAllocationUnits.QuadPart; + info->ActualAvailableAllocationUnits = full_info.ActualAvailableAllocationUnits.QuadPart; + info->ActualPoolUnavailableAllocationUnits = 0; + info->CallerAvailableAllocationUnits = full_info.CallerAvailableAllocationUnits.QuadPart; + info->CallerPoolUnavailableAllocationUnits = 0; + info->UsedAllocationUnits = info->ActualTotalAllocationUnits - info->ActualAvailableAllocationUnits; + info->CallerTotalAllocationUnits = info->CallerAvailableAllocationUnits + info->UsedAllocationUnits; + info->TotalReservedAllocationUnits = 0; + info->VolumeStorageReserveAllocationUnits = 0; + info->AvailableCommittedAllocationUnits = 0; + info->PoolAvailableAllocationUnits = 0; + info->SectorsPerAllocationUnit = full_info.SectorsPerAllocationUnit; + info->BytesPerSector = full_info.BytesPerSector; + + return STATUS_SUCCESS; +} +
static NTSTATUS server_get_file_info( HANDLE handle, IO_STATUS_BLOCK *io, void *buffer, ULONG length, FILE_INFORMATION_CLASS info_class ) @@ -7037,6 +7062,17 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io } break;
+ case FileFsFullSizeInformationEx: + if (length < sizeof(FILE_FS_FULL_SIZE_INFORMATION_EX)) + status = STATUS_BUFFER_TOO_SMALL; + else + { + FILE_FS_FULL_SIZE_INFORMATION_EX *info = buffer; + if ((status = get_full_size_info_ex(fd, info)) == STATUS_SUCCESS) + io->Information = sizeof(*info); + } + break; + case FileFsObjectIdInformation: FIXME( "%p: object id info not supported\n", handle ); status = STATUS_NOT_IMPLEMENTED;