[pkg-wine-party] [SCM] Debian Wine packaging branch, lenny, updated. wine-1.0.0-1-126-gccc5cbd

Alexandre Julliard julliard at winehq.org
Thu Oct 30 14:44:11 UTC 2008


The following commit has been merged in the lenny branch:
commit bc58d24e9d5200a6569114b8061ee37fcd56fca5
Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct 6 17:52:23 2008 +0200

    ntdll: Preserve the 2K block size returned for CDROMs.
    (cherry picked from commit 4d958a1cb3f79f5e6fe643542385840b497ff867)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 3c7fac5..2387fd8 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2241,10 +2241,18 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
                 }
                 bsize = stfs.f_bsize;
 #endif
-                info->BytesPerSector = 512;
-                info->SectorsPerAllocationUnit = 8;
-                info->TotalAllocationUnits.QuadPart = bsize * stfs.f_blocks / (512 * 8);
-                info->AvailableAllocationUnits.QuadPart = bsize * stfs.f_bavail / (512 * 8);
+                if (bsize == 2048)  /* assume CD-ROM */
+                {
+                    info->BytesPerSector = 2048;
+                    info->SectorsPerAllocationUnit = 1;
+                }
+                else
+                {
+                    info->BytesPerSector = 512;
+                    info->SectorsPerAllocationUnit = 8;
+                }
+                info->TotalAllocationUnits.QuadPart = bsize * stfs.f_blocks / (info->BytesPerSector * info->SectorsPerAllocationUnit);
+                info->AvailableAllocationUnits.QuadPart = bsize * stfs.f_bavail / (info->BytesPerSector * info->SectorsPerAllocationUnit);
                 io->Information = sizeof(*info);
                 io->u.Status = STATUS_SUCCESS;
             }

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list