From owner-svn-src-user@FreeBSD.ORG Thu May 1 14:00:48 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4C0E126; Thu, 1 May 2014 14:00:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9871E1DED; Thu, 1 May 2014 14:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s41E0mHh072114; Thu, 1 May 2014 14:00:48 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s41E0mUt072112; Thu, 1 May 2014 14:00:48 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201405011400.s41E0mUt072112@svn.freebsd.org> From: Dmitry Chagin Date: Thu, 1 May 2014 14:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r265185 - in user/dchagin/lemul/sys: amd64/linux32 compat/linux X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 14:00:48 -0000 Author: dchagin Date: Thu May 1 14:00:47 2014 New Revision: 265185 URL: http://svnweb.freebsd.org/changeset/base/265185 Log: Convert Linux wait options to the native. Also remove bogus check's which are done by kern_wait(). Modified: user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c user/dchagin/lemul/sys/compat/linux/linux_misc.c Modified: user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c Thu May 1 13:59:24 2014 (r265184) +++ user/dchagin/lemul/sys/amd64/linux32/linux32_machdep.c Thu May 1 14:00:47 2014 (r265185) @@ -1037,10 +1037,8 @@ linux_wait4(struct thread *td, struct li (void *)args->rusage); #endif - options = (args->options & (WNOHANG | WUNTRACED)); - /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ - if (args->options & __WCLONE) - options |= WLINUXCLONE; + options = 0; + linux_to_bsd_waitopts(args->options, &options); if (args->rusage != NULL) rup = &ru; Modified: user/dchagin/lemul/sys/compat/linux/linux_misc.c ============================================================================== --- user/dchagin/lemul/sys/compat/linux/linux_misc.c Thu May 1 13:59:24 2014 (r265184) +++ user/dchagin/lemul/sys/compat/linux/linux_misc.c Thu May 1 14:00:47 2014 (r265185) @@ -876,17 +876,8 @@ linux_waitpid(struct thread *td, struct printf(ARGS(waitpid, "%d, %p, %d"), args->pid, (void *)args->status, args->options); #endif - /* - * this is necessary because the test in kern_wait doesn't work - * because we mess with the options here - */ - if (args->options & ~(WUNTRACED | WNOHANG | WCONTINUED | __WCLONE)) - return (EINVAL); - - options = (args->options & (WNOHANG | WUNTRACED)); - /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ - if (args->options & __WCLONE) - options |= WLINUXCLONE; + options = 0; + linux_to_bsd_waitopts(args->options, &options); return (linux_common_wait(td, args->pid, args->status, options, NULL)); }