From owner-svn-src-all@FreeBSD.ORG Fri Jun 26 19:39:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F02FC106564A; Fri, 26 Jun 2009 19:39:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEA9E8FC0C; Fri, 26 Jun 2009 19:39:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5QJdXJC096235; Fri, 26 Jun 2009 19:39:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5QJdXLA096233; Fri, 26 Jun 2009 19:39:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906261939.n5QJdXLA096233@svn.freebsd.org> From: John Baldwin Date: Fri, 26 Jun 2009 19:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195074 - head/sys/i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 19:39:34 -0000 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; }