From 5c4fb3b3c58a2d850031e9449b5d65887e42f1c7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 11 Jul 2022 17:29:31 +0200 Subject: init/stdlib: a more posix-y file api --- src/init/stdlib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/init/stdlib.h') diff --git a/src/init/stdlib.h b/src/init/stdlib.h index a48391c..f7917da 100644 --- a/src/init/stdlib.h +++ b/src/init/stdlib.h @@ -14,9 +14,9 @@ typedef struct { int pos; bool eof; } libc_file; -int file_open(libc_file*, const char *path, int flags); // TODO return a libc_file* +libc_file *file_open(const char *path, int flags); int file_read(libc_file*, char *buf, size_t len); int file_write(libc_file*, const char *buf, size_t len); void file_close(libc_file*); -extern libc_file __stdin, __stdout; +extern libc_file *stdin, *stdout; -- cgit v1.2.3