summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index b2cc8d2..9251a20 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1636,3 +1636,18 @@ linux_dup3(struct thread *td, struct linux_dup3_args *args)
newfd = args->newfd;
return (kern_fcntl(td, args->oldfd, cmd, newfd));
}
+
+int
+linux_fallocate(struct thread *td, struct linux_fallocate_args *args)
+{
+
+ /*
+ * We emulate only posix_fallocate system call for which
+ * mode should be 0.
+ */
+ if (args->mode != 0)
+ return (ENOSYS);
+
+ return (kern_posix_fallocate(td, args->fd, args->offset,
+ args->len));
+}
OpenPOWER on IntegriCloud