From 0fabd7b5cce2493f70cedf4f9f3c6fcab65daed4 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Thu, 4 Jul 2019 20:16:04 +0000 Subject: [PATCH] Return ENOTSUP for Linux FS_IOC_FIEMAP ioctl. Linux man(1) calls it for no good reason; this avoids the console spam (eg '(man): ioctl fd=4, cmd=0x660b ('f',11) is not implemented'). Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20690 --- sys/compat/linux/linux_ioctl.c | 1 + sys/compat/linux/linux_ioctl.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index c4edaee1abc..d33ddd2bab8 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -3593,6 +3593,7 @@ linux_ioctl(struct thread *td, struct linux_ioctl_args *args) switch (args->cmd & 0xffff) { case LINUX_BTRFS_IOC_CLONE: + case LINUX_FS_IOC_FIEMAP: return (ENOTSUP); default: diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 519f55e6c16..e529f649496 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -749,6 +749,7 @@ * Linux btrfs clone operation */ #define LINUX_BTRFS_IOC_CLONE 0x9409 /* 0x40049409 */ +#define LINUX_FS_IOC_FIEMAP 0x660b /* * Linux evdev ioctl min and max