/* this function is a POSIX compliant version, which will get file status. */
int fstat(int fildes, struct stat *buf)
/* this function is a POSIX compliant version, which will get file status. */
int fstat(int fildes, struct stat *buf)
{
    struct dfs_file *d;
    d = fd_get(fildes);
    if (d == NULL)
    {
        rt_set_errno(-EBADF);
        return -1;
    }
    return stat(d->vnode->fullpath, buf);
}