summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-30 16:55:46 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-30 16:55:46 +0200
commit4f79cf7c21eb11676d7c75f861f6da37a396ac51 (patch)
tree97ad68974ee11c938aa02f062c6b0a08b20990fe /src/lib
parent2a3ba951af6da9f3e9770e971ceb07025090cef1 (diff)
Add some more macOS debug logging for disks, and ignore mounted disk images.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cross_osx.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc
index 3b08c9684..a15ad0322 100644
--- a/src/lib/cross_osx.cc
+++ b/src/lib/cross_osx.cc
@@ -298,10 +298,19 @@ analyse_media_path (CFDictionaryRef& description)
void const* str = CFDictionaryGetValue (description, kDADiskDescriptionMediaPathKey);
if (!str) {
+ LOG_DISK_NC("There is no MediaPathKey");
return optional<MediaPath>();
}
string path(CFStringGetCStringPtr((CFStringRef) str, kCFStringEncodingUTF8));
+ LOG_DISK("MediaPathKey is %1", path);
+
+ if (path.find("/IOHDIXController") != string::npos) {
+ /* This is a disk image, so we completely ignore it */
+ LOG_DISK_NC("Ignoring this as it seems to be a disk image");
+ return optional<MediaPath>();
+ }
+
MediaPath mp;
if (starts_with(path, "IODeviceTree:")) {
mp.real = true;