Non-"browsable" volumes or those without filesystem mount points are invisible to users and should not be reflected automatically into Wine.
-- v2: mountmgr.sys: Do not add drive letters or volumes for macOS volumes without mount paths. mountmgr.sys: Do not create drive letters or volumes for unbrowsable macOS volumes.
From: Tim Clem tclem@codeweavers.com
Volumes with kCFURLVolumeIsBrowsableKey set to false are invisible to users. These are generally system volumes or temporary ones (like Chrome update disk images) that we should ignore. --- dlls/mountmgr.sys/diskarb.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index 4817cfc61d6..63986c3df93 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -65,6 +65,7 @@ static void appeared_callback( DADiskRef disk, void *context ) CFDictionaryRef dict = DADiskCopyDescription( disk ); const void *ref; char device[64]; + CFURLRef volume_url; char mount_point[PATH_MAX]; size_t model_len = 0; GUID guid, *guid_ptr = NULL; @@ -87,11 +88,23 @@ static void appeared_callback( DADiskRef disk, void *context ) strcpy( device, "/dev/r" ); CFStringGetCString( ref, device + 6, sizeof(device) - 6, kCFStringEncodingASCII );
- if ((ref = CFDictionaryGetValue( dict, CFSTR("DAVolumePath") ))) - CFURLGetFileSystemRepresentation( ref, true, (UInt8 *)mount_point, sizeof(mount_point) ); + if ((volume_url = CFDictionaryGetValue( dict, CFSTR("DAVolumePath") ))) + CFURLGetFileSystemRepresentation( volume_url, true, (UInt8 *)mount_point, sizeof(mount_point) ); else mount_point[0] = 0;
+ if (volume_url && CFURLCopyResourcePropertyForKey( volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL )) + { + Boolean is_browsable = CFBooleanGetValue( ref ); + CFRelease( ref ); + + if (!is_browsable) + { + TRACE( "ignoring volume %s, uuid %s: not browsable\n", device, wine_dbgstr_guid(guid_ptr) ); + goto done; + } + } + if ((ref = CFDictionaryGetValue( dict, CFSTR("DAMediaKind") ))) { if (!CFStringCompare( ref, CFSTR("IOCDMedia"), 0 ))
From: Tim Clem tclem@codeweavers.com
Mounted volumes that are not represented in the filesystem are system volumes that we should ignore (e.g. recovery and preboot). --- dlls/mountmgr.sys/diskarb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index 63986c3df93..d33f6c60afb 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -91,9 +91,12 @@ static void appeared_callback( DADiskRef disk, void *context ) if ((volume_url = CFDictionaryGetValue( dict, CFSTR("DAVolumePath") ))) CFURLGetFileSystemRepresentation( volume_url, true, (UInt8 *)mount_point, sizeof(mount_point) ); else - mount_point[0] = 0; + { + TRACE( "ignoring volume %s, uuid %s: no macOS volume path\n", device, wine_dbgstr_guid(guid_ptr) ); + goto done; + }
- if (volume_url && CFURLCopyResourcePropertyForKey( volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL )) + if (CFURLCopyResourcePropertyForKey( volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL )) { Boolean is_browsable = CFBooleanGetValue( ref ); CFRelease( ref );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145548
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: dlls/mountmgr.sys/diskarb.c:91 Task: Patch failed to apply
=== debian11b (build log) ===
error: patch failed: dlls/mountmgr.sys/diskarb.c:91 Task: Patch failed to apply
This merge request was approved by Brendan Shanks.