Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2009 19:39:33 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195074 - head/sys/i386/linux
Message-ID:  <200906261939.n5QJdXLA096233@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906261939.n5QJdXLA096233>