Make system calls conform to a standard prototype and bring those
prototypes into scope.
This commit is contained in:
parent
1f5a887dbf
commit
60024eb978
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_acct.c,v 1.39 1995/03/21 13:33:46 mycroft Exp $ */
|
||||
/* $NetBSD: kern_acct.c,v 1.40 1995/09/19 21:44:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
|
@ -95,13 +95,14 @@ int acctchkfreq = 15; /* frequency (in seconds) to check space */
|
|||
* previous implementation done by Mark Tinguely.
|
||||
*/
|
||||
int
|
||||
acct(p, uap, retval)
|
||||
acct(p, v, retval)
|
||||
struct proc *p;
|
||||
struct acct_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct acct_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
struct nameidata nd;
|
||||
int error;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_descrip.c,v 1.35 1995/06/24 20:33:55 christos Exp $ */
|
||||
/* $NetBSD: kern_descrip.c,v 1.36 1995/09/19 21:44:55 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
|
@ -104,13 +104,14 @@ fd_unused(fdp, fd)
|
|||
* Duplicate a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
dup(p, uap, retval)
|
||||
dup(p, v, retval)
|
||||
struct proc *p;
|
||||
struct dup_args /* {
|
||||
syscallarg(u_int) fd;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct dup_args /* {
|
||||
syscallarg(u_int) fd;
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register int old = SCARG(uap, fd);
|
||||
int new;
|
||||
|
@ -127,14 +128,15 @@ dup(p, uap, retval)
|
|||
* Duplicate a file descriptor to a particular value.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
dup2(p, uap, retval)
|
||||
dup2(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct dup2_args /* {
|
||||
syscallarg(u_int) from;
|
||||
syscallarg(u_int) to;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register int old = SCARG(uap, from), new = SCARG(uap, to);
|
||||
int i, error;
|
||||
|
@ -162,15 +164,16 @@ dup2(p, uap, retval)
|
|||
* The file control system call.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fcntl(p, uap, retval)
|
||||
fcntl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fcntl_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(void *) arg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int fd = SCARG(uap, fd);
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register struct file *fp;
|
||||
|
@ -356,13 +359,14 @@ fdrelease(p, fd)
|
|||
* Close a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
close(p, uap, retval)
|
||||
close(p, v, retval)
|
||||
struct proc *p;
|
||||
struct close_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct close_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap = v;
|
||||
int fd = SCARG(uap, fd);
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
|
||||
|
@ -375,14 +379,15 @@ close(p, uap, retval)
|
|||
* Return status information about a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fstat(p, uap, retval)
|
||||
fstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fstat_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(struct stat *) sb;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int fd = SCARG(uap, fd);
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register struct file *fp;
|
||||
|
@ -416,14 +421,15 @@ fstat(p, uap, retval)
|
|||
* Return pathconf information about a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fpathconf(p, uap, retval)
|
||||
fpathconf(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fpathconf_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) name;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int fd = SCARG(uap, fd);
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp;
|
||||
|
@ -741,14 +747,15 @@ closef(fp, p)
|
|||
* the entire file (l_whence = SEEK_SET, l_start = 0, l_len = 0).
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
flock(p, uap, retval)
|
||||
flock(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct flock_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) how;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int fd = SCARG(uap, fd);
|
||||
int how = SCARG(uap, how);
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exec.c,v 1.70 1995/07/19 15:19:08 christos Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.71 1995/09/19 21:44:57 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1993, 1994 Christopher G. Demetriou
|
||||
|
@ -200,15 +200,16 @@ bad1:
|
|||
* exec system call
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
execve(p, uap, retval)
|
||||
execve(p, v, retval)
|
||||
register struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct execve_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(char * *) argp;
|
||||
syscallarg(char * *) envp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error, i;
|
||||
struct exec_package pack;
|
||||
struct nameidata nid;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exit.c,v 1.30 1995/06/24 20:33:59 christos Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.31 1995/09/19 21:44:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
|
@ -68,24 +68,26 @@
|
|||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
__dead void cpu_exit __P((struct proc *)) __attribute__((noreturn));
|
||||
__dead void exit1 __P((struct proc *, int)) __attribute__((noreturn));
|
||||
void cpu_exit __P((struct proc *)); /* XXX MOVE ME */
|
||||
void exit1 __P((struct proc *, int));
|
||||
|
||||
/*
|
||||
* exit --
|
||||
* Death of process.
|
||||
*/
|
||||
__dead void
|
||||
exit(p, uap, retval)
|
||||
int
|
||||
exit(p, v, retval)
|
||||
struct proc *p;
|
||||
struct exit_args /* {
|
||||
syscallarg(int) rval;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
int *retval;
|
||||
{
|
||||
struct exit_args /* {
|
||||
syscallarg(int) rval;
|
||||
} */ *uap = v;
|
||||
|
||||
exit1(p, W_EXITCODE(SCARG(uap, rval), 0));
|
||||
/* NOTREACHED */
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -93,7 +95,7 @@ exit(p, uap, retval)
|
|||
* to zombie, and unlink proc from allproc and parent's lists. Save exit
|
||||
* status and rusage for wait(). Check for child processes and orphan them.
|
||||
*/
|
||||
__dead void
|
||||
void
|
||||
exit1(p, rv)
|
||||
register struct proc *p;
|
||||
int rv;
|
||||
|
@ -267,16 +269,17 @@ exit1(p, rv)
|
|||
}
|
||||
|
||||
int
|
||||
wait4(q, uap, retval, compat)
|
||||
wait4(q, v, retval)
|
||||
register struct proc *q;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct wait4_args /* {
|
||||
syscallarg(int) pid;
|
||||
syscallarg(int *) status;
|
||||
syscallarg(int) options;
|
||||
syscallarg(struct rusage *) rusage;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register int nfound;
|
||||
register struct proc *p, *t;
|
||||
int status, error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_ktrace.c,v 1.18 1995/07/19 15:19:13 christos Exp $ */
|
||||
/* $NetBSD: kern_ktrace.c,v 1.19 1995/09/19 21:45:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -252,16 +252,17 @@ ktrcsw(vp, out, user)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
ktrace(curp, uap, retval)
|
||||
ktrace(curp, v, retval)
|
||||
struct proc *curp;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct ktrace_args /* {
|
||||
syscallarg(char *) fname;
|
||||
syscallarg(int) ops;
|
||||
syscallarg(int) facs;
|
||||
syscallarg(int) pid;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp = NULL;
|
||||
register struct proc *p;
|
||||
struct pgrp *pg;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_prot.c,v 1.28 1995/06/24 20:34:00 christos Exp $ */
|
||||
/* $NetBSD: kern_prot.c,v 1.29 1995/09/19 21:45:02 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
|
||||
|
@ -147,14 +147,15 @@ getegid(p, uap, retval)
|
|||
return (0);
|
||||
}
|
||||
|
||||
getgroups(p, uap, retval)
|
||||
getgroups(p, v, retval)
|
||||
struct proc *p;
|
||||
register struct getgroups_args /* {
|
||||
syscallarg(u_int) gidsetsize;
|
||||
syscallarg(gid_t *) gidset;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getgroups_args /* {
|
||||
syscallarg(u_int) gidsetsize;
|
||||
syscallarg(gid_t *) gidset;
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register u_int ngrp;
|
||||
int error;
|
||||
|
@ -203,14 +204,15 @@ setsid(p, uap, retval)
|
|||
* pid must not be session leader (EPERM)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
setpgid(curp, uap, retval)
|
||||
setpgid(curp, v, retval)
|
||||
struct proc *curp;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct setpgid_args /* {
|
||||
syscallarg(int) pid;
|
||||
syscallarg(int) pgid;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct proc *targp; /* target process */
|
||||
register struct pgrp *pgrp; /* target pgrp */
|
||||
|
||||
|
@ -240,13 +242,14 @@ setpgid(curp, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
setuid(p, uap, retval)
|
||||
setuid(p, v, retval)
|
||||
struct proc *p;
|
||||
struct setuid_args /* {
|
||||
syscallarg(uid_t) uid;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct setuid_args /* {
|
||||
syscallarg(uid_t) uid;
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register uid_t uid;
|
||||
int error;
|
||||
|
@ -275,13 +278,14 @@ setuid(p, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
seteuid(p, uap, retval)
|
||||
seteuid(p, v, retval)
|
||||
struct proc *p;
|
||||
struct seteuid_args /* {
|
||||
syscallarg(uid_t) euid;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct seteuid_args /* {
|
||||
syscallarg(uid_t) euid;
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register uid_t euid;
|
||||
int error;
|
||||
|
@ -305,13 +309,14 @@ seteuid(p, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
setgid(p, uap, retval)
|
||||
setgid(p, v, retval)
|
||||
struct proc *p;
|
||||
struct setgid_args /* {
|
||||
syscallarg(gid_t) gid;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct setgid_args /* {
|
||||
syscallarg(gid_t) gid;
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register gid_t gid;
|
||||
int error;
|
||||
|
@ -332,13 +337,14 @@ setgid(p, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
setegid(p, uap, retval)
|
||||
setegid(p, v, retval)
|
||||
struct proc *p;
|
||||
struct setegid_args /* {
|
||||
syscallarg(gid_t) egid;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct setegid_args /* {
|
||||
syscallarg(gid_t) egid;
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register gid_t egid;
|
||||
int error;
|
||||
|
@ -358,14 +364,15 @@ setegid(p, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
setgroups(p, uap, retval)
|
||||
setgroups(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct setgroups_args /* {
|
||||
syscallarg(u_int) gidsetsize;
|
||||
syscallarg(gid_t *) gidset;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct pcred *pc = p->p_cred;
|
||||
register u_int ngrp;
|
||||
int error;
|
||||
|
@ -486,14 +493,15 @@ crdup(cr)
|
|||
* Get login name, if available.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
getlogin(p, uap, retval)
|
||||
getlogin(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct getlogin_args /* {
|
||||
syscallarg(char *) namebuf;
|
||||
syscallarg(u_int) namelen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
|
||||
if (SCARG(uap, namelen) > sizeof (p->p_pgrp->pg_session->s_login))
|
||||
SCARG(uap, namelen) = sizeof (p->p_pgrp->pg_session->s_login);
|
||||
|
@ -505,13 +513,14 @@ getlogin(p, uap, retval)
|
|||
* Set login name.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
setlogin(p, uap, retval)
|
||||
setlogin(p, v, retval)
|
||||
struct proc *p;
|
||||
struct setlogin_args /* {
|
||||
syscallarg(char *) namebuf;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct setlogin_args /* {
|
||||
syscallarg(char *) namebuf;
|
||||
} */ *uap = v;
|
||||
int error;
|
||||
|
||||
if (error = suser(p->p_ucred, &p->p_acflag))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_resource.c,v 1.29 1995/06/24 20:34:03 christos Exp $ */
|
||||
/* $NetBSD: kern_resource.c,v 1.30 1995/09/19 21:45:04 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
|
@ -61,14 +61,15 @@ int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp));
|
|||
*/
|
||||
|
||||
int
|
||||
getpriority(curp, uap, retval)
|
||||
getpriority(curp, v, retval)
|
||||
struct proc *curp;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getpriority_args /* {
|
||||
syscallarg(int) which;
|
||||
syscallarg(int) who;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct proc *p;
|
||||
register int low = PRIO_MAX + 1;
|
||||
|
||||
|
@ -118,15 +119,16 @@ getpriority(curp, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
setpriority(curp, uap, retval)
|
||||
setpriority(curp, v, retval)
|
||||
struct proc *curp;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct setpriority_args /* {
|
||||
syscallarg(int) which;
|
||||
syscallarg(int) who;
|
||||
syscallarg(int) prio;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct proc *p;
|
||||
int found = 0, error = 0;
|
||||
|
||||
|
@ -200,14 +202,15 @@ donice(curp, chgp, n)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
setrlimit(p, uap, retval)
|
||||
setrlimit(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct setrlimit_args /* {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct rlimit *) rlp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct rlimit alim;
|
||||
int error;
|
||||
|
||||
|
@ -303,14 +306,15 @@ dosetrlimit(p, which, limp)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getrlimit(p, uap, retval)
|
||||
getrlimit(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getrlimit_args /* {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct rlimit *) rlp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
|
||||
if (SCARG(uap, which) >= RLIM_NLIMITS)
|
||||
return (EINVAL);
|
||||
|
@ -377,14 +381,15 @@ calcru(p, up, sp, ip)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getrusage(p, uap, retval)
|
||||
getrusage(p, v, retval)
|
||||
register struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getrusage_args /* {
|
||||
syscallarg(int) who;
|
||||
syscallarg(struct rusage *) rusage;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct rusage *rup;
|
||||
|
||||
switch (SCARG(uap, who)) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_sig.c,v 1.47 1995/08/14 06:07:55 mycroft Exp $ */
|
||||
/* $NetBSD: kern_sig.c,v 1.48 1995/09/19 21:45:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
|
@ -82,15 +82,16 @@ void stop __P((struct proc *p));
|
|||
((signum) == SIGCONT && (q)->p_session == (p)->p_session))
|
||||
|
||||
/* ARGSUSED */
|
||||
sigaction(p, uap, retval)
|
||||
sigaction(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct sigaction_args /* {
|
||||
syscallarg(int) signum;
|
||||
syscallarg(struct sigaction *) nsa;
|
||||
syscallarg(struct sigaction *) osa;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct sigaction vec;
|
||||
register struct sigaction *sa;
|
||||
register struct sigacts *ps = p->p_sigacts;
|
||||
|
@ -256,14 +257,15 @@ execsigs(p)
|
|||
* and return old mask as return value;
|
||||
* the library stub does the rest.
|
||||
*/
|
||||
sigprocmask(p, uap, retval)
|
||||
sigprocmask(p, v, retval)
|
||||
register struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct sigprocmask_args /* {
|
||||
syscallarg(int) how;
|
||||
syscallarg(sigset_t) mask;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error = 0;
|
||||
|
||||
*retval = p->p_sigmask;
|
||||
|
@ -308,13 +310,14 @@ sigpending(p, uap, retval)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
sigsuspend(p, uap, retval)
|
||||
sigsuspend(p, v, retval)
|
||||
register struct proc *p;
|
||||
struct sigsuspend_args /* {
|
||||
syscallarg(int) mask;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct sigsuspend_args /* {
|
||||
syscallarg(int) mask;
|
||||
} */ *uap = v;
|
||||
register struct sigacts *ps = p->p_sigacts;
|
||||
|
||||
/*
|
||||
|
@ -334,14 +337,15 @@ sigsuspend(p, uap, retval)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
sigaltstack(p, uap, retval)
|
||||
sigaltstack(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct sigaltstack_args /* {
|
||||
syscallarg(struct sigaltstack *) nss;
|
||||
syscallarg(struct sigaltstack *) oss;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct sigacts *psp;
|
||||
struct sigaltstack ss;
|
||||
int error;
|
||||
|
@ -373,14 +377,15 @@ sigaltstack(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
kill(cp, uap, retval)
|
||||
kill(cp, v, retval)
|
||||
register struct proc *cp;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct kill_args /* {
|
||||
syscallarg(int) pid;
|
||||
syscallarg(int) signum;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct proc *p;
|
||||
register struct pcred *pc = cp->p_cred;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_sysctl.c,v 1.10 1995/08/04 18:36:11 thorpej Exp $ */
|
||||
/* $NetBSD: kern_sysctl.c,v 1.11 1995/09/19 21:45:07 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -80,8 +80,11 @@ static struct sysctl_lock {
|
|||
} memlock;
|
||||
|
||||
int
|
||||
__sysctl(p, uap, retval)
|
||||
__sysctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct __sysctl_args /* {
|
||||
syscallarg(int *) name;
|
||||
syscallarg(u_int) namelen;
|
||||
|
@ -89,9 +92,7 @@ __sysctl(p, uap, retval)
|
|||
syscallarg(size_t *) oldlenp;
|
||||
syscallarg(void *) new;
|
||||
syscallarg(size_t) newlen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error, dolock = 1;
|
||||
size_t savelen, oldlen = 0;
|
||||
sysctlfn *fn;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_time.c,v 1.14 1995/03/21 13:33:41 mycroft Exp $ */
|
||||
/* $NetBSD: kern_time.c,v 1.15 1995/09/19 21:45:09 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -59,14 +59,15 @@
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
gettimeofday(p, uap, retval)
|
||||
gettimeofday(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct gettimeofday_args /* {
|
||||
syscallarg(struct timeval *) tp;
|
||||
syscallarg(struct timezone *) tzp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct timeval atv;
|
||||
int error = 0;
|
||||
|
||||
|
@ -84,14 +85,15 @@ gettimeofday(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
settimeofday(p, uap, retval)
|
||||
settimeofday(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct settimeofday_args /* {
|
||||
syscallarg(struct timeval *) tv;
|
||||
syscallarg(struct timezone *) tzp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct timeval atv, delta;
|
||||
struct timezone atz;
|
||||
int error, s;
|
||||
|
@ -130,14 +132,15 @@ long bigadj = 1000000; /* use 10x skew above bigadj us. */
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
adjtime(p, uap, retval)
|
||||
adjtime(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct adjtime_args /* {
|
||||
syscallarg(struct timeval *) delta;
|
||||
syscallarg(struct timeval *) olddelta;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct timeval atv;
|
||||
register long ndelta, ntickdelta, odelta;
|
||||
int s, error;
|
||||
|
@ -208,14 +211,15 @@ adjtime(p, uap, retval)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getitimer(p, uap, retval)
|
||||
getitimer(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getitimer_args /* {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct itimerval *) itv;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct itimerval aitv;
|
||||
int s;
|
||||
|
||||
|
@ -244,15 +248,16 @@ getitimer(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
setitimer(p, uap, retval)
|
||||
setitimer(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct setitimer_args /* {
|
||||
syscallarg(u_int) which;
|
||||
syscallarg(struct itimerval *) itv;
|
||||
syscallarg(struct itimerval *) oitv;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct itimerval aitv;
|
||||
register struct itimerval *itvp;
|
||||
int s, error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_xxx.c,v 1.27 1995/06/24 20:34:09 christos Exp $ */
|
||||
/* $NetBSD: kern_xxx.c,v 1.28 1995/09/19 21:45:10 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -48,13 +48,14 @@
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
reboot(p, uap, retval)
|
||||
reboot(p, v, retval)
|
||||
struct proc *p;
|
||||
struct reboot_args /* {
|
||||
syscallarg(int) opt;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct reboot_args /* {
|
||||
syscallarg(int) opt;
|
||||
} */ *uap = v;
|
||||
int error;
|
||||
|
||||
if (error = suser(p->p_ucred, &p->p_acflag))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_prof.c,v 1.5 1995/03/19 23:44:54 mycroft Exp $ */
|
||||
/* $NetBSD: subr_prof.c,v 1.6 1995/09/19 21:45:11 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -146,16 +146,17 @@ sysctl_doprof(name, namelen, oldp, oldlenp, newp, newlen, p)
|
|||
* 1.0 is represented as 0x10000. A scale factor of 0 turns off profiling.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
profil(p, uap, retval)
|
||||
profil(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct profil_args /* {
|
||||
syscallarg(caddr_t) samples;
|
||||
syscallarg(u_int) size;
|
||||
syscallarg(u_int) offset;
|
||||
syscallarg(u_int) scale;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct uprof *upp;
|
||||
int s;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sys_generic.c,v 1.19 1995/03/21 13:33:34 mycroft Exp $ */
|
||||
/* $NetBSD: sys_generic.c,v 1.20 1995/09/19 21:45:13 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -62,15 +62,16 @@
|
|||
* Read system call.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
read(p, uap, retval)
|
||||
read(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct read_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(char *) buf;
|
||||
syscallarg(u_int) nbyte;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct file *fp;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct uio auio;
|
||||
|
@ -119,15 +120,16 @@ read(p, uap, retval)
|
|||
/*
|
||||
* Scatter read system call.
|
||||
*/
|
||||
readv(p, uap, retval)
|
||||
readv(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct readv_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(struct iovec *) iovp;
|
||||
syscallarg(u_int) iovcnt;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct file *fp;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct uio auio;
|
||||
|
@ -208,15 +210,16 @@ done:
|
|||
/*
|
||||
* Write system call
|
||||
*/
|
||||
write(p, uap, retval)
|
||||
write(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct write_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(char *) buf;
|
||||
syscallarg(u_int) nbyte;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct file *fp;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct uio auio;
|
||||
|
@ -268,15 +271,16 @@ write(p, uap, retval)
|
|||
/*
|
||||
* Gather write system call
|
||||
*/
|
||||
writev(p, uap, retval)
|
||||
writev(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct writev_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(struct iovec *) iovp;
|
||||
syscallarg(u_int) iovcnt;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct file *fp;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct uio auio;
|
||||
|
@ -361,15 +365,16 @@ done:
|
|||
* Ioctl system call
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
ioctl(p, uap, retval)
|
||||
ioctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct ioctl_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(u_long) com;
|
||||
syscallarg(caddr_t) data;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct file *fp;
|
||||
register struct filedesc *fdp;
|
||||
register u_long com;
|
||||
|
@ -498,17 +503,18 @@ int selwait, nselcoll;
|
|||
/*
|
||||
* Select system call.
|
||||
*/
|
||||
select(p, uap, retval)
|
||||
select(p, v, retval)
|
||||
register struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct select_args /* {
|
||||
syscallarg(u_int) nd;
|
||||
syscallarg(fd_set *) in;
|
||||
syscallarg(fd_set *) ou;
|
||||
syscallarg(fd_set *) ex;
|
||||
syscallarg(struct timeval *) tv;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
fd_set ibits[3], obits[3];
|
||||
struct timeval atv;
|
||||
int s, ncoll, error = 0, timo;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sys_process.c,v 1.50 1995/08/13 09:05:59 mycroft Exp $ */
|
||||
/* $NetBSD: sys_process.c,v 1.51 1995/09/19 21:45:15 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -74,16 +74,17 @@
|
|||
* Process debugging system call.
|
||||
*/
|
||||
int
|
||||
ptrace(p, uap, retval)
|
||||
ptrace(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ptrace_args /* {
|
||||
syscallarg(int) req;
|
||||
syscallarg(pid_t) pid;
|
||||
syscallarg(caddr_t) addr;
|
||||
syscallarg(int) data;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct proc *t; /* target process */
|
||||
struct uio uio;
|
||||
struct iovec iov;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysv_msg.c,v 1.15 1995/06/24 20:34:11 christos Exp $ */
|
||||
/* $NetBSD: sysv_msg.c,v 1.16 1995/09/19 21:45:17 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation of SVID messages
|
||||
|
@ -118,15 +118,16 @@ msg_freehdr(msghdr)
|
|||
}
|
||||
|
||||
int
|
||||
msgctl(p, uap, retval)
|
||||
msgctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct msgctl_args /* {
|
||||
syscallarg(int) msqid;
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(struct msqid_ds *) buf;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int msqid = SCARG(uap, msqid);
|
||||
int cmd = SCARG(uap, cmd);
|
||||
struct msqid_ds *user_msqptr = SCARG(uap, buf);
|
||||
|
@ -251,14 +252,15 @@ msgctl(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
msgget(p, uap, retval)
|
||||
msgget(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct msgget_args /* {
|
||||
syscallarg(key_t) key;
|
||||
syscallarg(int) msgflg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int msqid, eval;
|
||||
int key = SCARG(uap, key);
|
||||
int msgflg = SCARG(uap, msgflg);
|
||||
|
@ -354,16 +356,17 @@ found:
|
|||
}
|
||||
|
||||
int
|
||||
msgsnd(p, uap, retval)
|
||||
msgsnd(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct msgsnd_args /* {
|
||||
syscallarg(int) msqid;
|
||||
syscallarg(void *) msgp;
|
||||
syscallarg(size_t) msgsz;
|
||||
syscallarg(int) msgflg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int msqid = SCARG(uap, msqid);
|
||||
char *user_msgp = SCARG(uap, msgp);
|
||||
size_t msgsz = SCARG(uap, msgsz);
|
||||
|
@ -686,17 +689,18 @@ msgsnd(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
msgrcv(p, uap, retval)
|
||||
msgrcv(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct msgrcv_args /* {
|
||||
syscallarg(int) msqid;
|
||||
syscallarg(void *) msgp;
|
||||
syscallarg(size_t) msgsz;
|
||||
syscallarg(long) msgtyp;
|
||||
syscallarg(int) msgflg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int msqid = SCARG(uap, msqid);
|
||||
char *user_msgp = SCARG(uap, msgp);
|
||||
size_t msgsz = SCARG(uap, msgsz);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysv_sem.c,v 1.22 1995/06/24 20:34:16 christos Exp $ */
|
||||
/* $NetBSD: sysv_sem.c,v 1.23 1995/09/19 21:45:19 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation of SVID semaphores
|
||||
|
@ -68,13 +68,14 @@ semlock(p)
|
|||
*/
|
||||
|
||||
int
|
||||
semconfig(p, uap, retval)
|
||||
semconfig(p, v, retval)
|
||||
struct proc *p;
|
||||
struct semconfig_args /* {
|
||||
syscallarg(int) flag;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct semconfig_args /* {
|
||||
syscallarg(int) flag;
|
||||
} */ *uap = v;
|
||||
int eval = 0;
|
||||
|
||||
semlock(p);
|
||||
|
@ -271,16 +272,17 @@ semundo_clear(semid, semnum)
|
|||
}
|
||||
|
||||
int
|
||||
__semctl(p, uap, retval)
|
||||
__semctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct __semctl_args /* {
|
||||
syscallarg(int) semid;
|
||||
syscallarg(int) semnum;
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(union semun *) arg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int semid = SCARG(uap, semid);
|
||||
int semnum = SCARG(uap, semnum);
|
||||
int cmd = SCARG(uap, cmd);
|
||||
|
@ -435,15 +437,16 @@ __semctl(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
semget(p, uap, retval)
|
||||
semget(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct semget_args /* {
|
||||
syscallarg(key_t) key;
|
||||
syscallarg(int) nsems;
|
||||
syscallarg(int) semflg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int semid, eval;
|
||||
int key = SCARG(uap, key);
|
||||
int nsems = SCARG(uap, nsems);
|
||||
|
@ -548,15 +551,16 @@ found:
|
|||
}
|
||||
|
||||
int
|
||||
semop(p, uap, retval)
|
||||
semop(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct semop_args /* {
|
||||
syscallarg(int) semid;
|
||||
syscallarg(struct sembuf *) sops;
|
||||
syscallarg(u_int) nsops;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int semid = SCARG(uap, semid);
|
||||
int nsops = SCARG(uap, nsops);
|
||||
struct sembuf sops[MAX_SOPS];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysv_shm.c,v 1.31 1995/06/29 11:43:17 cgd Exp $ */
|
||||
/* $NetBSD: sysv_shm.c,v 1.32 1995/09/19 21:45:21 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved.
|
||||
|
@ -159,13 +159,14 @@ shm_delete_mapping(p, shmmap_s)
|
|||
}
|
||||
|
||||
int
|
||||
shmdt(p, uap, retval)
|
||||
shmdt(p, v, retval)
|
||||
struct proc *p;
|
||||
struct shmdt_args /* {
|
||||
syscallarg(void *) shmaddr;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct shmdt_args /* {
|
||||
syscallarg(void *) shmaddr;
|
||||
} */ *uap = v;
|
||||
struct shmmap_state *shmmap_s;
|
||||
int i;
|
||||
|
||||
|
@ -180,15 +181,16 @@ shmdt(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
shmat(p, uap, retval)
|
||||
shmat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct shmat_args /* {
|
||||
syscallarg(int) shmid;
|
||||
syscallarg(void *) shmaddr;
|
||||
syscallarg(int) shmflag;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error, i, flags;
|
||||
struct ucred *cred = p->p_ucred;
|
||||
struct shmid_ds *shmseg;
|
||||
|
@ -251,15 +253,16 @@ shmat(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
shmctl(p, uap, retval)
|
||||
shmctl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct shmctl_args /* {
|
||||
syscallarg(int) shmid;
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(struct shmid_ds *) buf;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error, segnum;
|
||||
struct ucred *cred = p->p_ucred;
|
||||
struct shmid_ds inbuf;
|
||||
|
@ -428,15 +431,16 @@ shmget_allocate_segment(p, uap, mode, retval)
|
|||
}
|
||||
|
||||
int
|
||||
shmget(p, uap, retval)
|
||||
shmget(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct shmget_args /* {
|
||||
syscallarg(key_t) key;
|
||||
syscallarg(int) size;
|
||||
syscallarg(int) shmflag;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int segnum, mode, error;
|
||||
struct shmid_ds *shmseg;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_syscalls.c,v 1.14 1995/08/12 23:59:12 mycroft Exp $ */
|
||||
/* $NetBSD: uipc_syscalls.c,v 1.15 1995/09/19 21:45:22 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1990, 1993
|
||||
|
@ -65,15 +65,16 @@
|
|||
extern struct fileops socketops;
|
||||
|
||||
int
|
||||
socket(p, uap, retval)
|
||||
socket(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct socket_args /* {
|
||||
syscallarg(int) domain;
|
||||
syscallarg(int) type;
|
||||
syscallarg(int) protocol;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct socket *so;
|
||||
struct file *fp;
|
||||
|
@ -97,15 +98,16 @@ socket(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
bind(p, uap, retval)
|
||||
bind(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct bind_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) name;
|
||||
syscallarg(int) namelen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
struct mbuf *nam;
|
||||
int error;
|
||||
|
@ -122,14 +124,15 @@ bind(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
listen(p, uap, retval)
|
||||
listen(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct listen_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(int) backlog;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
int error;
|
||||
|
||||
|
@ -139,15 +142,16 @@ listen(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
accept(p, uap, retval)
|
||||
accept(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct accept_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) name;
|
||||
syscallarg(int *) anamelen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
struct mbuf *nam;
|
||||
int namelen, error, s, tmpfd;
|
||||
|
@ -218,15 +222,16 @@ accept(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
connect(p, uap, retval)
|
||||
connect(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct connect_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) name;
|
||||
syscallarg(int) namelen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
register struct socket *so;
|
||||
struct mbuf *nam;
|
||||
|
@ -266,16 +271,17 @@ bad:
|
|||
}
|
||||
|
||||
int
|
||||
socketpair(p, uap, retval)
|
||||
socketpair(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct socketpair_args /* {
|
||||
syscallarg(int) domain;
|
||||
syscallarg(int) type;
|
||||
syscallarg(int) protocol;
|
||||
syscallarg(int *) rsv;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp1, *fp2;
|
||||
struct socket *so1, *so2;
|
||||
|
@ -329,8 +335,11 @@ free1:
|
|||
}
|
||||
|
||||
int
|
||||
sendto(p, uap, retval)
|
||||
sendto(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct sendto_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) buf;
|
||||
|
@ -338,9 +347,7 @@ sendto(p, uap, retval)
|
|||
syscallarg(int) flags;
|
||||
syscallarg(caddr_t) to;
|
||||
syscallarg(int) tolen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct msghdr msg;
|
||||
struct iovec aiov;
|
||||
|
||||
|
@ -358,15 +365,16 @@ sendto(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
sendmsg(p, uap, retval)
|
||||
sendmsg(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct sendmsg_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) msg;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct msghdr msg;
|
||||
struct iovec aiov[UIO_SMALLIOV], *iov;
|
||||
int error;
|
||||
|
@ -500,8 +508,11 @@ bad:
|
|||
}
|
||||
|
||||
int
|
||||
recvfrom(p, uap, retval)
|
||||
recvfrom(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct recvfrom_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(caddr_t) buf;
|
||||
|
@ -509,9 +520,7 @@ recvfrom(p, uap, retval)
|
|||
syscallarg(int) flags;
|
||||
syscallarg(caddr_t) from;
|
||||
syscallarg(int *) fromlenaddr;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct msghdr msg;
|
||||
struct iovec aiov;
|
||||
int error;
|
||||
|
@ -534,15 +543,16 @@ recvfrom(p, uap, retval)
|
|||
}
|
||||
|
||||
int
|
||||
recvmsg(p, uap, retval)
|
||||
recvmsg(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct recvmsg_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(struct msghdr *) msg;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct msghdr msg;
|
||||
struct iovec aiov[UIO_SMALLIOV], *uiov, *iov;
|
||||
register int error;
|
||||
|
@ -712,14 +722,15 @@ out:
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
shutdown(p, uap, retval)
|
||||
shutdown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct shutdown_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(int) how;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
int error;
|
||||
|
||||
|
@ -730,17 +741,18 @@ shutdown(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
setsockopt(p, uap, retval)
|
||||
setsockopt(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct setsockopt_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(int) level;
|
||||
syscallarg(int) name;
|
||||
syscallarg(caddr_t) val;
|
||||
syscallarg(int) valsize;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
struct mbuf *m = NULL;
|
||||
int error;
|
||||
|
@ -766,17 +778,18 @@ setsockopt(p, uap, retval)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getsockopt(p, uap, retval)
|
||||
getsockopt(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getsockopt_args /* {
|
||||
syscallarg(int) s;
|
||||
syscallarg(int) level;
|
||||
syscallarg(int) name;
|
||||
syscallarg(caddr_t) val;
|
||||
syscallarg(int *) avalsize;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
struct mbuf *m = NULL;
|
||||
int valsize, error;
|
||||
|
@ -856,15 +869,16 @@ free1:
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getsockname(p, uap, retval)
|
||||
getsockname(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getsockname_args /* {
|
||||
syscallarg(int) fdes;
|
||||
syscallarg(caddr_t) asa;
|
||||
syscallarg(int *) alen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
register struct socket *so;
|
||||
struct mbuf *m;
|
||||
|
@ -897,15 +911,16 @@ bad:
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getpeername(p, uap, retval)
|
||||
getpeername(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getpeername_args /* {
|
||||
syscallarg(int) fdes;
|
||||
syscallarg(caddr_t) asa;
|
||||
syscallarg(int *) alen;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
register struct socket *so;
|
||||
struct mbuf *m;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_syscalls.c,v 1.55 1995/06/24 20:34:31 christos Exp $ */
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.56 1995/09/19 21:45:24 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -69,16 +69,17 @@ static int change_dir __P((struct nameidata *ndp, struct proc *p));
|
|||
* Mount a file system.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
mount(p, uap, retval)
|
||||
mount(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct mount_args /* {
|
||||
syscallarg(char *) type;
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(caddr_t) data;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
register struct mount *mp;
|
||||
int error, flag;
|
||||
|
@ -304,14 +305,15 @@ checkdirs(olddp)
|
|||
* not special file (as before).
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
unmount(p, uap, retval)
|
||||
unmount(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct unmount_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct mount *mp;
|
||||
int error;
|
||||
|
@ -449,16 +451,17 @@ sync(p, uap, retval)
|
|||
* Change filesystem quotas.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
quotactl(p, uap, retval)
|
||||
quotactl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct quotactl_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(int) uid;
|
||||
syscallarg(caddr_t) arg;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct mount *mp;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -476,14 +479,15 @@ quotactl(p, uap, retval)
|
|||
* Get filesystem statistics.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
statfs(p, uap, retval)
|
||||
statfs(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct statfs_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(struct statfs *) buf;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct mount *mp;
|
||||
register struct statfs *sp;
|
||||
int error;
|
||||
|
@ -505,14 +509,15 @@ statfs(p, uap, retval)
|
|||
* Get filesystem statistics.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fstatfs(p, uap, retval)
|
||||
fstatfs(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fstatfs_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(struct statfs *) buf;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct file *fp;
|
||||
struct mount *mp;
|
||||
register struct statfs *sp;
|
||||
|
@ -531,15 +536,16 @@ fstatfs(p, uap, retval)
|
|||
/*
|
||||
* Get statistics on all filesystems.
|
||||
*/
|
||||
getfsstat(p, uap, retval)
|
||||
getfsstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getfsstat_args /* {
|
||||
syscallarg(struct statfs *) buf;
|
||||
syscallarg(long) bufsize;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct mount *mp, *nmp;
|
||||
register struct statfs *sp;
|
||||
caddr_t sfsp;
|
||||
|
@ -579,13 +585,14 @@ getfsstat(p, uap, retval)
|
|||
* Change current working directory to a given file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fchdir(p, uap, retval)
|
||||
fchdir(p, v, retval)
|
||||
struct proc *p;
|
||||
struct fchdir_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct fchdir_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct vnode *vp, *tdp;
|
||||
struct mount *mp;
|
||||
|
@ -626,13 +633,14 @@ fchdir(p, uap, retval)
|
|||
* Change current working directory (``.'').
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
chdir(p, uap, retval)
|
||||
chdir(p, v, retval)
|
||||
struct proc *p;
|
||||
struct chdir_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct chdir_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -650,13 +658,14 @@ chdir(p, uap, retval)
|
|||
* Change notion of root (``/'') directory.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
chroot(p, uap, retval)
|
||||
chroot(p, v, retval)
|
||||
struct proc *p;
|
||||
struct chroot_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct chroot_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -701,15 +710,16 @@ change_dir(ndp, p)
|
|||
* Check permissions, allocate an open file structure,
|
||||
* and call the device open routine if any.
|
||||
*/
|
||||
open(p, uap, retval)
|
||||
open(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct open_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register struct file *fp;
|
||||
register struct vnode *vp;
|
||||
|
@ -777,15 +787,16 @@ open(p, uap, retval)
|
|||
* Create a special file.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
mknod(p, uap, retval)
|
||||
mknod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct mknod_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) mode;
|
||||
syscallarg(int) dev;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -851,14 +862,15 @@ mknod(p, uap, retval)
|
|||
* Create a named pipe.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
mkfifo(p, uap, retval)
|
||||
mkfifo(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct mkfifo_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -890,14 +902,15 @@ mkfifo(p, uap, retval)
|
|||
* Make a hard file link.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
link(p, uap, retval)
|
||||
link(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct link_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(char *) link;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct nameidata nd;
|
||||
int error;
|
||||
|
@ -938,14 +951,15 @@ link(p, uap, retval)
|
|||
* Make a symbolic link.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
symlink(p, uap, retval)
|
||||
symlink(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct symlink_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(char *) link;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
char *path;
|
||||
int error;
|
||||
|
@ -980,13 +994,14 @@ out:
|
|||
* Delete a whiteout from the filesystem.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
undelete(p, uap, retval)
|
||||
undelete(p, v, retval)
|
||||
struct proc *p;
|
||||
register struct undelete_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct undelete_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
||||
|
@ -1018,13 +1033,14 @@ undelete(p, uap, retval)
|
|||
* Delete a name from the filesystem.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
unlink(p, uap, retval)
|
||||
unlink(p, v, retval)
|
||||
struct proc *p;
|
||||
struct unlink_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct unlink_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -1065,16 +1081,17 @@ unlink(p, uap, retval)
|
|||
/*
|
||||
* Reposition read/write file offset.
|
||||
*/
|
||||
lseek(p, uap, retval)
|
||||
lseek(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct lseek_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) pad;
|
||||
syscallarg(off_t) offset;
|
||||
syscallarg(int) whence;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct ucred *cred = p->p_ucred;
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
register struct file *fp;
|
||||
|
@ -1109,14 +1126,15 @@ lseek(p, uap, retval)
|
|||
/*
|
||||
* Check access permissions.
|
||||
*/
|
||||
access(p, uap, retval)
|
||||
access(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct access_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct ucred *cred = p->p_ucred;
|
||||
register struct vnode *vp;
|
||||
int error, flags, t_gid, t_uid;
|
||||
|
@ -1155,14 +1173,15 @@ out1:
|
|||
* Get file status; this version follows links.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
stat(p, uap, retval)
|
||||
stat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct stat_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(struct stat *) ub;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct stat sb;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -1183,14 +1202,15 @@ stat(p, uap, retval)
|
|||
* Get file status; this version does not follow links.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
lstat(p, uap, retval)
|
||||
lstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct lstat_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(struct stat *) ub;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error;
|
||||
struct vnode *vp, *dvp;
|
||||
struct stat sb, sb1;
|
||||
|
@ -1240,14 +1260,15 @@ lstat(p, uap, retval)
|
|||
* Get configurable pathname variables.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
pathconf(p, uap, retval)
|
||||
pathconf(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct pathconf_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) name;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
||||
|
@ -1264,15 +1285,16 @@ pathconf(p, uap, retval)
|
|||
* Return target name of a symbolic link.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
readlink(p, uap, retval)
|
||||
readlink(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct readlink_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(char *) buf;
|
||||
syscallarg(int) count;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct iovec aiov;
|
||||
struct uio auio;
|
||||
|
@ -1307,14 +1329,15 @@ readlink(p, uap, retval)
|
|||
* Change flags of a file given a path name.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
chflags(p, uap, retval)
|
||||
chflags(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct chflags_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -1341,14 +1364,15 @@ chflags(p, uap, retval)
|
|||
* Change flags of a file given a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fchflags(p, uap, retval)
|
||||
fchflags(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fchflags_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) flags;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
struct vnode *vp;
|
||||
struct file *fp;
|
||||
|
@ -1374,14 +1398,15 @@ fchflags(p, uap, retval)
|
|||
* Change mode of a file given path name.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
chmod(p, uap, retval)
|
||||
chmod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct chmod_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -1408,14 +1433,15 @@ chmod(p, uap, retval)
|
|||
* Change mode of a file given a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fchmod(p, uap, retval)
|
||||
fchmod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fchmod_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
struct vnode *vp;
|
||||
struct file *fp;
|
||||
|
@ -1441,15 +1467,16 @@ fchmod(p, uap, retval)
|
|||
* Set ownership given a path name.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
chown(p, uap, retval)
|
||||
chown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct chown_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) uid;
|
||||
syscallarg(int) gid;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -1477,15 +1504,16 @@ chown(p, uap, retval)
|
|||
* Set ownership given a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fchown(p, uap, retval)
|
||||
fchown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct fchown_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) uid;
|
||||
syscallarg(int) gid;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
struct vnode *vp;
|
||||
struct file *fp;
|
||||
|
@ -1512,14 +1540,15 @@ fchown(p, uap, retval)
|
|||
* Set the access and modification times of a file.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
utimes(p, uap, retval)
|
||||
utimes(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct utimes_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(struct timeval *) tptr;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct timeval tv[2];
|
||||
struct vattr vattr;
|
||||
|
@ -1557,15 +1586,16 @@ utimes(p, uap, retval)
|
|||
* Truncate a file given its path name.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
truncate(p, uap, retval)
|
||||
truncate(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct truncate_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) pad;
|
||||
syscallarg(off_t) length;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -1593,15 +1623,16 @@ truncate(p, uap, retval)
|
|||
* Truncate a file given a file descriptor.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
ftruncate(p, uap, retval)
|
||||
ftruncate(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct ftruncate_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(int) pad;
|
||||
syscallarg(off_t) length;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct vattr vattr;
|
||||
struct vnode *vp;
|
||||
struct file *fp;
|
||||
|
@ -1629,13 +1660,14 @@ ftruncate(p, uap, retval)
|
|||
* Sync an open file.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
fsync(p, uap, retval)
|
||||
fsync(p, v, retval)
|
||||
struct proc *p;
|
||||
struct fsync_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct fsync_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct file *fp;
|
||||
int error;
|
||||
|
@ -1654,14 +1686,15 @@ fsync(p, uap, retval)
|
|||
* or both not be directories. If target is a directory, it must be empty.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
rename(p, uap, retval)
|
||||
rename(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct rename_args /* {
|
||||
syscallarg(char *) from;
|
||||
syscallarg(char *) to;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *tvp, *fvp, *tdvp;
|
||||
struct nameidata fromnd, tond;
|
||||
int error;
|
||||
|
@ -1738,14 +1771,15 @@ out1:
|
|||
* Make a directory file.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
mkdir(p, uap, retval)
|
||||
mkdir(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct mkdir_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
@ -1778,13 +1812,14 @@ mkdir(p, uap, retval)
|
|||
* Remove a directory file.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
rmdir(p, uap, retval)
|
||||
rmdir(p, v, retval)
|
||||
struct proc *p;
|
||||
struct rmdir_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct rmdir_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
@ -1829,16 +1864,17 @@ out:
|
|||
/*
|
||||
* Read a block of directory entries in a file system independent format.
|
||||
*/
|
||||
getdirentries(p, uap, retval)
|
||||
getdirentries(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getdirentries_args /* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(char *) buf;
|
||||
syscallarg(u_int) count;
|
||||
syscallarg(long *) basep;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct file *fp;
|
||||
struct uio auio;
|
||||
|
@ -1934,14 +1970,15 @@ unionread:
|
|||
/*
|
||||
* Set the mode mask for creation of filesystem nodes.
|
||||
*/
|
||||
mode_t /* XXX */
|
||||
umask(p, uap, retval)
|
||||
int
|
||||
umask(p, v, retval)
|
||||
struct proc *p;
|
||||
struct umask_args /* {
|
||||
syscallarg(int) newmask;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct umask_args /* {
|
||||
syscallarg(int) newmask;
|
||||
} */ *uap = v;
|
||||
register struct filedesc *fdp;
|
||||
|
||||
fdp = p->p_fd;
|
||||
|
@ -1955,13 +1992,14 @@ umask(p, uap, retval)
|
|||
* away from vnode.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
revoke(p, uap, retval)
|
||||
revoke(p, v, retval)
|
||||
struct proc *p;
|
||||
register struct revoke_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct revoke_args /* {
|
||||
syscallarg(char *) path;
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
struct vattr vattr;
|
||||
int error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_syscalls.c,v 1.14 1995/08/13 00:00:04 mycroft Exp $ */
|
||||
/* $NetBSD: nfs_syscalls.c,v 1.15 1995/09/19 21:50:15 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -104,14 +104,15 @@ static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
|
|||
/*
|
||||
* Get file handle system call
|
||||
*/
|
||||
getfh(p, uap, retval)
|
||||
getfh(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct getfh_args /* {
|
||||
syscallarg(char *) fname;
|
||||
syscallarg(fhandle_t *) fhp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
register struct vnode *vp;
|
||||
fhandle_t fh;
|
||||
int error;
|
||||
|
@ -144,14 +145,15 @@ getfh(p, uap, retval)
|
|||
* - remains in the kernel as an nfsd
|
||||
* - remains in the kernel as an nfsiod
|
||||
*/
|
||||
nfssvc(p, uap, retval)
|
||||
nfssvc(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
register struct nfssvc_args /* {
|
||||
syscallarg(int) flag;
|
||||
syscallarg(caddr_t) argp;
|
||||
} */ *uap;
|
||||
register_t *retval;
|
||||
{
|
||||
} */ *uap = v;
|
||||
struct nameidata nd;
|
||||
struct file *fp;
|
||||
struct mbuf *nam;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: systm.h,v 1.36 1995/06/26 10:39:20 cgd Exp $ */
|
||||
/* $NetBSD: systm.h,v 1.37 1995/09/19 21:40:36 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1988, 1991, 1993
|
||||
|
@ -96,7 +96,8 @@ extern struct vnode *swapdev_vp;/* vnode equivalent to above */
|
|||
extern struct sysent { /* system call table */
|
||||
short sy_narg; /* number of args */
|
||||
short sy_argsize; /* total size of arguments */
|
||||
int (*sy_call)(); /* implementing function */
|
||||
/* implementing function */
|
||||
int (*sy_call) __P((struct proc *, void *, register_t *));
|
||||
} sysent[];
|
||||
extern int nsysent;
|
||||
#define SCARG(p,k) ((p)->k.datum) /* get arg from args pointer */
|
||||
|
|
Loading…
Reference in New Issue