diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:13:43 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:13:43 +0000 |
commit | 5b01285f9b0853975f2548587fbdae2a2e0e6d0e (patch) | |
tree | c77886c765d3ab08a424727870df2a7668ba66a5 /sys/compat | |
parent | 795e029d8d1a24e32074626dad63ac27eea49b85 (diff) | |
download | FreeBSD-src-5b01285f9b0853975f2548587fbdae2a2e0e6d0e.zip FreeBSD-src-5b01285f9b0853975f2548587fbdae2a2e0e6d0e.tar.gz |
MFC r283465:
Add preliminary fallocate system call implementation
to emulate posix_fallocate() function.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_file.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 2279111..ee1d1ba 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1628,3 +1628,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)); +} |