mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 23:20:56 +00:00
ntdll: Hardcode the filesystem cluster size to avoid trouble on NFS.
This commit is contained in:
parent
5c2fd1b192
commit
b0192cfed3
@ -2244,6 +2244,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
|
||||
}
|
||||
else
|
||||
{
|
||||
ULONGLONG bsize;
|
||||
/* Linux's fstatvfs is buggy */
|
||||
#if !defined(linux) || !defined(HAVE_FSTATFS)
|
||||
struct statvfs stfs;
|
||||
@ -2253,7 +2254,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
|
||||
io->u.Status = FILE_GetNtStatus();
|
||||
break;
|
||||
}
|
||||
info->BytesPerSector = stfs.f_frsize;
|
||||
bsize = stfs.f_frsize;
|
||||
#else
|
||||
struct statfs stfs;
|
||||
if (fstatfs( fd, &stfs ) < 0)
|
||||
@ -2261,11 +2262,12 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
|
||||
io->u.Status = FILE_GetNtStatus();
|
||||
break;
|
||||
}
|
||||
info->BytesPerSector = stfs.f_bsize;
|
||||
bsize = stfs.f_bsize;
|
||||
#endif
|
||||
info->TotalAllocationUnits.QuadPart = stfs.f_blocks;
|
||||
info->AvailableAllocationUnits.QuadPart = stfs.f_bavail;
|
||||
info->SectorsPerAllocationUnit = 1;
|
||||
info->BytesPerSector = 512;
|
||||
info->SectorsPerAllocationUnit = 8;
|
||||
info->TotalAllocationUnits.QuadPart = bsize * stfs.f_blocks / (512 * 8);
|
||||
info->AvailableAllocationUnits.QuadPart = bsize * stfs.f_bavail / (512 * 8);
|
||||
io->Information = sizeof(*info);
|
||||
io->u.Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user