we can not implement these functions */ * this function is a POSIX compliant version, which will get file information. * * @param file the file name * @param buf the data buffer to save stat description. * * @return 0 on successful, -1 on failed. */
| 524 | * @return 0 on successful, -1 on failed. |
| 525 | */ |
| 526 | int stat(const char *file, struct stat *buf) |
| 527 | { |
| 528 | int result; |
| 529 | |
| 530 | if (file == NULL || buf == NULL) |
| 531 | { |
| 532 | rt_set_errno(EBADF); |
| 533 | return -1; |
| 534 | } |
| 535 | |
| 536 | result = dfs_file_stat(file, buf); |
| 537 | if (result < 0) |
| 538 | { |
| 539 | rt_set_errno(-result); |
| 540 | } |
| 541 | |
| 542 | return result; |
| 543 | } |
| 544 | RTM_EXPORT(stat); |
| 545 | |
| 546 | /** |
no test coverage detected