* this function is a POSIX compliant version, which will return the * information about a mounted file system. * * @param fildes the file description. * @param buf the buffer to save the returned information. * * @return 0 on successful, others on failed. */
| 615 | * @return 0 on successful, others on failed. |
| 616 | */ |
| 617 | int fstatfs(int fildes, struct statfs *buf) |
| 618 | { |
| 619 | struct dfs_file *d; |
| 620 | |
| 621 | /* get the fd */ |
| 622 | d = fd_get(fildes); |
| 623 | if (d == NULL) |
| 624 | { |
| 625 | rt_set_errno(-EBADF); |
| 626 | |
| 627 | return -1; |
| 628 | } |
| 629 | |
| 630 | return statfs(d->vnode->fullpath, buf); |
| 631 | } |
| 632 | RTM_EXPORT(fstatfs); |
| 633 | |
| 634 | /** |
no test coverage detected