summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 9631ac2..12db81a 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -795,6 +795,12 @@ linux_waitpid(struct thread *td, struct linux_waitpid_args *args)
printf(ARGS(waitpid, "%d, %p, %d"),
args->pid, (void *)args->status, args->options);
#endif
+ /*
+ * this is necessary because the test in kern_wait doesnt
+ * work because we mess with the options here
+ */
+ if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED))
+ return (EINVAL);
options = (args->options & (WNOHANG | WUNTRACED));
/* WLINUXCLONE should be equal to __WCLONE, but we make sure */
@@ -880,7 +886,7 @@ linux_mknod(struct thread *td, struct linux_mknod_args *args)
printf(ARGS(mknod, "%s, %d, %d"), path, args->mode, args->dev);
#endif
- if (args->mode & S_IFIFO)
+ if (S_ISFIFO(args->mode))
error = kern_mkfifo(td, path, UIO_SYSSPACE, args->mode);
else
error = kern_mknod(td, path, UIO_SYSSPACE, args->mode,
OpenPOWER on IntegriCloud