diff options
Diffstat (limited to 'cpukit/libcsupport/src/open.c')
-rw-r--r-- | cpukit/libcsupport/src/open.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c index 554311c5aa..86d0bbeab9 100644 --- a/cpukit/libcsupport/src/open.c +++ b/cpukit/libcsupport/src/open.c @@ -74,7 +74,12 @@ static int do_open( bool exclusive = (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL); bool truncate = (oflag & O_TRUNC) == O_TRUNC; bool open_dir; - int eval_flags = RTEMS_FS_FOLLOW_LINK +#ifdef O_NOFOLLOW + int follow = (oflag & O_NOFOLLOW) == O_NOFOLLOW ? 0 : RTEMS_FS_FOLLOW_LINK; +#else + int follow = RTEMS_FS_FOLLOW_LINK; +#endif + int eval_flags = follow | (read_access ? RTEMS_FS_PERMS_READ : 0) | (write_access ? RTEMS_FS_PERMS_WRITE : 0) | (make ? RTEMS_FS_MAKE : 0) |