svn commit: r195074 - head/sys/i386/linux

John Baldwin jhb at FreeBSD.org
Fri Jun 26 19:39:34 UTC 2009


Author: jhb
Date: Fri Jun 26 19:39:33 2009
New Revision: 195074
URL: http://svn.freebsd.org/changeset/base/195074

Log:
  Return ENOSYS instead of EINVAL for invalid function codes to match the
  behavior of Linux.
  
  Reported by:	Alexander Best  alexbestms of math.uni-muenster.de
  Approved by:	re (kib)

Modified:
  head/sys/i386/linux/linux_machdep.c

Modified: head/sys/i386/linux/linux_machdep.c
==============================================================================
--- head/sys/i386/linux/linux_machdep.c	Fri Jun 26 19:14:53 2009	(r195073)
+++ head/sys/i386/linux/linux_machdep.c	Fri Jun 26 19:39:33 2009	(r195074)
@@ -866,9 +866,6 @@ linux_modify_ldt(struct thread *td, stru
 	union descriptor desc;
 	int size, written;
 
-	if (uap->ptr == NULL)
-		return (EINVAL);
-
 	switch (uap->func) {
 	case 0x00: /* read_ldt */
 		ldt.start = 0;
@@ -911,7 +908,7 @@ linux_modify_ldt(struct thread *td, stru
 		error = i386_set_ldt(td, &ldt, &desc);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOSYS;
 		break;
 	}
 


More information about the svn-src-all mailing list