pay a small amount of lip service to the new syscall args mechanism.

In reality, none of these will compile.
This commit is contained in:
cgd 1994-10-20 04:47:31 +00:00
parent 5aea0d3fd2
commit 74d7436a91
11 changed files with 414 additions and 389 deletions

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: hpux_net.c 1.8 93/08/02$
*
* from: @(#)hpux_net.c 8.2 (Berkeley) 9/9/93
* $Id: hpux_net.c,v 1.6 1994/05/23 08:04:18 mycroft Exp $
* $Id: hpux_net.c,v 1.7 1994/10/20 04:47:33 cgd Exp $
*/
/*
@ -105,14 +105,14 @@ struct hpux_netioctl_args {
hpux_netioctl(p, uap, retval)
struct proc *p;
struct hpux_netioctl_args *uap;
int *retval;
register_t *retval;
{
int *args, i;
register int code;
int error;
args = uap->args;
code = uap->call - MINBSDIPCCODE;
args = SCARG(uap, args);
code = SCARG(uap, call) - MINBSDIPCCODE;
if (code < 0 || code >= NUMBSDIPC || hpuxtobsdipc[code].rout == NULL)
return (EINVAL);
if ((i = hpuxtobsdipc[code].nargs * sizeof (int)) &&
@ -168,42 +168,42 @@ struct hpux_setsockopt_args {
hpux_setsockopt(p, uap, retval)
struct proc *p;
struct hpux_setsockopt_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
int tmp, error;
if (error = getsock(p->p_fd, uap->s, &fp))
if (error = getsock(p->p_fd, SCARG(uap, s), &fp))
return (error);
if (uap->valsize > MLEN)
if (SCARG(uap, valsize) > MLEN)
return (EINVAL);
if (uap->val) {
if (SCARG(uap, val)) {
m = m_get(M_WAIT, MT_SOOPTS);
if (m == NULL)
return (ENOBUFS);
if (error = copyin(uap->val, mtod(m, caddr_t),
(u_int)uap->valsize)) {
if (error = copyin(SCARG(uap, val), mtod(m, caddr_t),
(u_int)SCARG(uap, valsize))) {
(void) m_free(m);
return (error);
}
if (uap->name == SO_LINGER) {
if (SCARG(uap, name) == SO_LINGER) {
tmp = *mtod(m, int *);
mtod(m, struct linger *)->l_onoff = 1;
mtod(m, struct linger *)->l_linger = tmp;
m->m_len = sizeof(struct linger);
} else
socksetsize(uap->valsize, m);
} else if (uap->name == ~SO_LINGER) {
socksetsize(SCARG(uap, valsize), m);
} else if (SCARG(uap, name) == ~SO_LINGER) {
m = m_get(M_WAIT, MT_SOOPTS);
if (m) {
uap->name = SO_LINGER;
SCARG(uap, name) = SO_LINGER;
mtod(m, struct linger *)->l_onoff = 0;
m->m_len = sizeof(struct linger);
}
}
return (sosetopt((struct socket *)fp->f_data, uap->level,
uap->name, m));
return (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
SCARG(uap, name), m));
}
struct hpux_setsockopt2_args {
@ -217,29 +217,29 @@ struct hpux_setsockopt2_args {
hpux_setsockopt2(p, uap, retval)
struct proc *p;
register struct hpux_setsockopt2_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
int error;
if (error = getsock(p->p_fd, uap->s, &fp))
if (error = getsock(p->p_fd, SCARG(uap, s), &fp))
return (error);
if (uap->valsize > MLEN)
if (SCARG(uap, valsize) > MLEN)
return (EINVAL);
if (uap->val) {
if (SCARG(uap, val)) {
m = m_get(M_WAIT, MT_SOOPTS);
if (m == NULL)
return (ENOBUFS);
if (error = copyin(uap->val, mtod(m, caddr_t),
(u_int)uap->valsize)) {
if (error = copyin(SCARG(uap, val), mtod(m, caddr_t),
(u_int)SCARG(uap, valsize))) {
(void) m_free(m);
return (error);
}
socksetsize(uap->valsize, m);
socksetsize(SCARG(uap, valsize), m);
}
return (sosetopt((struct socket *)fp->f_data, uap->level,
uap->name, m));
return (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
SCARG(uap, name), m));
}
struct hpux_getsockopt_args {
@ -252,25 +252,25 @@ struct hpux_getsockopt_args {
hpux_getsockopt(p, uap, retval)
struct proc *p;
struct hpux_getsockopt_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
int valsize, error;
if (error = getsock(p->p_fd, uap->s, &fp))
if (error = getsock(p->p_fd, SCARG(uap, s), &fp))
return (error);
if (uap->val) {
if (error = copyin((caddr_t)uap->avalsize, (caddr_t)&valsize,
sizeof (valsize)))
if (SCARG(uap, val)) {
if (error = copyin((caddr_t)SCARG(uap, avalsize),
(caddr_t)&valsize, sizeof (valsize)))
return (error);
} else
valsize = 0;
if (error = sogetopt((struct socket *)fp->f_data, uap->level,
uap->name, &m))
if (error = sogetopt((struct socket *)fp->f_data, SCARG(uap, level),
SCARG(uap, name), &m))
goto bad;
if (uap->val && valsize && m != NULL) {
if (uap->name == SO_LINGER) {
if (SCARG(uap, val) && valsize && m != NULL) {
if (SCARG(uap, name) == SO_LINGER) {
if (mtod(m, struct linger *)->l_onoff)
*mtod(m, int *) = mtod(m, struct linger *)->l_linger;
else
@ -279,10 +279,11 @@ hpux_getsockopt(p, uap, retval)
}
if (valsize > m->m_len)
valsize = m->m_len;
error = copyout(mtod(m, caddr_t), uap->val, (u_int)valsize);
error = copyout(mtod(m, caddr_t), SCARG(uap, val),
(u_int)valsize);
if (error == 0)
error = copyout((caddr_t)&valsize,
(caddr_t)uap->avalsize, sizeof (valsize));
(caddr_t)SCARG(uap, avalsize), sizeof (valsize));
}
bad:
if (m != NULL)

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: hpux_sig.c 1.4 92/01/20$
*
* from: @(#)hpux_sig.c 8.2 (Berkeley) 9/23/93
* $Id: hpux_sig.c,v 1.9 1994/05/23 08:04:19 mycroft Exp $
* $Id: hpux_sig.c,v 1.10 1994/10/20 04:47:34 cgd Exp $
*/
/*
@ -86,7 +86,7 @@ struct hpux_sigvec_args {
hpux_sigvec(p, uap, retval)
struct proc *p;
register struct hpux_sigvec_args *uap;
int *retval;
register_t *retval;
{
struct sigvec vec;
register struct sigacts *ps = p->p_sigacts;
@ -94,11 +94,11 @@ hpux_sigvec(p, uap, retval)
register int sig;
int bit, error;
sig = hpuxtobsdsig(uap->signo);
sig = hpuxtobsdsig(SCARG(uap, signo));
if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
return (EINVAL);
sv = &vec;
if (uap->osv) {
if (SCARG(uap, osv)) {
sv->sv_handler = ps->ps_sigact[sig];
sv->sv_mask = ps->ps_catchmask[sig];
bit = sigmask(sig);
@ -112,12 +112,14 @@ hpux_sigvec(p, uap, retval)
if (p->p_flag & SOUSIG)
sv->sv_flags |= HPUXSV_RESET; /* XXX */
#endif
error = copyout((caddr_t)sv, (caddr_t)uap->osv, sizeof (vec));
error = copyout((caddr_t)sv, (caddr_t)SCARG(uap, osv),
sizeof (vec));
if (error)
return (error);
}
if (uap->nsv) {
error = copyin((caddr_t)uap->nsv, (caddr_t)sv, sizeof (vec));
if (SCARG(uap, nsv)) {
error = copyin((caddr_t)SCARG(uap, nsv), (caddr_t)sv,
sizeof (vec));
if (error)
return (error);
if (sig == SIGCONT && sv->sv_handler == SIG_IGN)
@ -139,12 +141,12 @@ struct hpux_sigblock_args {
hpux_sigblock(p, uap, retval)
register struct proc *p;
struct hpux_sigblock_args *uap;
int *retval;
register_t *retval;
{
(void) splhigh();
*retval = bsdtohpuxmask(p->p_sigmask);
p->p_sigmask |= hpuxtobsdmask(uap->mask) &~ sigcantmask;
p->p_sigmask |= hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
(void) spl0();
return (0);
}
@ -155,12 +157,12 @@ struct hpux_sigsetmask_args {
hpux_sigsetmask(p, uap, retval)
struct proc *p;
struct hpux_sigsetmask_args *uap;
int *retval;
register_t *retval;
{
(void) splhigh();
*retval = bsdtohpuxmask(p->p_sigmask);
p->p_sigmask = hpuxtobsdmask(uap->mask) &~ sigcantmask;
p->p_sigmask = hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
(void) spl0();
return (0);
}
@ -171,10 +173,10 @@ struct hpux_sigpause_args {
hpux_sigpause(p, uap, retval)
struct proc *p;
struct hpux_sigpause_args *uap;
int *retval;
register_t *retval;
{
uap->mask = hpuxtobsdmask(uap->mask);
SCARG(uap, mask) = hpuxtobsdmask(SCARG(uap, mask));
return (sigsuspend(p, uap, retval));
}
@ -186,13 +188,13 @@ struct hpux_kill_args {
hpux_kill(p, uap, retval)
struct proc *p;
struct hpux_kill_args *uap;
int *retval;
register_t *retval;
{
if (uap->signo) {
uap->signo = hpuxtobsdsig(uap->signo);
if (uap->signo == 0)
uap->signo = NSIG;
if (SCARG(uap, signo)) {
SCARG(uap, signo) = hpuxtobsdsig(SCARG(uap, signo));
if (SCARG(uap, signo) == 0)
SCARG(uap, signo) = NSIG;
}
return (kill(p, uap, retval));
}
@ -217,7 +219,7 @@ struct hpux_sigprocmask_args {
hpux_sigprocmask(p, uap, retval)
register struct proc *p;
struct hpux_sigprocmask_args *uap;
int *retval;
register_t *retval;
{
int mask, error = 0;
hpux_sigset_t sigset;
@ -226,18 +228,20 @@ hpux_sigprocmask(p, uap, retval)
* Copy out old mask first to ensure no errors.
* (proc sigmask should not be changed if call fails for any reason)
*/
if (uap->oset) {
if (SCARG(uap, oset)) {
bzero((caddr_t)&sigset, sizeof(sigset));
sigset.sigset[0] = bsdtohpuxmask(p->p_sigmask);
if (copyout((caddr_t)&sigset, (caddr_t)uap->oset, sizeof(sigset)))
if (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, oset),
sizeof(sigset)))
return (EFAULT);
}
if (uap->set) {
if (copyin((caddr_t)uap->set, (caddr_t)&sigset, sizeof(sigset)))
if (SCARG(uap, set)) {
if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset,
sizeof(sigset)))
return (EFAULT);
mask = hpuxtobsdmask(sigset.sigset[0]);
(void) splhigh();
switch (uap->how) {
switch (SCARG(uap, how)) {
case HPUXSIG_BLOCK:
p->p_sigmask |= mask &~ sigcantmask;
break;
@ -262,12 +266,13 @@ struct hpux_sigpending_args {
hpux_sigpending(p, uap, retval)
register struct proc *p;
struct hpux_sigpending_args *uap;
int *retval;
register_t *retval;
{
hpux_sigset_t sigset;
sigset.sigset[0] = bsdtohpuxmask(p->p_siglist);
return (copyout((caddr_t)&sigset, (caddr_t)uap->set, sizeof(sigset)));
return (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, set),
sizeof(sigset)));
}
struct hpux_sigsuspend_args {
@ -276,13 +281,13 @@ struct hpux_sigsuspend_args {
hpux_sigsuspend(p, uap, retval)
register struct proc *p;
struct hpux_sigsuspend_args *uap;
int *retval;
register_t *retval;
{
register struct sigacts *ps = p->p_sigacts;
hpux_sigset_t sigset;
int mask;
if (copyin((caddr_t)uap->set, (caddr_t)&sigset, sizeof(sigset)))
if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset, sizeof(sigset)))
return (EFAULT);
mask = hpuxtobsdmask(sigset.sigset[0]);
ps->ps_oldmask = p->p_sigmask;
@ -301,7 +306,7 @@ struct hpux_sigaction_args {
hpux_sigaction(p, uap, retval)
struct proc *p;
register struct hpux_sigaction_args *uap;
int *retval;
register_t *retval;
{
struct hpux_sigaction action;
register struct sigacts *ps = p->p_sigacts;
@ -309,12 +314,12 @@ hpux_sigaction(p, uap, retval)
register int sig;
int bit;
sig = hpuxtobsdsig(uap->signo);
sig = hpuxtobsdsig(SCARG(uap, signo));
if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
return (EINVAL);
sa = &action;
if (uap->osa) {
if (SCARG(uap, osa)) {
sa->sa_handler = ps->ps_sigact[sig];
bzero((caddr_t)&sa->sa_mask, sizeof(sa->sa_mask));
sa->sa_mask.sigset[0] = bsdtohpuxmask(ps->ps_catchmask[sig]);
@ -329,13 +334,15 @@ hpux_sigaction(p, uap, retval)
#endif
if (p->p_flag & P_NOCLDSTOP)
sa->sa_flags |= HPUXSA_NOCLDSTOP;
if (copyout((caddr_t)sa, (caddr_t)uap->osa, sizeof (action)))
if (copyout((caddr_t)sa, (caddr_t)SCARG(uap, osa),
sizeof (action)))
return (EFAULT);
}
if (uap->nsa) {
if (SCARG(uap, nsa)) {
struct sigaction act;
if (copyin((caddr_t)uap->nsa, (caddr_t)sa, sizeof (action)))
if (copyin((caddr_t)SCARG(uap, nsa), (caddr_t)sa,
sizeof (action)))
return (EFAULT);
if (sig == SIGCONT && sa->sa_handler == SIG_IGN)
return (EINVAL);
@ -367,14 +374,14 @@ struct ohpux_ssig_args {
ohpux_ssig(p, uap, retval)
struct proc *p;
struct ohpux_ssig_args *uap;
int *retval;
register_t *retval;
{
register int a;
struct sigaction vec;
register struct sigaction *sa = &vec;
a = hpuxtobsdsig(uap->signo);
sa->sa_handler = uap->fun;
a = hpuxtobsdsig(SCARG(uap, signo));
sa->sa_handler = SCARG(uap, fun);
/*
* Kill processes trying to use job control facilities
* (this'll help us find any vestiges of the old stuff).

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: hpux_tty.c 1.14 93/08/05$
*
* from: @(#)hpux_tty.c 8.3 (Berkeley) 1/12/94
* $Id: hpux_tty.c,v 1.6 1994/05/23 08:04:26 mycroft Exp $
* $Id: hpux_tty.c,v 1.7 1994/10/20 04:47:36 cgd Exp $
*/
/*
@ -470,19 +470,21 @@ struct ohpux_sgtty_args {
ohpux_gtty(p, uap, retval)
struct proc *p;
struct ohpux_sgtty_args *uap;
int *retval;
register_t *retval;
{
return (getsettty(p, uap->fdes, HPUXTIOCGETP, uap->cmarg));
return (getsettty(p, SCARG(uap, fdes), HPUXTIOCGETP,
SCARG(uap, cmarg)));
}
ohpux_stty(p, uap, retval)
struct proc *p;
struct ohpux_sgtty_args *uap;
int *retval;
register_t *retval;
{
return (getsettty(p, uap->fdes, HPUXTIOCSETP, uap->cmarg));
return (getsettty(p, SCARG(uap, fdes), HPUXTIOCSETP,
SCARG(uap, cmarg)));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: sun_ioctl.c,v 1.11 1994/06/29 06:30:16 cgd Exp $ */
/* $NetBSD: sun_ioctl.c,v 1.12 1994/10/20 04:47:43 cgd Exp $ */
/*
* Copyright (c) 1993 Markus Wild.
@ -388,7 +388,7 @@ int
sun_ioctl(p, uap, retval)
register struct proc *p;
register struct sun_ioctl_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sun_misc.c,v 1.31 1994/09/28 00:41:28 deraadt Exp $ */
/* $NetBSD: sun_misc.c,v 1.32 1994/10/20 04:47:46 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -101,7 +101,7 @@ struct sun_wait4_args {
sun_wait4(p, uap, retval)
struct proc *p;
struct sun_wait4_args *uap;
int *retval;
register_t *retval;
{
if (uap->pid == 0)
@ -116,7 +116,7 @@ struct sun_creat_args {
sun_creat(p, uap, retval)
struct proc *p;
struct sun_creat_args *uap;
int *retval;
register_t *retval;
{
struct args {
char *fname;
@ -138,7 +138,7 @@ struct sun_execv_args {
sun_execv(p, uap, retval)
struct proc *p;
struct sun_execv_args *uap;
int *retval;
register_t *retval;
{
uap->envp = NULL;
@ -153,7 +153,7 @@ struct sun_omsync_args {
sun_omsync(p, uap, retval)
struct proc *p;
struct sun_omsync_args *uap;
int *retval;
register_t *retval;
{
if (uap->flags)
@ -168,7 +168,7 @@ struct sun_unmount_args {
sun_unmount(p, uap, retval)
struct proc *p;
struct sun_unmount_args *uap;
int *retval;
register_t *retval;
{
uap->flags = 0;
@ -210,7 +210,7 @@ struct sun_mount_args {
sun_mount(p, uap, retval)
struct proc *p;
struct sun_mount_args *uap;
int *retval;
register_t *retval;
{
int oflags = uap->flags, nflags, error;
extern char sigcode[], esigcode[];
@ -275,7 +275,7 @@ sun_mount(p, uap, retval)
async_daemon(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args {
int flag;
@ -293,7 +293,7 @@ struct sun_sigpending_args {
sun_sigpending(p, uap, retval)
struct proc *p;
struct sun_sigpending_args *uap;
int *retval;
register_t *retval;
{
int mask = p->p_siglist & p->p_sigmask;
@ -328,7 +328,7 @@ struct sun_getdents_args {
sun_getdents(p, uap, retval)
struct proc *p;
register struct sun_getdents_args *uap;
int *retval;
register_t *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -436,7 +436,7 @@ struct sun_mmap_args {
sun_mmap(p, uap, retval)
register struct proc *p;
register struct sun_mmap_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp;
register struct file *fp;
@ -490,7 +490,7 @@ struct sun_mctl_args {
sun_mctl(p, uap, retval)
register struct proc *p;
register struct sun_mctl_args *uap;
int *retval;
register_t *retval;
{
switch (uap->func) {
@ -516,7 +516,7 @@ struct sun_setsockopt_args {
sun_setsockopt(p, uap, retval)
struct proc *p;
register struct sun_setsockopt_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
@ -557,7 +557,7 @@ struct sun_fchroot_args {
sun_fchroot(p, uap, retval)
register struct proc *p;
register struct sun_fchroot_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct vnode *vp;
@ -607,7 +607,7 @@ struct sun_uname_args {
sun_uname(p, uap, retval)
struct proc *p;
struct sun_uname_args *uap;
int *retval;
register_t *retval;
{
struct sun_utsname sut;
extern char ostype[], machine[], osrelease[];
@ -632,7 +632,7 @@ int
sun_setpgid(p, uap, retval)
struct proc *p;
struct sun_setpgid_args *uap;
int *retval;
register_t *retval;
{
/*
* difference to our setpgid call is to include backwards
@ -654,7 +654,7 @@ struct sun_open_args {
sun_open(p, uap, retval)
struct proc *p;
struct sun_open_args *uap;
int *retval;
register_t *retval;
{
int l, r;
int noctty = uap->fmode & 0x8000;
@ -696,7 +696,7 @@ struct sun_nfssvc_args {
sun_nfssvc(p, uap, retval)
struct proc *p;
struct sun_nfssvc_args *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args outuap;
struct sockaddr sa;
@ -733,7 +733,7 @@ struct sun_ustat_args {
sun_ustat(p, uap, retval)
struct proc *p;
struct sun_ustat_args *uap;
int *retval;
register_t *retval;
{
struct sun_ustat us;
int error;
@ -759,7 +759,7 @@ struct sun_quotactl_args {
sun_quotactl(p, uap, retval)
struct proc *p;
struct sun_quotactl_args *uap;
int *retval;
register_t *retval;
{
return EINVAL;
}
@ -767,7 +767,7 @@ sun_quotactl(p, uap, retval)
sun_vhangup(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
return 0;
}
@ -809,7 +809,7 @@ struct sun_statfs_args {
sun_statfs(p, uap, retval)
struct proc *p;
struct sun_statfs_args *uap;
int *retval;
register_t *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -835,7 +835,7 @@ struct sun_fstatfs_args {
sun_fstatfs(p, uap, retval)
struct proc *p;
struct sun_fstatfs_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -859,7 +859,7 @@ struct sun_exportfs_args {
sun_exportfs(p, uap, retval)
struct proc *p;
struct sun_exportfs_args *uap;
int *retval;
register_t *retval;
{
/*
* XXX: should perhaps translate into a mount(2)
@ -877,7 +877,7 @@ struct sun_mknod_args {
sun_mknod(p, uap, retval)
struct proc *p;
struct sun_mknod_args *uap;
int *retval;
register_t *retval;
{
if (S_ISFIFO(uap->fmode))
return mkfifo(p, uap, retval);
@ -901,7 +901,7 @@ struct sun_sysconf_args {
sun_sysconf(p, uap, retval)
struct proc *p;
struct sun_sysconf_args *uap;
int *retval;
register_t *retval;
{
extern int maxfiles;
@ -951,7 +951,7 @@ struct sun_getrlimit_args {
sun_getrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;
@ -970,7 +970,7 @@ struct sun_setrlimit_args {
sun_setrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunos_ioctl.c,v 1.11 1994/06/29 06:30:16 cgd Exp $ */
/* $NetBSD: sunos_ioctl.c,v 1.12 1994/10/20 04:47:43 cgd Exp $ */
/*
* Copyright (c) 1993 Markus Wild.
@ -388,7 +388,7 @@ int
sun_ioctl(p, uap, retval)
register struct proc *p;
register struct sun_ioctl_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunos_misc.c,v 1.31 1994/09/28 00:41:28 deraadt Exp $ */
/* $NetBSD: sunos_misc.c,v 1.32 1994/10/20 04:47:46 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -101,7 +101,7 @@ struct sun_wait4_args {
sun_wait4(p, uap, retval)
struct proc *p;
struct sun_wait4_args *uap;
int *retval;
register_t *retval;
{
if (uap->pid == 0)
@ -116,7 +116,7 @@ struct sun_creat_args {
sun_creat(p, uap, retval)
struct proc *p;
struct sun_creat_args *uap;
int *retval;
register_t *retval;
{
struct args {
char *fname;
@ -138,7 +138,7 @@ struct sun_execv_args {
sun_execv(p, uap, retval)
struct proc *p;
struct sun_execv_args *uap;
int *retval;
register_t *retval;
{
uap->envp = NULL;
@ -153,7 +153,7 @@ struct sun_omsync_args {
sun_omsync(p, uap, retval)
struct proc *p;
struct sun_omsync_args *uap;
int *retval;
register_t *retval;
{
if (uap->flags)
@ -168,7 +168,7 @@ struct sun_unmount_args {
sun_unmount(p, uap, retval)
struct proc *p;
struct sun_unmount_args *uap;
int *retval;
register_t *retval;
{
uap->flags = 0;
@ -210,7 +210,7 @@ struct sun_mount_args {
sun_mount(p, uap, retval)
struct proc *p;
struct sun_mount_args *uap;
int *retval;
register_t *retval;
{
int oflags = uap->flags, nflags, error;
extern char sigcode[], esigcode[];
@ -275,7 +275,7 @@ sun_mount(p, uap, retval)
async_daemon(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args {
int flag;
@ -293,7 +293,7 @@ struct sun_sigpending_args {
sun_sigpending(p, uap, retval)
struct proc *p;
struct sun_sigpending_args *uap;
int *retval;
register_t *retval;
{
int mask = p->p_siglist & p->p_sigmask;
@ -328,7 +328,7 @@ struct sun_getdents_args {
sun_getdents(p, uap, retval)
struct proc *p;
register struct sun_getdents_args *uap;
int *retval;
register_t *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -436,7 +436,7 @@ struct sun_mmap_args {
sun_mmap(p, uap, retval)
register struct proc *p;
register struct sun_mmap_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp;
register struct file *fp;
@ -490,7 +490,7 @@ struct sun_mctl_args {
sun_mctl(p, uap, retval)
register struct proc *p;
register struct sun_mctl_args *uap;
int *retval;
register_t *retval;
{
switch (uap->func) {
@ -516,7 +516,7 @@ struct sun_setsockopt_args {
sun_setsockopt(p, uap, retval)
struct proc *p;
register struct sun_setsockopt_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
@ -557,7 +557,7 @@ struct sun_fchroot_args {
sun_fchroot(p, uap, retval)
register struct proc *p;
register struct sun_fchroot_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct vnode *vp;
@ -607,7 +607,7 @@ struct sun_uname_args {
sun_uname(p, uap, retval)
struct proc *p;
struct sun_uname_args *uap;
int *retval;
register_t *retval;
{
struct sun_utsname sut;
extern char ostype[], machine[], osrelease[];
@ -632,7 +632,7 @@ int
sun_setpgid(p, uap, retval)
struct proc *p;
struct sun_setpgid_args *uap;
int *retval;
register_t *retval;
{
/*
* difference to our setpgid call is to include backwards
@ -654,7 +654,7 @@ struct sun_open_args {
sun_open(p, uap, retval)
struct proc *p;
struct sun_open_args *uap;
int *retval;
register_t *retval;
{
int l, r;
int noctty = uap->fmode & 0x8000;
@ -696,7 +696,7 @@ struct sun_nfssvc_args {
sun_nfssvc(p, uap, retval)
struct proc *p;
struct sun_nfssvc_args *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args outuap;
struct sockaddr sa;
@ -733,7 +733,7 @@ struct sun_ustat_args {
sun_ustat(p, uap, retval)
struct proc *p;
struct sun_ustat_args *uap;
int *retval;
register_t *retval;
{
struct sun_ustat us;
int error;
@ -759,7 +759,7 @@ struct sun_quotactl_args {
sun_quotactl(p, uap, retval)
struct proc *p;
struct sun_quotactl_args *uap;
int *retval;
register_t *retval;
{
return EINVAL;
}
@ -767,7 +767,7 @@ sun_quotactl(p, uap, retval)
sun_vhangup(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
return 0;
}
@ -809,7 +809,7 @@ struct sun_statfs_args {
sun_statfs(p, uap, retval)
struct proc *p;
struct sun_statfs_args *uap;
int *retval;
register_t *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -835,7 +835,7 @@ struct sun_fstatfs_args {
sun_fstatfs(p, uap, retval)
struct proc *p;
struct sun_fstatfs_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -859,7 +859,7 @@ struct sun_exportfs_args {
sun_exportfs(p, uap, retval)
struct proc *p;
struct sun_exportfs_args *uap;
int *retval;
register_t *retval;
{
/*
* XXX: should perhaps translate into a mount(2)
@ -877,7 +877,7 @@ struct sun_mknod_args {
sun_mknod(p, uap, retval)
struct proc *p;
struct sun_mknod_args *uap;
int *retval;
register_t *retval;
{
if (S_ISFIFO(uap->fmode))
return mkfifo(p, uap, retval);
@ -901,7 +901,7 @@ struct sun_sysconf_args {
sun_sysconf(p, uap, retval)
struct proc *p;
struct sun_sysconf_args *uap;
int *retval;
register_t *retval;
{
extern int maxfiles;
@ -951,7 +951,7 @@ struct sun_getrlimit_args {
sun_getrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;
@ -970,7 +970,7 @@ struct sun_setrlimit_args {
sun_setrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_ioctl.c,v 1.2 1994/06/29 06:30:33 cgd Exp $ */
/* $NetBSD: svr4_ioctl.c,v 1.3 1994/10/20 04:47:48 cgd Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@ -79,7 +79,7 @@ int
svr4_ioctl(p, uap, retval)
register struct proc *p;
register struct svr4_ioctl_args *uap;
int *retval;
register_t *retval;
{
char *dir;
char c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_misc.c,v 1.5 1994/06/29 06:30:35 cgd Exp $ */
/* $NetBSD: svr4_misc.c,v 1.6 1994/10/20 04:47:49 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -96,7 +96,7 @@ struct svr4_wait4_args {
svr4_wait4(p, uap, retval)
struct proc *p;
struct svr4_wait4_args *uap;
int *retval;
register_t *retval;
{
if (uap->pid == 0)
@ -110,7 +110,7 @@ struct svr4_wait_args {
svr4_wait(p, uap, retval)
struct proc *p;
struct svr4_wait_args *uap;
int *retval;
register_t *retval;
{
int err;
struct svr4_wait4_args w4;
@ -128,7 +128,7 @@ struct svr4_creat_args {
svr4_creat(p, uap, retval)
struct proc *p;
struct svr4_creat_args *uap;
int *retval;
register_t *retval;
{
struct args {
char *fname;
@ -150,7 +150,7 @@ struct svr4_execv_args {
svr4_execv(p, uap, retval)
struct proc *p;
struct svr4_execv_args *uap;
int *retval;
register_t *retval;
{
uap->envp = NULL;
@ -164,7 +164,7 @@ struct svr4_unmount_args {
svr4_unmount(p, uap, retval)
struct proc *p;
struct svr4_unmount_args *uap;
int *retval;
register_t *retval;
{
uap->flags = 0;
@ -207,7 +207,7 @@ struct svr4_mount_args {
svr4_mount(p, uap, retval)
struct proc *p;
struct svr4_mount_args *uap;
int *retval;
register_t *retval;
{
int oflags = uap->flags, nflags, error;
extern char sigcode[], esigcode[];
@ -272,7 +272,7 @@ struct svr4_sigpending_args {
svr4_sigpending(p, uap, retval)
struct proc *p;
struct svr4_sigpending_args *uap;
int *retval;
register_t *retval;
{
int mask = p->p_siglist & p->p_sigmask;
@ -302,7 +302,7 @@ struct svr4_getdents_args {
svr4_getdents(p, uap, retval)
struct proc *p;
register struct svr4_getdents_args *uap;
int *retval;
register_t *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -410,7 +410,7 @@ struct svr4_mmap_args {
svr4_mmap(p, uap, retval)
register struct proc *p;
register struct svr4_mmap_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp;
register struct file *fp;
@ -460,7 +460,7 @@ struct svr4_mctl_args {
svr4_mctl(p, uap, retval)
register struct proc *p;
register struct svr4_mctl_args *uap;
int *retval;
register_t *retval;
{
switch (uap->func) {
@ -482,7 +482,7 @@ struct svr4_fchroot_args {
svr4_fchroot(p, uap, retval)
register struct proc *p;
register struct svr4_fchroot_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct vnode *vp;
@ -531,7 +531,7 @@ struct svr4_uname_args {
svr4_uname(p, uap, retval)
struct proc *p;
struct svr4_uname_args *uap;
int *retval;
register_t *retval;
{
struct svr4_utsname sut;
extern struct utsname utsname;
@ -573,7 +573,7 @@ struct svr4_open_args {
svr4_open(p, uap, retval)
struct proc *p;
struct svr4_open_args *uap;
int *retval;
register_t *retval;
{
int l, r = 0;
int noctty = uap->fmode & 0x8000;
@ -625,7 +625,7 @@ struct svr4_nfssvc_args {
svr4_nfssvc(p, uap, retval)
struct proc *p;
struct svr4_nfssvc_args *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args outuap;
struct sockaddr sa;
@ -663,7 +663,7 @@ struct svr4_ustat_args {
svr4_ustat(p, uap, retval)
struct proc *p;
struct svr4_ustat_args *uap;
int *retval;
register_t *retval;
{
struct svr4_ustat us;
int error;
@ -689,7 +689,7 @@ struct svr4_quotactl_args {
svr4_quotactl(p, uap, retval)
struct proc *p;
struct svr4_quotactl_args *uap;
int *retval;
register_t *retval;
{
return EINVAL;
}
@ -733,7 +733,7 @@ struct svr4_statfs_args {
svr4_statfs(p, uap, retval)
struct proc *p;
struct svr4_statfs_args *uap;
int *retval;
register_t *retval;
{
register struct mount *mp;
register struct nameidata *ndp;
@ -763,7 +763,7 @@ struct svr4_fstatfs_args {
svr4_fstatfs(p, uap, retval)
struct proc *p;
struct svr4_fstatfs_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -788,7 +788,7 @@ struct svr4_exportfs_args {
svr4_exportfs(p, uap, retval)
struct proc *p;
struct svr4_exportfs_args *uap;
int *retval;
register_t *retval;
{
/*
* XXX: should perhaps translate into a mount(2)
@ -807,7 +807,7 @@ struct svr4_mknod_args {
svr4_mknod(p, uap, retval)
struct proc *p;
struct svr4_mknod_args *uap;
int *retval;
register_t *retval;
{
if (S_ISFIFO(uap->fmode))
return mkfifo(p, uap, retval);
@ -818,7 +818,7 @@ svr4_mknod(p, uap, retval)
svr4_vhangup(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
return 0;
}
@ -839,7 +839,7 @@ struct svr4_sysconfig_args {
svr4_sysconfig(p, uap, retval)
struct proc *p;
struct svr4_sysconfig_args *uap;
int *retval;
register_t *retval;
{
extern int maxfiles;
@ -888,7 +888,7 @@ struct svr4_getrlimit_args {
svr4_getrlimit(p, uap, retval)
struct proc *p;
struct svr4_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SVR4_RLIM_NLIMITS)
return EINVAL;
@ -908,7 +908,7 @@ struct svr4_setrlimit_args {
svr4_setrlimit(p, uap, retval)
struct proc *p;
struct svr4_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SVR4_RLIM_NLIMITS)
return EINVAL;
@ -978,7 +978,7 @@ struct svr4_stat_args {
svr4_stat(p, uap, retval)
struct proc *p;
struct svr4_stat_args *uap;
int *retval;
register_t *retval;
{
extern char sigcode[], esigcode[];
struct stat st;
@ -1010,7 +1010,7 @@ struct svr4_lstat_args {
svr4_lstat(p, uap, retval)
struct proc *p;
struct svr4_lstat_args *uap;
int *retval;
register_t *retval;
{
extern char sigcode[], esigcode[];
struct stat st;
@ -1042,7 +1042,7 @@ struct svr4_fstat_args {
svr4_fstat(p, uap, retval)
struct proc *p;
struct svr4_fstat_args *uap;
int *retval;
register_t *retval;
{
extern char sigcode[], esigcode[];
struct stat st;
@ -1070,7 +1070,7 @@ struct svr4_syssun_args {
svr4_syssun(p, uap, retval)
struct proc *p;
struct svr4_syssun_args *uap;
int *retval;
register_t *retval;
{
#ifdef DEBUG_SVR4
printf("syssun(%d)\n", uap->gate);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_misc.c,v 1.6 1994/08/01 14:15:08 glass Exp $ */
/* $NetBSD: ultrix_misc.c,v 1.7 1994/10/20 04:47:51 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -147,7 +147,7 @@ struct ultrix_waitpid_args {
ultrix_waitpid(p, uap, retval)
struct proc *p;
struct ultrix_waitpid_args *uap;
int *retval;
register_t *retval;
{
uap->rusage = 0;
@ -163,7 +163,7 @@ struct sun_wait4_args {
sun_wait4(p, uap, retval)
struct proc *p;
struct sun_wait4_args *uap;
int *retval;
register_t *retval;
{
if (uap->pid == 0)
@ -180,7 +180,7 @@ struct sun_wait3_args {
sun_wait3(p, uap, retval)
struct proc *p;
struct sun_wait3_args *uap;
int *retval;
register_t *retval;
{
struct sun_wait4_args ua;
@ -201,7 +201,7 @@ struct sun_creat_args {
sun_creat(p, uap, retval)
struct proc *p;
struct sun_creat_args *uap;
int *retval;
register_t *retval;
{
struct args {
char *fname;
@ -223,7 +223,7 @@ struct sun_execv_args {
sun_execv(p, uap, retval)
struct proc *p;
struct sun_execv_args *uap;
int *retval;
register_t *retval;
{
uap->envp = NULL;
@ -238,7 +238,7 @@ struct sun_omsync_args {
sun_omsync(p, uap, retval)
struct proc *p;
struct sun_omsync_args *uap;
int *retval;
register_t *retval;
{
if (uap->flags)
@ -253,7 +253,7 @@ struct sun_unmount_args {
sun_unmount(p, uap, retval)
struct proc *p;
struct sun_unmount_args *uap;
int *retval;
register_t *retval;
{
uap->flags = 0;
@ -295,7 +295,7 @@ struct sun_mount_args {
sun_mount(p, uap, retval)
struct proc *p;
struct sun_mount_args *uap;
int *retval;
register_t *retval;
{
int oflags = uap->flags, nflags, error;
extern char sigcode[], esigcode[];
@ -359,7 +359,7 @@ sun_mount(p, uap, retval)
async_daemon(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args {
int flag;
@ -377,7 +377,7 @@ struct sun_sigpending_args {
sun_sigpending(p, uap, retval)
struct proc *p;
struct sun_sigpending_args *uap;
int *retval;
register_t *retval;
{
int mask = p->p_siglist & p->p_sigmask;
@ -422,7 +422,7 @@ struct sun_getdents_args {
sun_getdents(p, uap, retval)
struct proc *p;
register struct sun_getdents_args *uap;
int *retval;
register_t *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -530,7 +530,7 @@ struct sun_mmap_args {
sun_mmap(p, uap, retval)
register struct proc *p;
register struct sun_mmap_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp;
register struct file *fp;
@ -584,7 +584,7 @@ struct sun_mctl_args {
sun_mctl(p, uap, retval)
register struct proc *p;
register struct sun_mctl_args *uap;
int *retval;
register_t *retval;
{
switch (uap->func) {
@ -610,7 +610,7 @@ struct sun_setsockopt_args {
sun_setsockopt(p, uap, retval)
struct proc *p;
register struct sun_setsockopt_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mbuf *m = NULL;
@ -651,7 +651,7 @@ struct sun_fchroot_args {
sun_fchroot(p, uap, retval)
register struct proc *p;
register struct sun_fchroot_args *uap;
int *retval;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct vnode *vp;
@ -701,7 +701,7 @@ struct sun_uname_args {
sun_uname(p, uap, retval)
struct proc *p;
struct sun_uname_args *uap;
int *retval;
register_t *retval;
{
struct sun_utsname sut;
extern char ostype[], machine[], osrelease[];
@ -726,7 +726,7 @@ int
sun_setpgid(p, uap, retval)
struct proc *p;
struct sun_setpgid_args *uap;
int *retval;
register_t *retval;
{
/*
* difference to our setpgid call is to include backwards
@ -748,7 +748,7 @@ struct sun_open_args {
sun_open(p, uap, retval)
struct proc *p;
struct sun_open_args *uap;
int *retval;
register_t *retval;
{
int l, r;
int noctty = uap->fmode & 0x8000;
@ -790,7 +790,7 @@ struct sun_nfssvc_args {
sun_nfssvc(p, uap, retval)
struct proc *p;
struct sun_nfssvc_args *uap;
int *retval;
register_t *retval;
{
struct nfssvc_args outuap;
struct sockaddr sa;
@ -827,7 +827,7 @@ struct sun_ustat_args {
sun_ustat(p, uap, retval)
struct proc *p;
struct sun_ustat_args *uap;
int *retval;
register_t *retval;
{
struct sun_ustat us;
int error;
@ -853,7 +853,7 @@ struct sun_quotactl_args {
sun_quotactl(p, uap, retval)
struct proc *p;
struct sun_quotactl_args *uap;
int *retval;
register_t *retval;
{
return EINVAL;
}
@ -861,7 +861,7 @@ sun_quotactl(p, uap, retval)
sun_vhangup(p, uap, retval)
struct proc *p;
void *uap;
int *retval;
register_t *retval;
{
return 0;
}
@ -903,7 +903,7 @@ struct sun_statfs_args {
sun_statfs(p, uap, retval)
struct proc *p;
struct sun_statfs_args *uap;
int *retval;
register_t *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -929,7 +929,7 @@ struct sun_fstatfs_args {
sun_fstatfs(p, uap, retval)
struct proc *p;
struct sun_fstatfs_args *uap;
int *retval;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -953,7 +953,7 @@ struct sun_exportfs_args {
sun_exportfs(p, uap, retval)
struct proc *p;
struct sun_exportfs_args *uap;
int *retval;
register_t *retval;
{
/*
* XXX: should perhaps translate into a mount(2)
@ -971,7 +971,7 @@ struct sun_mknod_args {
sun_mknod(p, uap, retval)
struct proc *p;
struct sun_mknod_args *uap;
int *retval;
register_t *retval;
{
if (S_ISFIFO(uap->fmode))
return mkfifo(p, uap, retval);
@ -995,7 +995,7 @@ struct sun_sysconf_args {
sun_sysconf(p, uap, retval)
struct proc *p;
struct sun_sysconf_args *uap;
int *retval;
register_t *retval;
{
extern int maxfiles;
@ -1045,7 +1045,7 @@ struct sun_getrlimit_args {
sun_getrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;
@ -1064,7 +1064,7 @@ struct sun_setrlimit_args {
sun_setrlimit(p, uap, retval)
struct proc *p;
struct sun_getrlimit_args *uap;
int *retval;
register_t *retval;
{
if (uap->which >= SUN_RLIM_NLIMITS)
return EINVAL;