From d5c5b4b382e3b6e3549287e313a0020162a0e686 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 18 Jul 2020 12:21:08 +0000 Subject: [PATCH] Make linux fallocate(2) return EOPNOTSUPP, not ENOSYS, on unsupported mode, as documented in the man page. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 3267bf2313ef..ba3a86b8b919 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1670,7 +1670,7 @@ linux_fallocate(struct thread *td, struct linux_fallocate_args *args) * mode should be 0. */ if (args->mode != 0) - return (ENOSYS); + return (EOPNOTSUPP); #if defined(__amd64__) && defined(COMPAT_LINUX32) len = PAIR32TO64(off_t, args->len);