/* this function is a POSIX compliant version, which will return the information about a mounted file system. */
int statfs(const char *path, struct statfs *buf)
/* this function is a POSIX compliant version, which will return the information about a mounted file system. */
int statfs(const char *path, struct statfs *buf)
{
    int result;
    if (path == NULL || buf == NULL)
    {
        rt_set_errno(-EBADF);
        return -1;
    }
    result = dfs_statfs(path, buf);
    if (result < 0)
    {
        rt_set_errno(result);
        return -1;
    }
    return result;
}