2017-12-27 04:27:52 +08:00
|
|
|
#include <machine/syscall.h>
|
|
|
|
#include "kernel_stat.h"
|
|
|
|
#include "internal_syscall.h"
|
|
|
|
|
|
|
|
/* Status of a file (by name). */
|
|
|
|
|
|
|
|
int
|
|
|
|
_stat(const char *file, struct stat *st)
|
|
|
|
{
|
|
|
|
struct kernel_stat kst;
|
2020-02-11 04:19:58 +08:00
|
|
|
int rv = syscall_errno (SYS_stat, 2, file, &kst, 0, 0, 0, 0);
|
2017-12-27 04:27:52 +08:00
|
|
|
_conv_stat (st, &kst);
|
|
|
|
return rv;
|
|
|
|
}
|