Projet_SETI_RISC-V/riscv-gnu-toolchain/newlib/libgloss/riscv/sys_lstat.c
2023-03-06 14:48:14 +01:00

13 lines
321 B
C

#include <machine/syscall.h>
#include <sys/stat.h>
#include "internal_syscall.h"
#include "kernel_stat.h"
/* Status of a link (by name). */
int _lstat(const char *file, struct stat *st)
{
struct kernel_stat kst;
int rv = syscall_errno (SYS_lstat, 2, file, &kst, 0, 0, 0, 0);
_conv_stat (st, &kst);
return rv;
}