Skip to content

Commit

Permalink
[Review] libutils: Import part of sys/fcntl.h
Browse files Browse the repository at this point in the history
Only add the definitions that we need.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
  • Loading branch information
gagachang committed Feb 28, 2024
1 parent 4e31cb8 commit 062625a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 78 deletions.
77 changes: 0 additions & 77 deletions lib/libutils/isoc/include/sys/_default_fcntl.h

This file was deleted.

16 changes: 15 additions & 1 deletion lib/libutils/isoc/include/sys/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@

#ifndef _SYS_FCNTL_H_
#define _SYS_FCNTL_H_
#include <sys/_default_fcntl.h>

#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
#define _FCREAT 0x0200 /* open with file create */
#define _FTRUNC 0x0400 /* open with truncation */

/*
* Flag values for open(2) and fcntl(2)
*/
#define O_RDONLY 0 /* +1 == FREAD */
#define O_WRONLY 1 /* +1 == FWRITE */
#define O_RDWR 2 /* +1 == FREAD|FWRITE */
#define O_APPEND _FAPPEND
#define O_CREAT _FCREAT
#define O_TRUNC _FTRUNC

#endif /* _SYS_FCNTL_H_ */

0 comments on commit 062625a

Please sign in to comment.