From 9f5b3b76d2c5c17c995d8ee308393381b7c29943 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 12 Oct 2022 11:57:49 +0200 Subject: [PATCH] libc: Document the function in fcntl.h --- libs/libc/include/fcntl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/libc/include/fcntl.h b/libs/libc/include/fcntl.h index dbe24b94..e60f6b55 100644 --- a/libs/libc/include/fcntl.h +++ b/libs/libc/include/fcntl.h @@ -1,8 +1,11 @@ #ifndef _FCNTL_H #define _FCNTL_H +/* Open for reading only. */ #define O_RDONLY 1 +/* Open for writing only. */ #define O_WRONLY 2 +/* Open for reading and writing. */ #define O_RDWR 3 #ifdef __cplusplus @@ -10,7 +13,8 @@ extern "C" { #endif - int open(const char*, int); + /* Opens the file specified by pathname. Returns a file descriptor on success, or -1 on error. */ + int open(const char* pathname, int flags); #ifdef __cplusplus }