summaryrefslogtreecommitdiffstats
path: root/include/fcntl.h
blob: 98020bdfb160178106c3814c91ecbd798f84252d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __FCNTL_H
#define __FCNTL_H

#include <linux/types.h>

/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
   located on an ext2 file system */
#define O_ACCMODE	00000003
#define O_RDONLY	00000000
#define O_WRONLY	00000001
#define O_RDWR		00000002
#define O_CREAT		00000100	/* not fcntl */
#define O_EXCL		00000200	/* not fcntl */
#define O_TRUNC		00001000	/* not fcntl */
#define O_APPEND	00002000
#define O_DIRECTORY	00200000	/* must be a directory */
#define O_NOFOLLOW	00400000	/* don't follow links */

/* barebox additional flags */
#define O_RWSIZE_MASK	017000000
#define O_RWSIZE_SHIFT	18
#define O_RWSIZE_1	001000000
#define O_RWSIZE_2	002000000
#define O_RWSIZE_4	004000000
#define O_RWSIZE_8	010000000

int open(const char *pathname, int flags, ...);
int creat(const char *pathname, mode_t mode);

#endif /* __FCNTL_H */