Paul Gofman : kernel32: Output a message in GetVolumeInformationW() when device has no read access.

Alexandre Julliard julliard at winehq.org
Thu Nov 7 16:16:05 CST 2019


Module: wine
Branch: master
Commit: 4907f2626c56d42f6e8c98832e4f801e06ba3c2d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4907f2626c56d42f6e8c98832e4f801e06ba3c2d

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Thu Nov  7 13:44:35 2019 +0300

kernel32: Output a message in GetVolumeInformationW() when device has no read access.

A lot of applications fail to install from CDs or mounted ISO images when Wine does
not return correct volume label from GetVolumeInformation() repeatedly asking to
insert correct disk. Most of the time it happens because the block device is read only
for user (which is typical default behaviour) and FS info cannot be read.
It looks like the hint about what went wrong will simplify things in this common case.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/volume.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c
index 2c8a668b73..02d14cdcc9 100644
--- a/dlls/kernel32/volume.c
+++ b/dlls/kernel32/volume.c
@@ -772,8 +772,12 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len,
         CloseHandle( handle );
         goto fill_fs_info;
     }
-    else TRACE( "cannot open device %s: %x\n", debugstr_w(nt_name.Buffer), status );
-
+    else
+    {
+        TRACE( "cannot open device %s: %x\n", debugstr_w(nt_name.Buffer), status );
+        if (status == STATUS_ACCESS_DENIED)
+            MESSAGE( "wine: Read access denied for device %s, FS volume label and serial are not available.\n", debugstr_w(nt_name.Buffer) );
+    }
     /* we couldn't open the device, fallback to default strategy */
 
     if (!set_ntstatus( NtOpenFile( &handle, SYNCHRONIZE, &attr, &io, 0,




More information about the wine-cvs mailing list