PatchworkOS
19e446b
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
stat.c
Go to the documentation of this file.
1
#include <
stdarg.h
>
2
#include <
stdio.h
>
3
#include <
stdlib.h
>
4
#include <
sys/fs.h
>
5
6
#include "
user/common/syscalls.h
"
7
8
uint64_t
stat
(
const
char
* path,
stat_t
* info)
9
{
10
uint64_t
result =
_syscall_stat
(path, info);
11
if
(result ==
ERR
)
12
{
13
errno
=
_syscall_errno
();
14
}
15
return
result;
16
}
errno
#define errno
Error number variable.
Definition
errno.h:27
stat
uint64_t stat(const char *path, stat_t *info)
System call for retrieving info about a file or directory.
Definition
stat.c:8
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
fs.h
stdarg.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
stdio.h
stdlib.h
stat_t
Stat type.
Definition
fs.h:378
syscalls.h
_syscall_stat
static uint64_t _syscall_stat(const char *path, stat_t *info)
Definition
syscalls.h:172
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:107
src
libstd
user
functions
fs
stat.c
Generated on Sat Jan 24 2026 10:59:25 for PatchworkOS by
1.9.8