svn commit: r364692 - stable/12/sys/compat/linux

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Aug 24 14:58:59 UTC 2020


Author: trasz
Date: Mon Aug 24 14:58:58 2020
New Revision: 364692
URL: https://svnweb.freebsd.org/changeset/base/364692

Log:
  MFC r363307:
  
  Make linux fallocate(2) return EOPNOTSUPP, not ENOSYS, on unsupported mode,
  as documented in the man page.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/sys/compat/linux/linux_file.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linux/linux_file.c
==============================================================================
--- stable/12/sys/compat/linux/linux_file.c	Mon Aug 24 14:53:29 2020	(r364691)
+++ stable/12/sys/compat/linux/linux_file.c	Mon Aug 24 14:58:58 2020	(r364692)
@@ -1778,7 +1778,7 @@ linux_fallocate(struct thread *td, struct linux_falloc
 	 * mode should be 0.
 	 */
 	if (args->mode != 0)
-		return (ENOSYS);
+		return (EOPNOTSUPP);
 
 #if defined(__amd64__) && defined(COMPAT_LINUX32)
 	len = PAIR32TO64(off_t, args->len);


More information about the svn-src-stable-12 mailing list