add O_PATH/O_SEARCH support to fcntl.h
I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for O_SEARCH, but it seems very close if not perfect. and old kernels ignore it, so O_SEARCH will still work as desired as long as the caller has read permissions to the directory.
This commit is contained in:
parent
cfc09b1ecf
commit
b238b37a0f
5 changed files with 9 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ int openat(int, const char *, int, ...);
|
|||
int posix_fadvise(int, off_t, off_t, int);
|
||||
int posix_fallocate(int, off_t, off_t);
|
||||
|
||||
#define O_ACCMODE 03
|
||||
#define O_ACCMODE (O_RDWR|O_SEARCH)
|
||||
#define O_RDONLY 00
|
||||
#define O_WRONLY 01
|
||||
#define O_RDWR 02
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue