/* this function is a POSIX compliant version, which will return the information about a mounted file system. */
int fstatfs(int fildes, struct statfs *buf)
/* this function is a POSIX compliant version, which will return the information about a mounted file system. */
int fstatfs(int fildes, struct statfs *buf)
{
    struct dfs_file *d;
    d = fd_get(fildes);
    if (d == NULL)
    {
        rt_set_errno(-EBADF);
        return -1;
    }
    return statfs(d->vnode->fullpath, buf);
}