FreeBSD/src df9bc7d (r351372)sys/kern vfs_vnops.c

Map ENOTTY to EINVAL for lseek(SEEK_DATA/SEEK_HOLE).

Without this patch, when an application performed lseek(SEEK_DATA/SEEK_HOLE)
on a file in a file system that does not have its own VOP_IOCTL(), the
lseek(2) fails with errno ENOTTY. This didn't seem appropriate, since
ENOTTY is not listed as an error return by either the lseek(2) man page
nor the POSIX draft for lseek(2).
This was discussed on freebsd-current@ here:
http://docs.FreeBSD.org/cgi/mid.cgi?CAOtMX2iiQdv1+15e1N_r7V6aCx_VqAJCTP1AW+qs3Yg7sPg9wA

This trivial patch maps ENOTTY to EINVAL for lseek(SEEK_DATA/SEEK_HOLE).

Reviewed by:    markj
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D21300
DeltaFile
+4-0sys/kern/vfs_vnops.c
+4-01 files

UnifiedSplitRaw