Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_misc.c
Show First 20 Lines • Show All 1,089 Lines • ▼ Show 20 Lines | linux_waitid(struct thread *td, struct linux_waitid_args *args) | ||||
idtype_t idtype; | idtype_t idtype; | ||||
int error, options; | int error, options; | ||||
options = 0; | options = 0; | ||||
linux_to_bsd_waitopts(args->options, &options); | linux_to_bsd_waitopts(args->options, &options); | ||||
if (options & ~(WNOHANG | WNOWAIT | WEXITED | WUNTRACED | WCONTINUED)) | if (options & ~(WNOHANG | WNOWAIT | WEXITED | WUNTRACED | WCONTINUED)) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (!(options & (WEXITED | WUNTRACED | WCONTINUED))) | |||||
return (EINVAL); | |||||
switch (args->idtype) { | switch (args->idtype) { | ||||
case LINUX_P_ALL: | case LINUX_P_ALL: | ||||
idtype = P_ALL; | idtype = P_ALL; | ||||
break; | break; | ||||
case LINUX_P_PID: | case LINUX_P_PID: | ||||
if (args->id <= 0) | if (args->id <= 0) | ||||
return (EINVAL); | return (EINVAL); | ||||
▲ Show 20 Lines • Show All 1,760 Lines • Show Last 20 Lines |