Date: Thu, 1 May 2014 14:00:48 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r265185 - in user/dchagin/lemul/sys: amd64/linux32 compat/linux Message-ID: <201405011400.s41E0mUt072112@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405011400.s41E0mUt072112>