Jump to main content

##

# 1.2.7.4.4 SYS_FS_Unmount Function

## C

    SYS_FS_RESULT SYS_FS_Unmount
    (
        const char *mountName
    );

## Summary

Unmounts the disk/volume for the file system.

## Description

This function removes (unmounts) the attachment of the volume from the file system.

## Precondition

The volume name has to be know in order to pass as input to Unmount. The specified volume name to be unmounted should have been already mounted.

## Parameters

Param | Description
--- | ---
mountName | Mount name for the volume to be unmounted. The mount name has to be preceded by the string "/mnt/".

## Returns

SYS_FS_RES_SUCCESS - Unmount was successful.

SYS_FS_RES_FAILURE - Unmount was unsuccessful. The reason for the failure can be retrieved with SYS_FS_Error.

## Example

    if(SYS_FS_Unmount("/mnt/myDrive") != SYS_FS_RES_SUCCESS)
    {
        // Failure, try unmounting again
    }
    else
    {
        // Unmount was successful.
    }