Commit 406a4302 authored by Marvin Scholz's avatar Marvin Scholz Committed by Petri Hintukainen

darwin: rewrite mount_get_mountpoint

Rewrite most of mount_get_mountpoint for Darwin using the
DiskArbitration API instead of the more low level getfsstat.

This fixes a memory over-read leading to a crash when the system
has more than 128 mounts.

Additionally it changes the logic a bit, now it is first checked
if the path exists and is a folder, if that is not the case, try
to interpret it as BSD mount name, this makes BSD names like 'disk2'
work (provided there is no folder/image with that name) as expected.

Reported by Collin Allen.

Fix #21
parent 24bdc8af
Pipeline #9875 passed with stage
in 2 minutes and 9 seconds