Included <sys/sysproto.h> to get central declarations for syscall args

structs and prototypes for syscalls.

Ifdefed duplicated decentralized declarations of args structs.  It's
convenient to have this visible but they are hard to maintain.  Some
are already different from the central declarations.  4.4lite2 puts
them in comments in the function headers but I wanted to avoid the
large changes for that.
This commit is contained in:
Bruce Evans 1995-11-12 06:43:28 +00:00
parent 2f1ba63ba8
commit d2d3e8751c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12221
21 changed files with 411 additions and 20 deletions

View File

@ -37,11 +37,12 @@
* SUCH DAMAGE.
*
* @(#)kern_acct.c 8.1 (Berkeley) 6/14/93
* $Id: kern_acct.c,v 1.7 1995/07/23 23:02:20 mpp Exp $
* $Id: kern_acct.c,v 1.8 1995/10/29 15:30:56 phk Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/vnode.h>
@ -91,10 +92,12 @@ int acctchkfreq = 15; /* frequency (in seconds) to check space */
* Accounting system call. Written based on the specification and
* previous implementation done by Mark Tinguely.
*/
#ifndef _SYS_SYSPROTO_H_
struct acct_args {
char *path;
};
#endif
int
acct(p, uap, retval)
struct proc *p;

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $Id: kern_descrip.c,v 1.11 1995/10/08 00:06:00 swallace Exp $
* $Id: kern_descrip.c,v 1.12 1995/10/21 08:38:09 davidg Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/vnode.h>
@ -65,9 +66,11 @@ int nfiles; /* actual number of open files */
/*
* System calls on descriptors.
*/
#ifndef _SYS_SYSPROTO_H_
struct getdtablesize_args {
int dummy;
};
#endif
/* ARGSUSED */
int
getdtablesize(p, uap, retval)
@ -83,10 +86,12 @@ getdtablesize(p, uap, retval)
/*
* Duplicate a file descriptor to a particular value.
*/
#ifndef _SYS_SYSPROTO_H_
struct dup2_args {
u_int from;
u_int to;
};
#endif
/* ARGSUSED */
int
dup2(p, uap, retval)
@ -126,9 +131,11 @@ dup2(p, uap, retval)
/*
* Duplicate a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct dup_args {
u_int fd;
};
#endif
/* ARGSUSED */
int
dup(p, uap, retval)
@ -160,11 +167,13 @@ dup(p, uap, retval)
/*
* The file control system call.
*/
#ifndef _SYS_SYSPROTO_H_
struct fcntl_args {
int fd;
int cmd;
int arg;
};
#endif
/* ARGSUSED */
int
fcntl(p, uap, retval)
@ -328,9 +337,11 @@ finishdup(fdp, old, new, retval)
/*
* Close a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct close_args {
int fd;
};
#endif
/* ARGSUSED */
int
close(p, uap, retval)
@ -362,10 +373,12 @@ close(p, uap, retval)
/*
* Return status information about a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct ofstat_args {
int fd;
struct ostat *sb;
};
#endif
/* ARGSUSED */
int
ofstat(p, uap, retval)
@ -406,10 +419,12 @@ ofstat(p, uap, retval)
/*
* Return status information about a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fstat_args {
int fd;
struct stat *sb;
};
#endif
/* ARGSUSED */
int
fstat(p, uap, retval)
@ -447,10 +462,12 @@ fstat(p, uap, retval)
/*
* Return pathconf information about a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fpathconf_args {
int fd;
int name;
};
#endif
/* ARGSUSED */
int
fpathconf(p, uap, retval)
@ -812,10 +829,12 @@ closef(fp, p)
* Just attempt to get a record lock of the requested type on
* the entire file (l_whence = SEEK_SET, l_start = 0, l_len = 0).
*/
#ifndef _SYS_SYSPROTO_H_
struct flock_args {
int fd;
int how;
};
#endif
/* ARGSUSED */
int
flock(p, uap, retval)

View File

@ -28,11 +28,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_exec.c,v 1.24 1995/10/21 08:38:11 davidg Exp $
* $Id: kern_exec.c,v 1.25 1995/11/06 12:52:32 davidg Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/mount.h>
@ -62,11 +63,13 @@ static int exec_check_permissions(struct image_params *);
*/
const struct execsw **execsw = (const struct execsw **)&execsw_set.ls_items[0];
#ifndef _SYS_SYSPROTO_H_
struct execve_args {
char *fname;
char **argv;
char **envv;
};
#endif
/*
* execve() system call.

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
* $Id: kern_fork.c,v 1.12 1995/05/30 08:05:27 rgrimes Exp $
* $Id: kern_fork.c,v 1.13 1995/10/08 00:06:05 swallace Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@ -55,9 +56,11 @@
static int fork1(struct proc *, int, int *);
#ifndef _SYS_SYSPROTO_H_
struct fork_args {
int dummy;
};
#endif
/* ARGSUSED */
int

View File

@ -31,13 +31,14 @@
* SUCH DAMAGE.
*
* @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
* $Id: kern_ktrace.c,v 1.5 1994/10/02 17:35:15 phk Exp $
* $Id: kern_ktrace.c,v 1.6 1995/05/30 08:05:28 rgrimes Exp $
*/
#ifdef KTRACE
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/namei.h>
@ -223,12 +224,14 @@ ktrcsw(vp, out, user)
/*
* ktrace system call
*/
#ifndef _SYS_SYSPROTO_H_
struct ktrace_args {
char *fname;
int ops;
int facs;
int pid;
};
#endif
/* ARGSUSED */
int
ktrace(curp, uap, retval)

View File

@ -45,6 +45,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/timex.h>
@ -168,9 +169,11 @@ ntp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
/*
* ntp_adjtime() - NTP daemon application interface
*/
#ifndef _SYS_SYSPROTO_H_
struct ntp_adjtime_args {
struct timex *tp;
};
#endif
int
ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap, int *retval)

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_prot.c 8.6 (Berkeley) 1/21/94
* $Id: kern_prot.c,v 1.14 1995/11/04 10:50:55 davidg Exp $
* $Id: kern_prot.c,v 1.15 1995/11/11 06:53:08 bde Exp $
*/
/*
@ -46,15 +46,18 @@
#include <sys/param.h>
#include <sys/acct.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/ucred.h>
#include <sys/proc.h>
#include <sys/timeb.h>
#include <sys/times.h>
#include <sys/malloc.h>
#ifndef _SYS_SYSPROTO_H_
struct getpid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -71,9 +74,11 @@ getpid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct getppid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
getppid(p, uap, retval)
@ -87,9 +92,11 @@ getppid(p, uap, retval)
}
/* Get process group ID; note that POSIX getpgrp takes no parameter */
#ifndef _SYS_SYSPROTO_H_
struct getpgrp_args {
int dummy;
};
#endif
int
getpgrp(p, uap, retval)
@ -102,9 +109,11 @@ getpgrp(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct getuid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -121,9 +130,11 @@ getuid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct geteuid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -137,9 +148,11 @@ geteuid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct getgid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -161,9 +174,11 @@ getgid(p, uap, retval)
* via getgroups. This syscall exists because it is somewhat painful to do
* correctly in a library function.
*/
#ifndef _SYS_SYSPROTO_H_
struct getegid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -177,10 +192,12 @@ getegid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct getgroups_args {
u_int gidsetsize;
gid_t *gidset;
};
#endif
int
getgroups(p, uap, retval)
struct proc *p;
@ -205,9 +222,11 @@ getgroups(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setsid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -239,10 +258,12 @@ setsid(p, uap, retval)
* there must exist some pid in same session having pgid (EPERM)
* pid must not be session leader (EPERM)
*/
#ifndef _SYS_SYSPROTO_H_
struct setpgid_args {
int pid; /* target process id */
int pgid; /* target pgrp id */
};
#endif
/* ARGSUSED */
int
setpgid(curp, uap, retval)
@ -273,9 +294,11 @@ setpgid(curp, uap, retval)
return (enterpgrp(targp, uap->pgid, 0));
}
#ifndef _SYS_SYSPROTO_H_
struct setuid_args {
uid_t uid;
};
#endif
/* ARGSUSED */
int
setuid(p, uap, retval)
@ -310,9 +333,11 @@ setuid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct seteuid_args {
uid_t euid;
};
#endif
/* ARGSUSED */
int
seteuid(p, uap, retval)
@ -338,9 +363,11 @@ seteuid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setgid_args {
gid_t gid;
};
#endif
/* ARGSUSED */
int
setgid(p, uap, retval)
@ -366,9 +393,11 @@ setgid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setegid_args {
gid_t egid;
};
#endif
/* ARGSUSED */
int
setegid(p, uap, retval)
@ -390,10 +419,12 @@ setegid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setgroups_args {
u_int gidsetsize;
gid_t *gidset;
};
#endif
/* ARGSUSED */
int
setgroups(p, uap, retval)
@ -419,10 +450,12 @@ setgroups(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setreuid_args {
uid_t ruid;
uid_t euid;
};
#endif
/* ARGSUSED */
int
setreuid(p, uap, retval)
@ -455,10 +488,12 @@ setreuid(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setregid_args {
gid_t rgid;
gid_t egid;
};
#endif
/* ARGSUSED */
int
setregid(p, uap, retval)
@ -591,10 +626,12 @@ crdup(cr)
/*
* Get login name, if available.
*/
#ifndef _SYS_SYSPROTO_H_
struct getlogin_args {
char *namebuf;
u_int namelen;
};
#endif
/* ARGSUSED */
int
getlogin(p, uap, retval)
@ -612,9 +649,11 @@ getlogin(p, uap, retval)
/*
* Set login name.
*/
#ifndef _SYS_SYSPROTO_H_
struct setlogin_args {
char *namebuf;
};
#endif
/* ARGSUSED */
int
setlogin(p, uap, retval)

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)kern_resource.c 8.5 (Berkeley) 1/21/94
* $Id: kern_resource.c,v 1.14 1995/10/23 19:05:50 bde Exp $
* $Id: kern_resource.c,v 1.15 1995/11/11 01:48:17 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/resourcevar.h>
@ -56,10 +57,12 @@ int dosetrlimit __P((struct proc *, u_int, struct rlimit *));
* Resource controls and accounting.
*/
#ifndef _SYS_SYSPROTO_H_
struct getpriority_args {
int which;
int who;
};
#endif
int
getpriority(curp, uap, retval)
struct proc *curp;
@ -114,11 +117,13 @@ getpriority(curp, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct setpriority_args {
int which;
int who;
int prio;
};
#endif
/* ARGSUSED */
int
setpriority(curp, uap, retval)
@ -197,11 +202,13 @@ donice(curp, chgp, n)
}
/* rtprio system call */
#ifndef _SYS_SYSPROTO_H_
struct rtprio_args {
int function;
pid_t pid;
struct rtprio *rtp;
};
#endif
/*
* Set realtime priority
@ -266,10 +273,12 @@ rtprio(curp, uap, retval)
}
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#ifndef _SYS_SYSPROTO_H_
struct osetrlimit_args {
u_int which;
struct orlimit *rlp;
};
#endif
/* ARGSUSED */
int
osetrlimit(p, uap, retval)
@ -289,10 +298,12 @@ osetrlimit(p, uap, retval)
return (dosetrlimit(p, uap->which, &lim));
}
#ifndef _SYS_SYSPROTO_H_
struct ogetrlimit_args {
u_int which;
struct orlimit *rlp;
};
#endif
/* ARGSUSED */
int
ogetrlimit(p, uap, retval)
@ -314,10 +325,12 @@ ogetrlimit(p, uap, retval)
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
#ifndef _SYS_SYSPROTO_H_
struct __setrlimit_args {
u_int which;
struct rlimit *rlp;
};
#endif
/* ARGSUSED */
int
setrlimit(p, uap, retval)
@ -426,10 +439,12 @@ dosetrlimit(p, which, limp)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct __getrlimit_args {
u_int which;
struct rlimit *rlp;
};
#endif
/* ARGSUSED */
int
getrlimit(p, uap, retval)
@ -507,10 +522,12 @@ calcru(p, up, sp, ip)
}
}
#ifndef _SYS_SYSPROTO_H_
struct getrusage_args {
int who;
struct rusage *rusage;
};
#endif
/* ARGSUSED */
int
getrusage(p, uap, retval)

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
* $Id: kern_sig.c,v 1.11 1995/05/30 08:05:40 rgrimes Exp $
* $Id: kern_sig.c,v 1.12 1995/10/19 19:15:23 swallace Exp $
*/
#define SIGPROP /* include signal properties table */
#include <sys/param.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/resourcevar.h>
#include <sys/namei.h>
@ -77,11 +78,13 @@ void stop __P((struct proc *));
(pc)->pc_ucred->cr_uid == (q)->p_ucred->cr_uid || \
((signum) == SIGCONT && (q)->p_session == (p)->p_session))
#ifndef _SYS_SYSPROTO_H_
struct sigaction_args {
int signum;
struct sigaction *nsa;
struct sigaction *osa;
};
#endif
/* ARGSUSED */
int
sigaction(p, uap, retval)
@ -245,10 +248,12 @@ execsigs(p)
* and return old mask as return value;
* the library stub does the rest.
*/
#ifndef _SYS_SYSPROTO_H_
struct sigprocmask_args {
int how;
sigset_t mask;
};
#endif
int
sigprocmask(p, uap, retval)
register struct proc *p;
@ -281,9 +286,11 @@ sigprocmask(p, uap, retval)
return (error);
}
#ifndef _SYS_SYSPROTO_H_
struct sigpending_args {
int dummy;
};
#endif
/* ARGSUSED */
int
sigpending(p, uap, retval)
@ -300,11 +307,13 @@ sigpending(p, uap, retval)
/*
* Generalized interface signal handler, 4.3-compatible.
*/
#ifndef _SYS_SYSPROTO_H_
struct osigvec_args {
int signum;
struct sigvec *nsv;
struct sigvec *osv;
};
#endif
/* ARGSUSED */
int
osigvec(p, uap, retval)
@ -360,9 +369,11 @@ osigvec(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct osigblock_args {
int mask;
};
#endif
int
osigblock(p, uap, retval)
register struct proc *p;
@ -377,9 +388,11 @@ osigblock(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct osigsetmask_args {
int mask;
};
#endif
int
osigsetmask(p, uap, retval)
struct proc *p;
@ -400,9 +413,11 @@ osigsetmask(p, uap, retval)
* in the meantime. Note nonstandard calling convention:
* libc stub passes mask, not pointer, to save a copyin.
*/
#ifndef _SYS_SYSPROTO_H_
struct sigsuspend_args {
sigset_t mask;
};
#endif
/* ARGSUSED */
int
sigsuspend(p, uap, retval)
@ -429,10 +444,12 @@ sigsuspend(p, uap, retval)
}
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#ifndef _SYS_SYSPROTO_H_
struct osigstack_args {
struct sigstack *nss;
struct sigstack *oss;
};
#endif
/* ARGSUSED */
int
osigstack(p, uap, retval)
@ -461,10 +478,12 @@ osigstack(p, uap, retval)
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
#ifndef _SYS_SYSPROTO_H_
struct sigaltstack_args {
struct sigaltstack *nss;
struct sigaltstack *oss;
};
#endif
/* ARGSUSED */
int
sigaltstack(p, uap, retval)
@ -550,10 +569,12 @@ killpg1(cp, signum, pgid, all)
return (nfound ? 0 : ESRCH);
}
#ifndef _SYS_SYSPROTO_H_
struct kill_args {
int pid;
int signum;
};
#endif
/* ARGSUSED */
int
kill(cp, uap, retval)
@ -588,10 +609,12 @@ kill(cp, uap, retval)
}
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#ifndef _SYS_SYSPROTO_H_
struct okillpg_args {
int pgid;
int signum;
};
#endif
/* ARGSUSED */
int
okillpg(p, uap, retval)
@ -1221,9 +1244,11 @@ coredump(p)
* Nonexistent system call-- signal process (may want to handle it).
* Flag error in case process won't see signal immediately (blocked or ignored).
*/
#ifndef _SYS_SYSPROTO_H_
struct nosys_args {
int dummy;
};
#endif
/* ARGSUSED */
int
nosys(p, args, retval)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
* $Id: kern_sysctl.c,v 1.35 1995/11/10 16:22:41 phk Exp $
* $Id: kern_sysctl.c,v 1.36 1995/11/11 00:09:21 bde Exp $
*/
/*
@ -43,6 +43,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
@ -438,6 +439,7 @@ sysctl_root SYSCTL_HANDLER_ARGS
return (i);
}
#ifndef _SYS_SYSPROTO_H_
struct sysctl_args {
int *name;
u_int namelen;
@ -446,6 +448,7 @@ struct sysctl_args {
void *new;
size_t newlen;
};
#endif
int
__sysctl(p, uap, retval)
@ -1185,12 +1188,14 @@ struct {
*/
char bsdi_strings[80]; /* It had better be less than this! */
#ifndef _SYS_SYSPROTO_H_
struct getkerninfo_args {
int op;
char *where;
int *size;
int arg;
};
#endif
int
ogetkerninfo(p, uap, retval)

View File

@ -31,10 +31,11 @@
* SUCH DAMAGE.
*
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
* $Id: kern_time.c,v 1.9 1995/06/26 07:48:50 bde Exp $
* $Id: kern_time.c,v 1.10 1995/06/29 07:07:00 davidg Exp $
*/
#include <sys/param.h>
#include <sys/sysproto.h>
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
@ -56,10 +57,12 @@ struct timezone tz;
* timers when they expire.
*/
#ifndef _SYS_SYSPROTO_H_
struct gettimeofday_args {
struct timeval *tp;
struct timezone *tzp;
};
#endif
/* ARGSUSED */
int
gettimeofday(p, uap, retval)
@ -82,10 +85,12 @@ gettimeofday(p, uap, retval)
return (error);
}
#ifndef _SYS_SYSPROTO_H_
struct settimeofday_args {
struct timeval *tv;
struct timezone *tzp;
};
#endif
/* ARGSUSED */
int
settimeofday(p, uap, retval)
@ -132,10 +137,12 @@ int tickdelta; /* current clock skew, us. per tick */
long timedelta; /* unapplied time correction, us. */
long bigadj = 1000000; /* use 10x skew above bigadj us. */
#ifndef _SYS_SYSPROTO_H_
struct adjtime_args {
struct timeval *delta;
struct timeval *olddelta;
};
#endif
/* ARGSUSED */
int
adjtime(p, uap, retval)
@ -211,10 +218,12 @@ adjtime(p, uap, retval)
* real time timers .it_interval. Rather, we compute the next time in
* absolute time the timer should go off.
*/
#ifndef _SYS_SYSPROTO_H_
struct getitimer_args {
u_int which;
struct itimerval *itv;
};
#endif
/* ARGSUSED */
int
getitimer(p, uap, retval)
@ -249,10 +258,12 @@ getitimer(p, uap, retval)
sizeof (struct itimerval)));
}
#ifndef _SYS_SYSPROTO_H_
struct setitimer_args {
u_int which;
struct itimerval *itv, *oitv;
};
#endif
/* ARGSUSED */
int
setitimer(p, uap, retval)

View File

@ -31,11 +31,12 @@
* SUCH DAMAGE.
*
* @(#)kern_xxx.c 8.2 (Berkeley) 11/14/93
* $Id: kern_xxx.c,v 1.15 1995/11/09 20:22:12 phk Exp $
* $Id: kern_xxx.c,v 1.16 1995/11/11 01:04:42 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/reboot.h>
@ -55,9 +56,11 @@ extern const struct linker_set cleanup_set;
static const cleanup_func_t *cleanups =
(const cleanup_func_t *)&cleanup_set.ls_items[0];
#ifndef _SYS_SYSPROTO_H_
struct reboot_args {
int opt;
};
#endif
/* ARGSUSED */
int
reboot(p, uap, retval)
@ -83,10 +86,12 @@ reboot(p, uap, retval)
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#ifndef _SYS_SYSPROTO_H_
struct gethostname_args {
char *hostname;
u_int len;
};
#endif
/* ARGSUSED */
int
ogethostname(p, uap, retval)
@ -102,10 +107,12 @@ ogethostname(p, uap, retval)
1, 0, 0, 0));
}
#ifndef _SYS_SYSPROTO_H_
struct sethostname_args {
char *hostname;
u_int len;
};
#endif
/* ARGSUSED */
int
osethostname(p, uap, retval)
@ -124,9 +131,11 @@ osethostname(p, uap, retval)
uap->hostname, uap->len, 0));
}
#ifndef _SYS_SYSPROTO_H_
struct ogethostid_args {
int dummy;
};
#endif
/* ARGSUSED */
int
ogethostid(p, uap, retval)
@ -141,9 +150,11 @@ ogethostid(p, uap, retval)
#endif /* COMPAT_43 || COMPAT_SUNOS */
#ifdef COMPAT_43
#ifndef _SYS_SYSPROTO_H_
struct osethostid_args {
long hostid;
};
#endif
/* ARGSUSED */
int
osethostid(p, uap, retval)
@ -184,9 +195,11 @@ shutdown_nice(void)
}
#ifndef _SYS_SYSPROTO_H_
struct uname_args {
struct utsname *name;
};
#endif
/* ARGSUSED */
int
@ -253,11 +266,13 @@ uname(p, uap, retval)
return 0;
}
#ifndef _SYS_SYSPROTO_H_
struct getdomainname_args {
char *domainname;
u_int len;
};
#endif
/* ARGSUSED */
int
getdomainname(p, uap, retval)
@ -270,10 +285,12 @@ getdomainname(p, uap, retval)
return (copyout((caddr_t)domainname, (caddr_t)uap->domainname, uap->len));
}
#ifndef _SYS_SYSPROTO_H_
struct setdomainname_args {
char *domainname;
u_int len;
};
#endif
/* ARGSUSED */
int

View File

@ -31,11 +31,12 @@
* SUCH DAMAGE.
*
* @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
* $Id: subr_prof.c,v 1.8 1995/08/29 03:09:05 bde Exp $
* $Id: subr_prof.c,v 1.9 1995/09/09 18:10:05 davidg Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <vm/vm.h>
@ -147,12 +148,14 @@ sysctl_doprof(name, namelen, oldp, oldlenp, newp, newlen)
* The scale factor is a fixed point number with 16 bits of fraction, so that
* 1.0 is represented as 0x10000. A scale factor of 0 turns off profiling.
*/
#ifndef _SYS_SYSPROTO_H_
struct profil_args {
caddr_t samples;
u_int size;
u_int offset;
u_int scale;
};
#endif
/* ARGSUSED */
int
profil(p, uap, retval)

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
* $Id: sys_generic.c,v 1.14 1995/10/10 08:08:54 swallace Exp $
* $Id: sys_generic.c,v 1.15 1995/11/11 06:57:34 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/filedesc.h>
#include <sys/ioctl.h>
#include <sys/file.h>
@ -63,11 +64,13 @@ int selscan __P((struct proc *, fd_set *, fd_set *, int, int *));
/*
* Read system call.
*/
#ifndef _SYS_SYSPROTO_H_
struct read_args {
int fd;
char *buf;
u_int nbyte;
};
#endif
/* ARGSUSED */
int
read(p, uap, retval)
@ -124,11 +127,13 @@ read(p, uap, retval)
/*
* Scatter read system call.
*/
#ifndef _SYS_SYSPROTO_H_
struct readv_args {
int fd;
struct iovec *iovp;
u_int iovcnt;
};
#endif
int
readv(p, uap, retval)
struct proc *p;
@ -211,11 +216,13 @@ readv(p, uap, retval)
/*
* Write system call
*/
#ifndef _SYS_SYSPROTO_H_
struct write_args {
int fd;
char *buf;
u_int nbyte;
};
#endif
int
write(p, uap, retval)
struct proc *p;
@ -271,11 +278,13 @@ write(p, uap, retval)
/*
* Gather write system call
*/
#ifndef _SYS_SYSPROTO_H_
struct writev_args {
int fd;
struct iovec *iovp;
u_int iovcnt;
};
#endif
int
writev(p, uap, retval)
struct proc *p;
@ -361,11 +370,13 @@ writev(p, uap, retval)
/*
* Ioctl system call
*/
#ifndef _SYS_SYSPROTO_H_
struct ioctl_args {
int fd;
int com;
caddr_t data;
};
#endif
/* ARGSUSED */
int
ioctl(p, uap, retval)
@ -500,11 +511,13 @@ int selwait, nselcoll;
/*
* Select system call.
*/
#ifndef _SYS_SYSPROTO_H_
struct select_args {
u_int nd;
fd_set *in, *ou, *ex;
struct timeval *tv;
};
#endif
int
select(p, uap, retval)
register struct proc *p;

View File

@ -28,11 +28,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: sys_process.c,v 1.13 1995/05/12 21:39:48 davidg Exp $
* $Id: sys_process.c,v 1.14 1995/05/30 08:05:58 rgrimes Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/ptrace.h>
@ -186,12 +187,14 @@ pwrite (struct proc *procp, unsigned int addr, unsigned int datum) {
/*
* Process debugging system call.
*/
#ifndef _SYS_SYSPROTO_H_
struct ptrace_args {
int req;
pid_t pid;
caddr_t addr;
int data;
};
#endif
int
ptrace(curp, uap, retval)

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.36 1995/11/04 10:35:26 bde Exp $
* $Id: vfs_syscalls.c,v 1.37 1995/11/05 21:01:01 dyson Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
@ -69,12 +70,14 @@ static int change_dir __P((struct nameidata *ndp, struct proc *p));
/*
* Mount a file system.
*/
#ifndef _SYS_SYSPROTO_H_
struct mount_args {
int type;
char *path;
int flags;
caddr_t data;
};
#endif
/* ARGSUSED */
int
mount(p, uap, retval)
@ -211,10 +214,12 @@ mount(p, uap, retval)
* Note: unmount takes a path to the vnode mounted on as argument,
* not special file (as before).
*/
#ifndef _SYS_SYSPROTO_H_
struct unmount_args {
char *path;
int flags;
};
#endif
/* ARGSUSED */
int
unmount(p, uap, retval)
@ -314,9 +319,11 @@ int syncprt = 0;
struct ctldebug debug0 = { "syncprt", &syncprt };
#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -350,12 +357,14 @@ sync(p, uap, retval)
/*
* Change filesystem quotas.
*/
#ifndef _SYS_SYSPROTO_H_
struct quotactl_args {
char *path;
int cmd;
int uid;
caddr_t arg;
};
#endif
/* ARGSUSED */
int
quotactl(p, uap, retval)
@ -379,10 +388,12 @@ quotactl(p, uap, retval)
/*
* Get filesystem statistics.
*/
#ifndef _SYS_SYSPROTO_H_
struct statfs_args {
char *path;
struct statfs *buf;
};
#endif
/* ARGSUSED */
int
statfs(p, uap, retval)
@ -412,10 +423,12 @@ statfs(p, uap, retval)
/*
* Get filesystem statistics.
*/
#ifndef _SYS_SYSPROTO_H_
struct fstatfs_args {
int fd;
struct statfs *buf;
};
#endif
/* ARGSUSED */
int
fstatfs(p, uap, retval)
@ -443,11 +456,13 @@ fstatfs(p, uap, retval)
/*
* Get statistics on all filesystems.
*/
#ifndef _SYS_SYSPROTO_H_
struct getfsstat_args {
struct statfs *buf;
long bufsize;
int flags;
};
#endif
int
getfsstat(p, uap, retval)
struct proc *p;
@ -493,9 +508,11 @@ getfsstat(p, uap, retval)
/*
* Change current working directory to a given file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchdir_args {
int fd;
};
#endif
/* ARGSUSED */
int
fchdir(p, uap, retval)
@ -529,9 +546,11 @@ fchdir(p, uap, retval)
/*
* Change current working directory (``.'').
*/
#ifndef _SYS_SYSPROTO_H_
struct chdir_args {
char *path;
};
#endif
/* ARGSUSED */
int
chdir(p, uap, retval)
@ -555,9 +574,11 @@ chdir(p, uap, retval)
/*
* Change notion of root (``/'') directory.
*/
#ifndef _SYS_SYSPROTO_H_
struct chroot_args {
char *path;
};
#endif
/* ARGSUSED */
int
chroot(p, uap, retval)
@ -611,11 +632,13 @@ change_dir(ndp, p)
* Check permissions, allocate an open file structure,
* and call the device open routine if any.
*/
#ifndef _SYS_SYSPROTO_H_
struct open_args {
char *path;
int flags;
int mode;
};
#endif
int
open(p, uap, retval)
struct proc *p;
@ -691,10 +714,12 @@ open(p, uap, retval)
/*
* Create a file.
*/
#ifndef _SYS_SYSPROTO_H_
struct ocreat_args {
char *path;
int mode;
};
#endif
int
ocreat(p, uap, retval)
struct proc *p;
@ -713,11 +738,13 @@ ocreat(p, uap, retval)
/*
* Create a special file.
*/
#ifndef _SYS_SYSPROTO_H_
struct mknod_args {
char *path;
int mode;
int dev;
};
#endif
/* ARGSUSED */
int
mknod(p, uap, retval)
@ -778,10 +805,12 @@ mknod(p, uap, retval)
/*
* Create named pipe.
*/
#ifndef _SYS_SYSPROTO_H_
struct mkfifo_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
mkfifo(p, uap, retval)
@ -816,10 +845,12 @@ mkfifo(p, uap, retval)
/*
* Make a hard file link.
*/
#ifndef _SYS_SYSPROTO_H_
struct link_args {
char *path;
char *link;
};
#endif
/* ARGSUSED */
int
link(p, uap, retval)
@ -868,10 +899,12 @@ link(p, uap, retval)
/*
* Make a symbolic link.
*/
#ifndef _SYS_SYSPROTO_H_
struct symlink_args {
char *path;
char *link;
};
#endif
/* ARGSUSED */
int
symlink(p, uap, retval)
@ -914,9 +947,11 @@ symlink(p, uap, retval)
/*
* Delete a name from the filesystem.
*/
#ifndef _SYS_SYSPROTO_H_
struct unlink_args {
char *path;
};
#endif
/* ARGSUSED */
int
unlink(p, uap, retval)
@ -964,12 +999,14 @@ unlink(p, uap, retval)
/*
* Reposition read/write file offset.
*/
#ifndef _SYS_SYSPROTO_H_
struct lseek_args {
int fd;
int pad;
off_t offset;
int whence;
};
#endif
int
lseek(p, uap, retval)
struct proc *p;
@ -1011,11 +1048,13 @@ lseek(p, uap, retval)
/*
* Reposition read/write file offset.
*/
#ifndef _SYS_SYSPROTO_H_
struct olseek_args {
int fd;
long offset;
int whence;
};
#endif
int
olseek(p, uap, retval)
struct proc *p;
@ -1038,10 +1077,12 @@ olseek(p, uap, retval)
/*
* Check access permissions.
*/
#ifndef _SYS_SYSPROTO_H_
struct access_args {
char *path;
int flags;
};
#endif
int
access(p, uap, retval)
struct proc *p;
@ -1086,10 +1127,12 @@ access(p, uap, retval)
/*
* Get file status; this version follows links.
*/
#ifndef _SYS_SYSPROTO_H_
struct ostat_args {
char *path;
struct ostat *ub;
};
#endif
/* ARGSUSED */
int
ostat(p, uap, retval)
@ -1118,10 +1161,12 @@ ostat(p, uap, retval)
/*
* Get file status; this version does not follow links.
*/
#ifndef _SYS_SYSPROTO_H_
struct olstat_args {
char *path;
struct ostat *ub;
};
#endif
/* ARGSUSED */
int
olstat(p, uap, retval)
@ -1210,10 +1255,12 @@ cvtstat(st, ost)
/*
* Get file status; this version follows links.
*/
#ifndef _SYS_SYSPROTO_H_
struct stat_args {
char *path;
struct stat *ub;
};
#endif
/* ARGSUSED */
int
stat(p, uap, retval)
@ -1240,10 +1287,12 @@ stat(p, uap, retval)
/*
* Get file status; this version does not follow links.
*/
#ifndef _SYS_SYSPROTO_H_
struct lstat_args {
char *path;
struct stat *ub;
};
#endif
/* ARGSUSED */
int
lstat(p, uap, retval)
@ -1300,10 +1349,12 @@ lstat(p, uap, retval)
/*
* Get configurable pathname variables.
*/
#ifndef _SYS_SYSPROTO_H_
struct pathconf_args {
char *path;
int name;
};
#endif
/* ARGSUSED */
int
pathconf(p, uap, retval)
@ -1326,11 +1377,13 @@ pathconf(p, uap, retval)
/*
* Return target name of a symbolic link.
*/
#ifndef _SYS_SYSPROTO_H_
struct readlink_args {
char *path;
char *buf;
int count;
};
#endif
/* ARGSUSED */
int
readlink(p, uap, retval)
@ -1371,10 +1424,12 @@ readlink(p, uap, retval)
/*
* Change flags of a file given a path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chflags_args {
char *path;
int flags;
};
#endif
/* ARGSUSED */
int
chflags(p, uap, retval)
@ -1404,10 +1459,12 @@ chflags(p, uap, retval)
/*
* Change flags of a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchflags_args {
int fd;
int flags;
};
#endif
/* ARGSUSED */
int
fchflags(p, uap, retval)
@ -1436,10 +1493,12 @@ fchflags(p, uap, retval)
/*
* Change mode of a file given path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chmod_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
chmod(p, uap, retval)
@ -1469,10 +1528,12 @@ chmod(p, uap, retval)
/*
* Change mode of a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchmod_args {
int fd;
int mode;
};
#endif
/* ARGSUSED */
int
fchmod(p, uap, retval)
@ -1501,11 +1562,13 @@ fchmod(p, uap, retval)
/*
* Set ownership given a path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chown_args {
char *path;
int uid;
int gid;
};
#endif
/* ARGSUSED */
int
chown(p, uap, retval)
@ -1536,11 +1599,13 @@ chown(p, uap, retval)
/*
* Set ownership given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchown_args {
int fd;
int uid;
int gid;
};
#endif
/* ARGSUSED */
int
fchown(p, uap, retval)
@ -1570,10 +1635,12 @@ fchown(p, uap, retval)
/*
* Set the access and modification times of a file.
*/
#ifndef _SYS_SYSPROTO_H_
struct utimes_args {
char *path;
struct timeval *tptr;
};
#endif
/* ARGSUSED */
int
utimes(p, uap, retval)
@ -1616,11 +1683,13 @@ utimes(p, uap, retval)
/*
* Truncate a file given its path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct truncate_args {
char *path;
int pad;
off_t length;
};
#endif
/* ARGSUSED */
int
truncate(p, uap, retval)
@ -1657,11 +1726,13 @@ truncate(p, uap, retval)
/*
* Truncate a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct ftruncate_args {
int fd;
int pad;
off_t length;
};
#endif
/* ARGSUSED */
int
ftruncate(p, uap, retval)
@ -1699,10 +1770,12 @@ ftruncate(p, uap, retval)
/*
* Truncate a file given its path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct otruncate_args {
char *path;
long length;
};
#endif
/* ARGSUSED */
int
otruncate(p, uap, retval)
@ -1720,10 +1793,12 @@ otruncate(p, uap, retval)
/*
* Truncate a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct oftruncate_args {
int fd;
long length;
};
#endif
/* ARGSUSED */
int
oftruncate(p, uap, retval)
@ -1742,9 +1817,11 @@ oftruncate(p, uap, retval)
/*
* Sync an open file.
*/
#ifndef _SYS_SYSPROTO_H_
struct fsync_args {
int fd;
};
#endif
/* ARGSUSED */
int
fsync(p, uap, retval)
@ -1774,10 +1851,12 @@ fsync(p, uap, retval)
* Rename files. Source and destination must either both be directories,
* or both not be directories. If target is a directory, it must be empty.
*/
#ifndef _SYS_SYSPROTO_H_
struct rename_args {
char *from;
char *to;
};
#endif
/* ARGSUSED */
int
rename(p, uap, retval)
@ -1867,10 +1946,12 @@ rename(p, uap, retval)
/*
* Make a directory file.
*/
#ifndef _SYS_SYSPROTO_H_
struct mkdir_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
mkdir(p, uap, retval)
@ -1911,9 +1992,11 @@ mkdir(p, uap, retval)
/*
* Remove a directory file.
*/
#ifndef _SYS_SYSPROTO_H_
struct rmdir_args {
char *path;
};
#endif
/* ARGSUSED */
int
rmdir(p, uap, retval)
@ -1966,12 +2049,14 @@ rmdir(p, uap, retval)
/*
* Read a block of directory entries in a file system independent format.
*/
#ifndef _SYS_SYSPROTO_H_
struct ogetdirentries_args {
int fd;
char *buf;
u_int count;
long *basep;
};
#endif
int
ogetdirentries(p, uap, retval)
struct proc *p;
@ -2066,12 +2151,14 @@ ogetdirentries(p, uap, retval)
/*
* Read a block of directory entries in a file system independent format.
*/
#ifndef _SYS_SYSPROTO_H_
struct getdirentries_args {
int fd;
char *buf;
u_int count;
long *basep;
};
#endif
int
getdirentries(p, uap, retval)
struct proc *p;
@ -2157,9 +2244,11 @@ getdirentries(p, uap, retval)
/*
* Set the mode mask for creation of filesystem nodes.
*/
#ifndef _SYS_SYSPROTO_H_
struct umask_args {
int newmask;
};
#endif
mode_t /* XXX */
umask(p, uap, retval)
struct proc *p;
@ -2178,9 +2267,11 @@ umask(p, uap, retval)
* Void all references to file by ripping underlying filesystem
* away from vnode.
*/
#ifndef _SYS_SYSPROTO_H_
struct revoke_args {
char *path;
};
#endif
/* ARGSUSED */
int
revoke(p, uap, retval)

View File

@ -36,11 +36,12 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.36 1995/11/04 10:35:26 bde Exp $
* $Id: vfs_syscalls.c,v 1.37 1995/11/05 21:01:01 dyson Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
@ -69,12 +70,14 @@ static int change_dir __P((struct nameidata *ndp, struct proc *p));
/*
* Mount a file system.
*/
#ifndef _SYS_SYSPROTO_H_
struct mount_args {
int type;
char *path;
int flags;
caddr_t data;
};
#endif
/* ARGSUSED */
int
mount(p, uap, retval)
@ -211,10 +214,12 @@ mount(p, uap, retval)
* Note: unmount takes a path to the vnode mounted on as argument,
* not special file (as before).
*/
#ifndef _SYS_SYSPROTO_H_
struct unmount_args {
char *path;
int flags;
};
#endif
/* ARGSUSED */
int
unmount(p, uap, retval)
@ -314,9 +319,11 @@ int syncprt = 0;
struct ctldebug debug0 = { "syncprt", &syncprt };
#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -350,12 +357,14 @@ sync(p, uap, retval)
/*
* Change filesystem quotas.
*/
#ifndef _SYS_SYSPROTO_H_
struct quotactl_args {
char *path;
int cmd;
int uid;
caddr_t arg;
};
#endif
/* ARGSUSED */
int
quotactl(p, uap, retval)
@ -379,10 +388,12 @@ quotactl(p, uap, retval)
/*
* Get filesystem statistics.
*/
#ifndef _SYS_SYSPROTO_H_
struct statfs_args {
char *path;
struct statfs *buf;
};
#endif
/* ARGSUSED */
int
statfs(p, uap, retval)
@ -412,10 +423,12 @@ statfs(p, uap, retval)
/*
* Get filesystem statistics.
*/
#ifndef _SYS_SYSPROTO_H_
struct fstatfs_args {
int fd;
struct statfs *buf;
};
#endif
/* ARGSUSED */
int
fstatfs(p, uap, retval)
@ -443,11 +456,13 @@ fstatfs(p, uap, retval)
/*
* Get statistics on all filesystems.
*/
#ifndef _SYS_SYSPROTO_H_
struct getfsstat_args {
struct statfs *buf;
long bufsize;
int flags;
};
#endif
int
getfsstat(p, uap, retval)
struct proc *p;
@ -493,9 +508,11 @@ getfsstat(p, uap, retval)
/*
* Change current working directory to a given file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchdir_args {
int fd;
};
#endif
/* ARGSUSED */
int
fchdir(p, uap, retval)
@ -529,9 +546,11 @@ fchdir(p, uap, retval)
/*
* Change current working directory (``.'').
*/
#ifndef _SYS_SYSPROTO_H_
struct chdir_args {
char *path;
};
#endif
/* ARGSUSED */
int
chdir(p, uap, retval)
@ -555,9 +574,11 @@ chdir(p, uap, retval)
/*
* Change notion of root (``/'') directory.
*/
#ifndef _SYS_SYSPROTO_H_
struct chroot_args {
char *path;
};
#endif
/* ARGSUSED */
int
chroot(p, uap, retval)
@ -611,11 +632,13 @@ change_dir(ndp, p)
* Check permissions, allocate an open file structure,
* and call the device open routine if any.
*/
#ifndef _SYS_SYSPROTO_H_
struct open_args {
char *path;
int flags;
int mode;
};
#endif
int
open(p, uap, retval)
struct proc *p;
@ -691,10 +714,12 @@ open(p, uap, retval)
/*
* Create a file.
*/
#ifndef _SYS_SYSPROTO_H_
struct ocreat_args {
char *path;
int mode;
};
#endif
int
ocreat(p, uap, retval)
struct proc *p;
@ -713,11 +738,13 @@ ocreat(p, uap, retval)
/*
* Create a special file.
*/
#ifndef _SYS_SYSPROTO_H_
struct mknod_args {
char *path;
int mode;
int dev;
};
#endif
/* ARGSUSED */
int
mknod(p, uap, retval)
@ -778,10 +805,12 @@ mknod(p, uap, retval)
/*
* Create named pipe.
*/
#ifndef _SYS_SYSPROTO_H_
struct mkfifo_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
mkfifo(p, uap, retval)
@ -816,10 +845,12 @@ mkfifo(p, uap, retval)
/*
* Make a hard file link.
*/
#ifndef _SYS_SYSPROTO_H_
struct link_args {
char *path;
char *link;
};
#endif
/* ARGSUSED */
int
link(p, uap, retval)
@ -868,10 +899,12 @@ link(p, uap, retval)
/*
* Make a symbolic link.
*/
#ifndef _SYS_SYSPROTO_H_
struct symlink_args {
char *path;
char *link;
};
#endif
/* ARGSUSED */
int
symlink(p, uap, retval)
@ -914,9 +947,11 @@ symlink(p, uap, retval)
/*
* Delete a name from the filesystem.
*/
#ifndef _SYS_SYSPROTO_H_
struct unlink_args {
char *path;
};
#endif
/* ARGSUSED */
int
unlink(p, uap, retval)
@ -964,12 +999,14 @@ unlink(p, uap, retval)
/*
* Reposition read/write file offset.
*/
#ifndef _SYS_SYSPROTO_H_
struct lseek_args {
int fd;
int pad;
off_t offset;
int whence;
};
#endif
int
lseek(p, uap, retval)
struct proc *p;
@ -1011,11 +1048,13 @@ lseek(p, uap, retval)
/*
* Reposition read/write file offset.
*/
#ifndef _SYS_SYSPROTO_H_
struct olseek_args {
int fd;
long offset;
int whence;
};
#endif
int
olseek(p, uap, retval)
struct proc *p;
@ -1038,10 +1077,12 @@ olseek(p, uap, retval)
/*
* Check access permissions.
*/
#ifndef _SYS_SYSPROTO_H_
struct access_args {
char *path;
int flags;
};
#endif
int
access(p, uap, retval)
struct proc *p;
@ -1086,10 +1127,12 @@ access(p, uap, retval)
/*
* Get file status; this version follows links.
*/
#ifndef _SYS_SYSPROTO_H_
struct ostat_args {
char *path;
struct ostat *ub;
};
#endif
/* ARGSUSED */
int
ostat(p, uap, retval)
@ -1118,10 +1161,12 @@ ostat(p, uap, retval)
/*
* Get file status; this version does not follow links.
*/
#ifndef _SYS_SYSPROTO_H_
struct olstat_args {
char *path;
struct ostat *ub;
};
#endif
/* ARGSUSED */
int
olstat(p, uap, retval)
@ -1210,10 +1255,12 @@ cvtstat(st, ost)
/*
* Get file status; this version follows links.
*/
#ifndef _SYS_SYSPROTO_H_
struct stat_args {
char *path;
struct stat *ub;
};
#endif
/* ARGSUSED */
int
stat(p, uap, retval)
@ -1240,10 +1287,12 @@ stat(p, uap, retval)
/*
* Get file status; this version does not follow links.
*/
#ifndef _SYS_SYSPROTO_H_
struct lstat_args {
char *path;
struct stat *ub;
};
#endif
/* ARGSUSED */
int
lstat(p, uap, retval)
@ -1300,10 +1349,12 @@ lstat(p, uap, retval)
/*
* Get configurable pathname variables.
*/
#ifndef _SYS_SYSPROTO_H_
struct pathconf_args {
char *path;
int name;
};
#endif
/* ARGSUSED */
int
pathconf(p, uap, retval)
@ -1326,11 +1377,13 @@ pathconf(p, uap, retval)
/*
* Return target name of a symbolic link.
*/
#ifndef _SYS_SYSPROTO_H_
struct readlink_args {
char *path;
char *buf;
int count;
};
#endif
/* ARGSUSED */
int
readlink(p, uap, retval)
@ -1371,10 +1424,12 @@ readlink(p, uap, retval)
/*
* Change flags of a file given a path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chflags_args {
char *path;
int flags;
};
#endif
/* ARGSUSED */
int
chflags(p, uap, retval)
@ -1404,10 +1459,12 @@ chflags(p, uap, retval)
/*
* Change flags of a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchflags_args {
int fd;
int flags;
};
#endif
/* ARGSUSED */
int
fchflags(p, uap, retval)
@ -1436,10 +1493,12 @@ fchflags(p, uap, retval)
/*
* Change mode of a file given path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chmod_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
chmod(p, uap, retval)
@ -1469,10 +1528,12 @@ chmod(p, uap, retval)
/*
* Change mode of a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchmod_args {
int fd;
int mode;
};
#endif
/* ARGSUSED */
int
fchmod(p, uap, retval)
@ -1501,11 +1562,13 @@ fchmod(p, uap, retval)
/*
* Set ownership given a path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct chown_args {
char *path;
int uid;
int gid;
};
#endif
/* ARGSUSED */
int
chown(p, uap, retval)
@ -1536,11 +1599,13 @@ chown(p, uap, retval)
/*
* Set ownership given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct fchown_args {
int fd;
int uid;
int gid;
};
#endif
/* ARGSUSED */
int
fchown(p, uap, retval)
@ -1570,10 +1635,12 @@ fchown(p, uap, retval)
/*
* Set the access and modification times of a file.
*/
#ifndef _SYS_SYSPROTO_H_
struct utimes_args {
char *path;
struct timeval *tptr;
};
#endif
/* ARGSUSED */
int
utimes(p, uap, retval)
@ -1616,11 +1683,13 @@ utimes(p, uap, retval)
/*
* Truncate a file given its path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct truncate_args {
char *path;
int pad;
off_t length;
};
#endif
/* ARGSUSED */
int
truncate(p, uap, retval)
@ -1657,11 +1726,13 @@ truncate(p, uap, retval)
/*
* Truncate a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct ftruncate_args {
int fd;
int pad;
off_t length;
};
#endif
/* ARGSUSED */
int
ftruncate(p, uap, retval)
@ -1699,10 +1770,12 @@ ftruncate(p, uap, retval)
/*
* Truncate a file given its path name.
*/
#ifndef _SYS_SYSPROTO_H_
struct otruncate_args {
char *path;
long length;
};
#endif
/* ARGSUSED */
int
otruncate(p, uap, retval)
@ -1720,10 +1793,12 @@ otruncate(p, uap, retval)
/*
* Truncate a file given a file descriptor.
*/
#ifndef _SYS_SYSPROTO_H_
struct oftruncate_args {
int fd;
long length;
};
#endif
/* ARGSUSED */
int
oftruncate(p, uap, retval)
@ -1742,9 +1817,11 @@ oftruncate(p, uap, retval)
/*
* Sync an open file.
*/
#ifndef _SYS_SYSPROTO_H_
struct fsync_args {
int fd;
};
#endif
/* ARGSUSED */
int
fsync(p, uap, retval)
@ -1774,10 +1851,12 @@ fsync(p, uap, retval)
* Rename files. Source and destination must either both be directories,
* or both not be directories. If target is a directory, it must be empty.
*/
#ifndef _SYS_SYSPROTO_H_
struct rename_args {
char *from;
char *to;
};
#endif
/* ARGSUSED */
int
rename(p, uap, retval)
@ -1867,10 +1946,12 @@ rename(p, uap, retval)
/*
* Make a directory file.
*/
#ifndef _SYS_SYSPROTO_H_
struct mkdir_args {
char *path;
int mode;
};
#endif
/* ARGSUSED */
int
mkdir(p, uap, retval)
@ -1911,9 +1992,11 @@ mkdir(p, uap, retval)
/*
* Remove a directory file.
*/
#ifndef _SYS_SYSPROTO_H_
struct rmdir_args {
char *path;
};
#endif
/* ARGSUSED */
int
rmdir(p, uap, retval)
@ -1966,12 +2049,14 @@ rmdir(p, uap, retval)
/*
* Read a block of directory entries in a file system independent format.
*/
#ifndef _SYS_SYSPROTO_H_
struct ogetdirentries_args {
int fd;
char *buf;
u_int count;
long *basep;
};
#endif
int
ogetdirentries(p, uap, retval)
struct proc *p;
@ -2066,12 +2151,14 @@ ogetdirentries(p, uap, retval)
/*
* Read a block of directory entries in a file system independent format.
*/
#ifndef _SYS_SYSPROTO_H_
struct getdirentries_args {
int fd;
char *buf;
u_int count;
long *basep;
};
#endif
int
getdirentries(p, uap, retval)
struct proc *p;
@ -2157,9 +2244,11 @@ getdirentries(p, uap, retval)
/*
* Set the mode mask for creation of filesystem nodes.
*/
#ifndef _SYS_SYSPROTO_H_
struct umask_args {
int newmask;
};
#endif
mode_t /* XXX */
umask(p, uap, retval)
struct proc *p;
@ -2178,9 +2267,11 @@ umask(p, uap, retval)
* Void all references to file by ripping underlying filesystem
* away from vnode.
*/
#ifndef _SYS_SYSPROTO_H_
struct revoke_args {
char *path;
};
#endif
/* ARGSUSED */
int
revoke(p, uap, retval)

View File

@ -31,11 +31,12 @@
* SUCH DAMAGE.
*
* @(#)lfs_syscalls.c 8.5 (Berkeley) 4/20/94
* $Id: lfs_syscalls.c,v 1.11 1995/07/29 11:43:08 bde Exp $
* $Id: lfs_syscalls.c,v 1.12 1995/09/04 00:21:02 dyson Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/proc.h>
#include <sys/buf.h>
#include <sys/mount.h>
@ -81,11 +82,13 @@ int lfs_fastvget __P((struct mount *, ino_t, daddr_t, struct vnode **,
* 0 on success
* -1/errno is return on error.
*/
#ifndef _SYS_SYSPROTO_H_
struct lfs_markv_args {
fsid_t *fsidp; /* file system */
BLOCK_INFO *blkiov; /* block array */
int blkcnt; /* count of block array entries */
};
#endif
int
lfs_markv(p, uap, retval)
struct proc *p;
@ -257,11 +260,13 @@ err2: lfs_vunref(vp);
* 0 on success
* -1/errno is return on error.
*/
#ifndef _SYS_SYSPROTO_H_
struct lfs_bmapv_args {
fsid_t *fsidp; /* file system */
BLOCK_INFO *blkiov; /* block array */
int blkcnt; /* count of block array entries */
};
#endif
int
lfs_bmapv(p, uap, retval)
struct proc *p;
@ -317,10 +322,12 @@ lfs_bmapv(p, uap, retval)
* 0 on success
* -1/errno is return on error.
*/
#ifndef _SYS_SYSPROTO_H_
struct lfs_segclean_args {
fsid_t *fsidp; /* file system */
u_long segment; /* segment number */
};
#endif
int
lfs_segclean(p, uap, retval)
struct proc *p;
@ -378,10 +385,12 @@ lfs_segclean(p, uap, retval)
* 1 on timeout
* -1/errno is return on error.
*/
#ifndef _SYS_SYSPROTO_H_
struct lfs_segwait_args {
fsid_t *fsidp; /* file system */
struct timeval *tv; /* timeout */
};
#endif
int
lfs_segwait(p, uap, retval)
struct proc *p;

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
*
* @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
* $Id: vm_mmap.c,v 1.27 1995/10/21 17:42:28 dyson Exp $
* $Id: vm_mmap.c,v 1.28 1995/10/23 03:49:37 dyson Exp $
*/
/*
@ -47,6 +47,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/filedesc.h>
#include <sys/resourcevar.h>
#include <sys/proc.h>
@ -64,9 +65,11 @@
void pmap_object_init_pt();
#ifndef _SYS_SYSPROTO_H_
struct sbrk_args {
int incr;
};
#endif
/* ARGSUSED */
int
@ -80,9 +83,11 @@ sbrk(p, uap, retval)
return (EOPNOTSUPP);
}
#ifndef _SYS_SYSPROTO_H_
struct sstk_args {
int incr;
};
#endif
/* ARGSUSED */
int
@ -97,9 +102,11 @@ sstk(p, uap, retval)
}
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#ifndef _SYS_SYSPROTO_H_
struct getpagesize_args {
int dummy;
};
#endif
/* ARGSUSED */
int
@ -114,6 +121,7 @@ ogetpagesize(p, uap, retval)
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
#ifndef _SYS_SYSPROTO_H_
struct mmap_args {
caddr_t addr;
size_t len;
@ -123,6 +131,7 @@ struct mmap_args {
long pad;
off_t pos;
};
#endif
int
mmap(p, uap, retval)
@ -232,6 +241,7 @@ mmap(p, uap, retval)
}
#ifdef COMPAT_43
#ifndef _SYS_SYSPROTO_H_
struct ommap_args {
caddr_t addr;
int len;
@ -240,6 +250,7 @@ struct ommap_args {
int fd;
long pos;
};
#endif
int
ommap(p, uap, retval)
struct proc *p;
@ -287,11 +298,13 @@ ommap(p, uap, retval)
#endif /* COMPAT_43 */
#ifndef _SYS_SYSPROTO_H_
struct msync_args {
caddr_t addr;
int len;
int flags;
};
#endif
int
msync(p, uap, retval)
struct proc *p;
@ -352,10 +365,12 @@ msync(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct munmap_args {
caddr_t addr;
int len;
};
#endif
int
munmap(p, uap, retval)
register struct proc *p;
@ -406,11 +421,13 @@ munmapfd(p, fd)
p->p_fd->fd_ofileflags[fd] &= ~UF_MAPPED;
}
#ifndef _SYS_SYSPROTO_H_
struct mprotect_args {
caddr_t addr;
int len;
int prot;
};
#endif
int
mprotect(p, uap, retval)
struct proc *p;
@ -437,11 +454,13 @@ mprotect(p, uap, retval)
return (EINVAL);
}
#ifndef _SYS_SYSPROTO_H_
struct madvise_args {
caddr_t addr;
int len;
int behav;
};
#endif
/* ARGSUSED */
int
@ -455,11 +474,13 @@ madvise(p, uap, retval)
return (EOPNOTSUPP);
}
#ifndef _SYS_SYSPROTO_H_
struct mincore_args {
caddr_t addr;
int len;
char *vec;
};
#endif
/* ARGSUSED */
int
@ -495,10 +516,12 @@ mincore(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct mlock_args {
caddr_t addr;
size_t len;
};
#endif
int
mlock(p, uap, retval)
struct proc *p;
@ -529,10 +552,12 @@ mlock(p, uap, retval)
return (error == KERN_SUCCESS ? 0 : ENOMEM);
}
#ifndef _SYS_SYSPROTO_H_
struct munlock_args {
caddr_t addr;
size_t len;
};
#endif
int
munlock(p, uap, retval)
struct proc *p;

View File

@ -31,11 +31,12 @@
* SUCH DAMAGE.
*
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
* $Id: vm_swap.c,v 1.22 1995/07/13 08:48:45 davidg Exp $
* $Id: vm_swap.c,v 1.23 1995/07/29 11:44:31 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/buf.h>
#include <sys/conf.h>
#include <sys/proc.h>
@ -123,9 +124,11 @@ swstrategy(bp)
* which must be in the swdevsw. Return EBUSY
* if already swapping on this device.
*/
#ifndef _SYS_SYSPROTO_H_
struct swapon_args {
char *name;
};
#endif
/* ARGSUSED */
int

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: vm_unix.c 1.1 89/11/07$
*
* @(#)vm_unix.c 8.1 (Berkeley) 6/11/93
* $Id: vm_unix.c,v 1.6 1995/10/07 19:02:56 davidg Exp $
* $Id: vm_unix.c,v 1.7 1995/11/11 06:40:35 bde Exp $
*/
/*
@ -46,15 +46,18 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <vm/vm.h>
#include <vm/swap_pager.h>
#ifndef _SYS_SYSPROTO_H_
struct obreak_args {
char *nsize;
};
#endif
/* ARGSUSED */
int
@ -94,9 +97,11 @@ obreak(p, uap, retval)
return (0);
}
#ifndef _SYS_SYSPROTO_H_
struct ovadvise_args {
int anom;
};
#endif
/* ARGSUSED */
int