Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/common/kern_sig_43.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/common/kern_sig_43.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.27.4.2 retrieving revision 1.28 diff -u -p -r1.27.4.2 -r1.28 --- src/sys/compat/common/kern_sig_43.c 2007/12/26 21:38:51 1.27.4.2 +++ src/sys/compat/common/kern_sig_43.c 2007/12/04 18:40:07 1.28 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig_43.c,v 1.27.4.2 2007/12/26 21:38:51 ad Exp $ */ +/* $NetBSD: kern_sig_43.c,v 1.28 2007/12/04 18:40:07 dsl Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.27.4.2 2007/12/26 21:38:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.28 2007/12/04 18:40:07 dsl Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -80,7 +80,9 @@ void compat_43_sigstack_to_sigaltstack(c void compat_43_sigaltstack_to_sigstack(const struct sigaltstack *, struct sigstack *); void -compat_43_sigmask_to_sigset(const int *sm, sigset_t *ss) +compat_43_sigmask_to_sigset(sm, ss) + const int *sm; + sigset_t *ss; { ss->__bits[0] = *sm; @@ -90,14 +92,18 @@ compat_43_sigmask_to_sigset(const int *s } void -compat_43_sigset_to_sigmask(const sigset_t *ss, int *sm) +compat_43_sigset_to_sigmask(ss, sm) + const sigset_t *ss; + int *sm; { *sm = ss->__bits[0]; } void -compat_43_sigvec_to_sigaction(const struct sigvec *sv, struct sigaction *sa) +compat_43_sigvec_to_sigaction(sv, sa) + const struct sigvec *sv; + struct sigaction *sa; { sa->sa_handler = sv->sv_handler; compat_43_sigmask_to_sigset(&sv->sv_mask, &sa->sa_mask); @@ -105,7 +111,9 @@ compat_43_sigvec_to_sigaction(const stru } void -compat_43_sigaction_to_sigvec(const struct sigaction *sa, struct sigvec *sv) +compat_43_sigaction_to_sigvec(sa, sv) + const struct sigaction *sa; + struct sigvec *sv; { sv->sv_handler = sa->sa_handler; compat_43_sigset_to_sigmask(&sa->sa_mask, &sv->sv_mask); @@ -113,7 +121,9 @@ compat_43_sigaction_to_sigvec(const stru } void -compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, struct sigaltstack *sa) +compat_43_sigstack_to_sigaltstack(ss, sa) + const struct sigstack *ss; + struct sigaltstack *sa; { sa->ss_sp = ss->ss_sp; sa->ss_size = SIGSTKSZ; /* Use the recommended size */ @@ -123,7 +133,9 @@ compat_43_sigstack_to_sigaltstack(const } void -compat_43_sigaltstack_to_sigstack(const struct sigaltstack *sa, struct sigstack *ss) +compat_43_sigaltstack_to_sigstack(sa, ss) + const struct sigaltstack *sa; + struct sigstack *ss; { ss->ss_sp = sa->ss_sp; if (sa->ss_flags & SS_ONSTACK) @@ -133,11 +145,11 @@ compat_43_sigaltstack_to_sigstack(const } int -compat_43_sys_sigblock(struct lwp *l, const struct compat_43_sys_sigblock_args *uap, register_t *retval) +compat_43_sys_sigblock(struct lwp *l, void *v, register_t *retval) { - /* { + struct compat_43_sys_sigblock_args /* { syscallarg(int) mask; - } */ + } */ *uap = v; struct proc *p = l->l_proc; int nsm, osm; sigset_t nss, oss; @@ -156,11 +168,11 @@ compat_43_sys_sigblock(struct lwp *l, co } int -compat_43_sys_sigsetmask(struct lwp *l, const struct compat_43_sys_sigsetmask_args *uap, register_t *retval) +compat_43_sys_sigsetmask(struct lwp *l, void *v, register_t *retval) { - /* { + struct compat_43_sys_sigsetmask_args /* { syscallarg(int) mask; - } */ + } */ *uap = v; struct proc *p = l->l_proc; int nsm, osm; sigset_t nss, oss; @@ -180,12 +192,12 @@ compat_43_sys_sigsetmask(struct lwp *l, /* ARGSUSED */ int -compat_43_sys_sigstack(struct lwp *l, const struct compat_43_sys_sigstack_args *uap, register_t *retval) +compat_43_sys_sigstack(struct lwp *l, void *v, register_t *retval) { - /* { + struct compat_43_sys_sigstack_args /* { syscallarg(struct sigstack *) nss; syscallarg(struct sigstack *) oss; - } */ + } */ *uap = v; struct sigstack nss, oss; struct sigaltstack nsa, osa; int error; @@ -214,13 +226,13 @@ compat_43_sys_sigstack(struct lwp *l, co */ /* ARGSUSED */ int -compat_43_sys_sigvec(struct lwp *l, const struct compat_43_sys_sigvec_args *uap, register_t *retval) +compat_43_sys_sigvec(struct lwp *l, void *v, register_t *retval) { - /* { + struct compat_43_sys_sigvec_args /* { syscallarg(int) signum; syscallarg(const struct sigvec *) nsv; syscallarg(struct sigvec *) osv; - } */ + } */ *uap = v; struct sigvec nsv, osv; struct sigaction nsa, osa; int error; @@ -248,17 +260,16 @@ compat_43_sys_sigvec(struct lwp *l, cons /* ARGSUSED */ int -compat_43_sys_killpg(struct lwp *l, const struct compat_43_sys_killpg_args *uap, register_t *retval) +compat_43_sys_killpg(struct lwp *l, void *v, register_t *retval) { - /* { + struct compat_43_sys_killpg_args /* { syscallarg(int) pgid; syscallarg(int) signum; - } */ + } */ *uap = v; ksiginfo_t ksi; - int pgid = SCARG(uap, pgid); #ifdef COMPAT_09 - pgid &= 0xffff; + SCARG(uap, pgid) = (short) SCARG(uap, pgid); #endif if ((u_int)SCARG(uap, signum) >= NSIG) @@ -268,5 +279,5 @@ compat_43_sys_killpg(struct lwp *l, cons ksi.ksi_code = SI_USER; ksi.ksi_pid = l->l_proc->p_pid; ksi.ksi_uid = kauth_cred_geteuid(l->l_cred); - return killpg1(l, &ksi, pgid, 0); + return (killpg1(l, &ksi, SCARG(uap, pgid), 0)); }