diff options
Diffstat (limited to 'firmware/libc/include/fcntl.h')
-rw-r--r-- | firmware/libc/include/fcntl.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/firmware/libc/include/fcntl.h b/firmware/libc/include/fcntl.h index 34740c9ca2..ec53d728cf 100644 --- a/firmware/libc/include/fcntl.h +++ b/firmware/libc/include/fcntl.h @@ -23,18 +23,20 @@ #define __FCNTL_H__ #ifndef O_RDONLY -#define O_RDONLY 0 -#define O_WRONLY 1 -#define O_RDWR 2 -#define O_CREAT 4 -#define O_APPEND 8 -#define O_TRUNC 0x10 +#define O_RDONLY 0x0000 /* open for reading only */ +#define O_WRONLY 0x0001 /* open for writing only */ +#define O_RDWR 0x0002 /* open for reading and writing */ +#define O_ACCMODE 0x0003 /* mask for above modes */ +#define O_APPEND 0x0008 /* set append mode */ +#define O_CREAT 0x0200 /* create if nonexistent */ +#define O_TRUNC 0x0400 /* truncate to zero length */ +#define O_EXCL 0x0800 /* error if already exists */ #endif #ifndef SEEK_SET -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ #endif #endif /* __FCNTL_H__ */ |