Non-"browsable" volumes or those without filesystem mount points are invisible to users and should not be reflected automatically into Wine.
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..e744e87dcf0 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 (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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index e744e87dcf0..e9ece5af2a0 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -91,7 +91,10 @@ 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 (CFURLCopyResourcePropertyForKey(volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL)) {
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=145491
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/mountmgr.sys/diskarb.c:91 Task: Patch failed to apply
=== 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