summaryrefslogtreecommitdiff
path: root/userland/libc/sys/stat/stat.c
blob: e37223eb0ebddd7a14af79436519a29fb67f9752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h>
#include <syscall.h>

int stat(const char *path, struct stat *buf) {
  SYS_STAT_PARAMS args = {
      .pathname = path,
      .statbuf = buf,
  };
  RC_ERRNO(syscall(SYS_STAT, &args, 0, 0, 0, 0));
}