summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-06-26 19:39:33 +0000
committerjhb <jhb@FreeBSD.org>2009-06-26 19:39:33 +0000
commit12b7caa1dd2faf60b80c9332f9a8ddba08de6ef5 (patch)
treed2b1cc3156b0bc099d855181ccca1d8de8323eea /sys/i386/linux
parent12c75db4f1a160efc2469c66b2dbb137def4c0d3 (diff)
downloadFreeBSD-src-12b7caa1dd2faf60b80c9332f9a8ddba08de6ef5.zip
FreeBSD-src-12b7caa1dd2faf60b80c9332f9a8ddba08de6ef5.tar.gz
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)
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/linux_machdep.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 9d078af..cd3cf79 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -866,9 +866,6 @@ linux_modify_ldt(struct thread *td, struct linux_modify_ldt_args *uap)
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, struct linux_modify_ldt_args *uap)
error = i386_set_ldt(td, &ldt, &desc);
break;
default:
- error = EINVAL;
+ error = ENOSYS;
break;
}
OpenPOWER on IntegriCloud