summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_file.c16
-rw-r--r--sys/i386/linux/linux.h5
2 files changed, 21 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index bd81cab..79a8ba9 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -979,6 +979,14 @@ fcntl_common(struct thread *td, struct linux_fcntl64_args *args)
td->td_retval[0] |= LINUX_O_SYNC;
if (result & O_ASYNC)
td->td_retval[0] |= LINUX_FASYNC;
+#ifdef LINUX_O_NOFOLLOW
+ if (result & O_NOFOLLOW)
+ td->td_retval[0] |= LINUX_O_NOFOLLOW;
+#endif
+#ifdef LINUX_O_DIRECT
+ if (result & O_DIRECT)
+ td->td_retval[0] |= LINUX_O_DIRECT;
+#endif
return (error);
case LINUX_F_SETFL:
@@ -991,6 +999,14 @@ fcntl_common(struct thread *td, struct linux_fcntl64_args *args)
arg |= O_FSYNC;
if (args->arg & LINUX_FASYNC)
arg |= O_ASYNC;
+#ifdef LINUX_O_NOFOLLOW
+ if (args->arg & LINUX_O_NOFOLLOW)
+ arg |= O_NOFOLLOW;
+#endif
+#ifdef LINUX_O_DIRECT
+ if (args->arg & LINUX_O_DIRECT)
+ arg |= O_DIRECT;
+#endif
return (kern_fcntl(td, args->fd, F_SETFL, arg));
case LINUX_F_GETLK:
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index fa0ab75..6ca77b3 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -484,6 +484,11 @@ int linux_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#define LINUX_O_NDELAY LINUX_O_NONBLOCK
#define LINUX_O_SYNC 010000
#define LINUX_FASYNC 020000
+#define LINUX_O_DIRECT 040000 /* direct disk access hint */
+#define LINUX_O_LARGEFILE 0100000
+#define LINUX_O_DIRECTORY 0200000 /* must be a directory */
+#define LINUX_O_NOFOLLOW 0400000 /* don't follow links */
+#define LINUX_O_NOATIME 01000000
#define LINUX_F_DUPFD 0
#define LINUX_F_GETFD 1
OpenPOWER on IntegriCloud