Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *fh = NULL;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
/* When the O_PATH is being specified, others flags than O_DIRECTORY
* and O_NOFOLLOW are ignored. Please refer do_entry_open() function
* in kernel (fs/open.c). */
if (r == 0 && (flags & O_CREAT) && (flags & O_EXCL))
return -EEXIST;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (r == 0 && in->is_symlink() && (flags & O_NOFOLLOW) && !(flags & O_PATH))
#else
if (r == 0 && in->is_symlink() && (flags & O_NOFOLLOW))
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *fh = get_filehandle(fd);
if (!fh)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (fh->flags & O_PATH)
return -EBADF;
#endif
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *f = get_filehandle(fd);
if (!f)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (f->flags & O_PATH)
return -EBADF;
#endif
Fh *fh = get_filehandle(fd);
if (!fh)
return -EBADF;
-#if defined(__linux__)
+#if defined(__linux__) && defined(O_PATH)
if (fh->flags & O_PATH)
return -EBADF;
#endif