aboutsummaryrefslogtreecommitdiff
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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index a4be5313aa96..daddafa325ad 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1457,6 +1457,14 @@ fcntl_common(struct thread *td, struct linux_fcntl_args *args)
fdrop(fp, td);
return (0);
+ case LINUX_F_DUPFD_QUERY:
+ error = kern_kcmp(td, td->td_proc->p_pid, td->td_proc->p_pid,
+ KCMP_FILE, args->fd, args->arg);
+ if (error != 0)
+ return (error);
+ td->td_retval[0] = (td->td_retval[0] == 0) ? 1 : 0;
+ return (0);
+
default:
linux_msg(td, "unsupported fcntl cmd %d", args->cmd);
return (EINVAL);