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
This commit is contained in:
Edward Tomasz Napierala 2020-07-18 12:21:08 +00:00
parent eb6ae7576d
commit d5c5b4b382
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363307

View File

@ -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);