Add O_NOFOLLOW.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-10-17 13:05:29 +02:00
parent 97621d4661
commit ad9a90926d
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ namespace Sortix {
const int ACCESS_FLAGS = O_READ | O_WRITE | O_EXEC | O_SEARCH; const int ACCESS_FLAGS = O_READ | O_WRITE | O_EXEC | O_SEARCH;
// Flags that only make sense at open time. // Flags that only make sense at open time.
const int OPEN_FLAGS = O_CREATE | O_DIRECTORY | O_EXCL | O_TRUNC; const int OPEN_FLAGS = O_CREATE | O_DIRECTORY | O_EXCL | O_TRUNC | O_NOFOLLOW;
// Flags that only make sense for descriptors. // Flags that only make sense for descriptors.
const int DESCRIPTOR_FLAGS = O_APPEND | O_NONBLOCK; const int DESCRIPTOR_FLAGS = O_APPEND | O_NONBLOCK;

View File

@ -43,7 +43,7 @@ __BEGIN_DECLS
#define O_CLOFORK (1<<9) #define O_CLOFORK (1<<9)
#define O_SEARCH (1<<10) #define O_SEARCH (1<<10)
#define O_NONBLOCK (1<<11) #define O_NONBLOCK (1<<11)
// TODO: O_NOFOLLOW. #define O_NOFOLLOW (1<<12)
#define FD_CLOEXEC (1<<0) #define FD_CLOEXEC (1<<0)
#define FD_CLOFORK (1<<1) #define FD_CLOFORK (1<<1)