diff options
author | Jim Wilson <jimw@sifive.com> | 2017-12-26 23:27:52 +0300 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2017-12-26 23:27:52 +0300 |
commit | 28d5b98038dd18797375f4ff6a11fecd59809b22 (patch) | |
tree | f6ea701cdba714aa1f0be37ee9d881a7a9939c5b /libgloss/riscv/sys_fstatat.c | |
parent | 347b08391132d61702f9004d7b74f742a49907f6 (diff) |
RISC-V: Moved syscalls to separate files to fix aliasing problems.
Diffstat (limited to 'libgloss/riscv/sys_fstatat.c')
-rw-r--r-- | libgloss/riscv/sys_fstatat.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libgloss/riscv/sys_fstatat.c b/libgloss/riscv/sys_fstatat.c new file mode 100644 index 000000000..0e4ea42d0 --- /dev/null +++ b/libgloss/riscv/sys_fstatat.c @@ -0,0 +1,14 @@ +#include <machine/syscall.h> +#include "kernel_stat.h" +#include "internal_syscall.h" + +/* Status of an open file. The sys/stat.h header file required is + distributed in the include subdirectory for this C library. */ +int +_fstatat(int dirfd, const char *file, struct stat *st, int flags) +{ + struct kernel_stat kst; + int rv = syscall_errno (SYS_fstatat, dirfd, file, &kst, flags, 0, 0); + _conv_stat (st, &kst); + return rv; +} |