From 34ff0c0e6a221d4418b4a1f7d144013739fad76e Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Fri, 12 Jun 2020 14:25:32 +0000 Subject: [PATCH] Make linux(4) warn about unsupported fcntls. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25231 --- sys/compat/linux/linux_file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 6df98769ea63..a77b61acd143 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1371,9 +1371,10 @@ fcntl_common(struct thread *td, struct linux_fcntl_args *args) case LINUX_F_DUPFD_CLOEXEC: return (kern_fcntl(td, args->fd, F_DUPFD_CLOEXEC, args->arg)); + default: + linux_msg(td, "unsupported fcntl cmd %d\n", args->cmd); + return (EINVAL); } - - return (EINVAL); } int