Merge remote-tracking branch 'origin/master' into isa/arm64
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / fcntl_defs.h
1 #ifndef __LUNAIX_SYS_FCNTL_DEFS_H
2 #define __LUNAIX_SYS_FCNTL_DEFS_H
3
4 #include "fstypes.h"
5 #include "types.h"
6
7 #define FO_CREATE   0x1
8 #define FO_APPEND   0x2
9 #define FO_DIRECT   0x4
10 #define FO_WRONLY   0x8
11 #define FO_RDONLY   0x10
12 #define FO_RDWR     0x20
13 #define FO_TRUNC    0x40
14
15 #define FO_NOFOLLOW 0x10000
16
17 #define FSEEK_SET 0x1
18 #define FSEEK_CUR 0x2
19 #define FSEEK_END 0x3
20
21 #define O_CREAT FO_CREATE
22 #define O_APPEND FO_APPEND
23 #define O_DIRECT FO_DIRECT
24 #define O_WRONLY FO_WRONLY
25 #define O_RDONLY FO_RDONLY
26 #define O_RDWR FO_RDWR
27 #define O_TRUNC FO_TRUNC
28
29 /* Mount with read-only flag */
30 #define MNT_RO (1 << 0)
31
32 /* Mount with block-cache-disabled flag */
33 #define MNT_NC (1 << 1)
34
35 struct file_stat
36 {
37     dev_t st_dev;
38     ino_t st_ino;
39     unsigned int mode;
40     dev_t st_rdev;
41     off_t st_size;
42     size_t st_blksize;
43     size_t st_ioblksize;
44     size_t st_blocks;
45 };
46
47 #endif /* __LUNAIX_FNCTL_DEFS_H */