I am developing an application that uses disk arbitration to find out which devices are connected to a machine and react to connect/disconnect events and that has been working well for years. Just recently I discovered that something does not work as expected when working with external thunderbolt drives and I debugged this to find that the volume's ejectable property (kDADiskDescriptionMediaEjectableKey in Disk Arbitration which maps to kIOMediaEjectableKey i IOKit) is set to false. However, the drive is displayed with an eject button.
What does finder use to decide if this volume is ejectable? Obviously not the obvious kDADiskDescriptionMediaEjectableKey.
Any hint appreciated.
I'm not 100% sure on this, but I suspect OS X shows the eject button for any external drives. (i.e. non-internal:
kDADiskDescriptionDeviceInternalKeybeing false) Thunderbolt drives are really just external PCIe drive controllers (SATA or whatever), and don't have a bus concept of "ejecting;" clicking eject will usually just unmount the volume and send the drive into standby. You can re-mount it anytime if you don't actually unplug it. Contrast this with many USB drives, which actually seem to fall off the bus when you eject them. So if the driver supports an explicit "eject" action, that will be performed as well when you click eject, but it's not a requirement for showing the eject UI.