CTL_STATUS_t ctl_ms_unmount_volume(const char *volume);

ctl_ms_unmount_volume unmounts the volume vol. Before the volume is unmounted, any dirty sectors in the sector cache are flushed to the media and then cleared.

If any file is open on the volume, ctl_ms_unmount_volume will fail with an error.

Return Value

ctl_ms_unmount_volume returns a standard status code.

Thread Safety

ctl_ms_unmount_volume is thread-safe.