Filter out small devices on OSX
This filters out all devices that have a size less than 128 MB since
that's the smallest realistic SDCard size that I'm aware of. This should
get rid of many of the small devices that you get when installing
software on OSX.
@@ -100,6 +100,10 @@ static void scan_disk_appeared_cb(DADiskRef disk, void *c)
context->devices[ix].size = size;
CFRelease(info);
+ // Filter out small devices (< 128M) since those are mounted .dmg files
+ if (size < 128000000)
+ return;
+
context->count++;
}
}
