XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_vfs_sys_fcntl.h
浏览该文件的文档.
1
12#ifndef __XF_VFS_SYS_FCNTL_H__
13#define __XF_VFS_SYS_FCNTL_H__
14
15/* ==================== [Includes] ========================================== */
16
18
19#include "xf_utils.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/* ==================== [Defines] =========================================== */
26
32#define XF_VFS__FOPEN (-1)
33#define XF_VFS__FREAD 0x0001
34#define XF_VFS__FWRITE 0x0002
35#define XF_VFS__FAPPEND 0x0008
36#define XF_VFS__FMARK 0x0010
37#define XF_VFS__FDEFER 0x0020
38#define XF_VFS__FASYNC 0x0040
39#define XF_VFS__FSHLOCK 0x0080
40#define XF_VFS__FEXLOCK 0x0100
41#define XF_VFS__FCREAT 0x0200
42#define XF_VFS__FTRUNC 0x0400
43#define XF_VFS__FEXCL 0x0800
44#define XF_VFS__FNBIO 0x1000
45#define XF_VFS__FSYNC 0x2000
46#define XF_VFS__FNONBLOCK 0x4000
47#define XF_VFS__FNDELAY XF_VFS__FNONBLOCK
48#define XF_VFS__FNOCTTY 0x8000
50#define XF_VFS__FNOINHERIT 0x40000
51#define XF_VFS__FDIRECT 0x80000
52#define XF_VFS__FNOFOLLOW 0x100000
53#define XF_VFS__FDIRECTORY 0x200000
54#define XF_VFS__FEXECSRCH 0x400000
55
56#define XF_VFS_O_ACCMODE (XF_VFS_O_RDONLY|XF_VFS_O_WRONLY|XF_VFS_O_RDWR)
57
58#define XF_VFS_O_RDONLY 0
59#define XF_VFS_O_WRONLY 1
60#define XF_VFS_O_RDWR 2
61#define XF_VFS_O_APPEND XF_VFS__FAPPEND
62#define XF_VFS_O_CREAT XF_VFS__FCREAT
63#define XF_VFS_O_TRUNC XF_VFS__FTRUNC
64#define XF_VFS_O_EXCL XF_VFS__FEXCL
65#define XF_VFS_O_SYNC XF_VFS__FSYNC
66#define XF_VFS_O_NONBLOCK XF_VFS__FNONBLOCK
67#define XF_VFS_O_NOCTTY XF_VFS__FNOCTTY
68
69#define XF_VFS_O_CLOEXEC XF_VFS__FNOINHERIT
70#define XF_VFS_O_NOFOLLOW XF_VFS__FNOFOLLOW
71#define XF_VFS_O_DIRECTORY XF_VFS__FDIRECTORY
72#define XF_VFS_O_EXEC XF_VFS__FEXECSRCH
73#define XF_VFS_O_SEARCH XF_VFS__FEXECSRCH
74
75#define XF_VFS_O_DIRECT XF_VFS__FDIRECT
76
77#define XF_VFS_FNONBLOCK XF_VFS__FNONBLOCK
78
79#define XF_VFS_FD_CLOEXEC 1 /* posix */
80
81/* fcntl(2) requests */
82#define XF_VFS_F_DUPFD 0
83#define XF_VFS_F_GETFD 1
84#define XF_VFS_F_SETFD 2
85#define XF_VFS_F_GETFL 3
86#define XF_VFS_F_SETFL 4
87#define XF_VFS_F_GETOWN 5
88#define XF_VFS_F_SETOWN 6
89#define XF_VFS_F_GETLK 7
90#define XF_VFS_F_SETLK 8
91#define XF_VFS_F_SETLKW 9
92#define XF_VFS_F_DUPFD_CLOEXEC 14
94#define XF_VFS_F_RDLCK 1
95#define XF_VFS_F_WRLCK 2
96#define XF_VFS_F_UNLCK 3
98#define XF_VFS_AT_FDCWD -2
99
100#define XF_VFS_AT_EACCESS 1
101#define XF_VFS_AT_SYMLINK_NOFOLLOW 2
102#define XF_VFS_AT_SYMLINK_FOLLOW 4
103#define XF_VFS_AT_REMOVEDIR 8
104#define XF_VFS_AT_EMPTY_PATH 16
105
106#define XF_VFS_LOCK_SH 0x01
107#define XF_VFS_LOCK_EX 0x02
108#define XF_VFS_LOCK_NB 0x04
109#define XF_VFS_LOCK_UN 0x08
115/* ==================== [Typedefs] ========================================== */
116
117/* ==================== [Global Prototypes] ================================= */
118
119/* ==================== [Macros] ============================================ */
120
121#ifdef __cplusplus
122} /* extern "C" */
123#endif
124
125#endif // __XF_VFS_SYS_FCNTL_H__
xf_vfs 模块内部配置总头文件。 确保 xf_vfs_config.h 的所有定义都有默认值。