summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2018-03-27 18:52:27 +0000
committerdim <dim@FreeBSD.org>2018-03-27 18:52:27 +0000
commit199ef8f96a0caadc29a4bdf121b8a5c9efcde207 (patch)
tree1fee1b1d9791450a6ef0eae0a81b154793de048c /sys/kern
parent54f770b796bd94590b148914cf8fb487a5e7d885 (diff)
downloadFreeBSD-src-199ef8f96a0caadc29a4bdf121b8a5c9efcde207.zip
FreeBSD-src-199ef8f96a0caadc29a4bdf121b8a5c9efcde207.tar.gz
MFC r314568 (by emaste):
kern_sig.c: ANSIfy and remove archaic register keyword Sponsored by: The FreeBSD Foundation MFC r318389 (by emaste): Remove register keyword from sys/ and ANSIfy prototypes A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today. ANSIfy related prototypes while here. Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/inflate.c32
-rw-r--r--sys/kern/kern_clock.c18
-rw-r--r--sys/kern/kern_exec.c24
-rw-r--r--sys/kern/kern_prot.c26
-rw-r--r--sys/kern/kern_resource.c16
-rw-r--r--sys/kern/kern_sig.c95
-rw-r--r--sys/kern/kern_timeout.c2
-rw-r--r--sys/kern/kern_xxx.c20
-rw-r--r--sys/kern/sched_4bsd.c2
-rw-r--r--sys/kern/sysv_msg.c76
-rw-r--r--sys/kern/vfs_export.c10
-rw-r--r--sys/kern/vfs_mount.c36
-rw-r--r--sys/kern/vfs_syscalls.c453
-rw-r--r--sys/kern/vfs_vnops.c34
14 files changed, 221 insertions, 623 deletions
diff --git a/sys/kern/inflate.c b/sys/kern/inflate.c
index 8fde5cb..d9b5a30 100644
--- a/sys/kern/inflate.c
+++ b/sys/kern/inflate.c
@@ -428,17 +428,17 @@ huft_build(glbl, b, n, s, d, e, t, m)
unsigned f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
- register unsigned i; /* counter, current code */
- register unsigned j; /* counter */
- register int k; /* number of bits in current code */
+ unsigned i; /* counter, current code */
+ unsigned j; /* counter */
+ int k; /* number of bits in current code */
int lx[BMAX + 1]; /* memory for l[-1..BMAX-1] */
int *l = lx + 1; /* stack of bits per table */
- register unsigned *p; /* pointer into c[], b[], or v[] */
- register struct huft *q;/* points to current table */
+ unsigned *p; /* pointer into c[], b[], or v[] */
+ struct huft *q; /* points to current table */
struct huft r; /* table entry for structure assignment */
struct huft *u[BMAX];/* table stack */
unsigned v[N_MAX]; /* values in order of bit length */
- register int w; /* bits before this table == (l * h) */
+ int w; /* bits before this table == (l * h) */
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
unsigned *xp; /* pointer into x */
int y; /* number of dummy codes added */
@@ -622,7 +622,7 @@ huft_free(glbl, t)
list of the tables it made, with the links in a dummy first entry of
each table. */
{
- register struct huft *p, *q;
+ struct huft *p, *q;
/* Go through linked list, freeing from the malloced (t[-1]) address. */
p = t;
@@ -642,13 +642,13 @@ inflate_codes(glbl, tl, td, bl, bd)
struct huft *tl, *td;/* literal/length and distance decoder tables */
int bl, bd; /* number of bits decoded by tl[] and td[] */
{
- register unsigned e; /* table entry flag/number of extra bits */
+ unsigned e; /* table entry flag/number of extra bits */
unsigned n, d; /* length and index for copy */
unsigned w; /* current window position */
struct huft *t; /* pointer to table entry */
unsigned ml, md; /* masks for bl and bd bits */
- register ulg b; /* bit buffer */
- register unsigned k; /* number of bits in bit buffer */
+ ulg b; /* bit buffer */
+ unsigned k; /* number of bits in bit buffer */
/* make local copies of globals */
b = glbl->gz_bb; /* initialize bit buffer */
@@ -738,8 +738,8 @@ inflate_stored(glbl)
{
unsigned n; /* number of bytes in block */
unsigned w; /* current window position */
- register ulg b; /* bit buffer */
- register unsigned k; /* number of bits in bit buffer */
+ ulg b; /* bit buffer */
+ unsigned k; /* number of bits in bit buffer */
/* make local copies of globals */
b = glbl->gz_bb; /* initialize bit buffer */
@@ -844,8 +844,8 @@ inflate_dynamic(glbl)
unsigned ll[286 + 30]; /* literal/length and distance code
* lengths */
#endif
- register ulg b; /* bit buffer */
- register unsigned k; /* number of bits in bit buffer */
+ ulg b; /* bit buffer */
+ unsigned k; /* number of bits in bit buffer */
/* make local bit buffer */
b = glbl->gz_bb;
@@ -973,8 +973,8 @@ inflate_block(glbl, e)
int *e; /* last block flag */
{
unsigned t; /* block type */
- register ulg b; /* bit buffer */
- register unsigned k; /* number of bits in bit buffer */
+ ulg b; /* bit buffer */
+ unsigned k; /* number of bits in bit buffer */
/* make local bit buffer */
b = glbl->gz_bb;
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 7ab34d2..94ed4a0 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -396,10 +396,9 @@ static int devpoll_run = 0;
*/
/* ARGSUSED*/
static void
-initclocks(dummy)
- void *dummy;
+initclocks(void *dummy)
{
- register int i;
+ int i;
/*
* Set divisors to 1 (normal case) and let the machine-specific
@@ -587,11 +586,10 @@ hardclock_sync(int cpu)
* Compute number of ticks in the specified amount of time.
*/
int
-tvtohz(tv)
- struct timeval *tv;
+tvtohz(struct timeval *tv)
{
- register unsigned long ticks;
- register long sec, usec;
+ unsigned long ticks;
+ long sec, usec;
/*
* If the number of usecs in the whole seconds part of the time
@@ -648,8 +646,7 @@ tvtohz(tv)
* keeps the profile clock running constantly.
*/
void
-startprofclock(p)
- register struct proc *p;
+startprofclock(struct proc *p)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
@@ -668,8 +665,7 @@ startprofclock(p)
* Stop profiling on a process.
*/
void
-stopprofclock(p)
- register struct proc *p;
+stopprofclock(struct proc *p)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 2a375f2..a0e3230 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -352,10 +352,7 @@ kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
* userspace pointers from the passed thread.
*/
static int
-do_execve(td, args, mac_p)
- struct thread *td;
- struct image_args *args;
- struct mac *mac_p;
+do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
{
struct proc *p = td->td_proc;
struct nameidata nd;
@@ -1041,8 +1038,7 @@ exec_map_first_page(imgp)
}
void
-exec_unmap_first_page(imgp)
- struct image_params *imgp;
+exec_unmap_first_page(struct image_params *imgp)
{
vm_page_t m;
@@ -1062,9 +1058,7 @@ exec_unmap_first_page(imgp)
* automatically on a page fault.
*/
int
-exec_new_vmspace(imgp, sv)
- struct image_params *imgp;
- struct sysentvec *sv;
+exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
{
int error;
struct proc *p = imgp->proc;
@@ -1462,8 +1456,7 @@ exec_free_args(struct image_args *args)
* as the initial stack pointer.
*/
register_t *
-exec_copyout_strings(imgp)
- struct image_params *imgp;
+exec_copyout_strings(struct image_params *imgp)
{
int argc, envc;
char **vectp;
@@ -1619,8 +1612,7 @@ exec_copyout_strings(imgp)
* Return 0 for success or error code on failure.
*/
int
-exec_check_permissions(imgp)
- struct image_params *imgp;
+exec_check_permissions(struct image_params *imgp)
{
struct vnode *vp = imgp->vp;
struct vattr *attr = imgp->attr;
@@ -1690,8 +1682,7 @@ exec_check_permissions(imgp)
* Exec handler registration
*/
int
-exec_register(execsw_arg)
- const struct execsw *execsw_arg;
+exec_register(const struct execsw *execsw_arg)
{
const struct execsw **es, **xs, **newexecsw;
int count = 2; /* New slot and trailing NULL */
@@ -1713,8 +1704,7 @@ exec_register(execsw_arg)
}
int
-exec_unregister(execsw_arg)
- const struct execsw *execsw_arg;
+exec_unregister(const struct execsw *execsw_arg)
{
const struct execsw **es, **xs, **newexecsw;
int count = 1;
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 3cf25b2..fe28a55 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -302,7 +302,7 @@ struct getgroups_args {
};
#endif
int
-sys_getgroups(struct thread *td, register struct getgroups_args *uap)
+sys_getgroups(struct thread *td, struct getgroups_args *uap)
{
struct ucred *cred;
u_int ngrp;
@@ -331,7 +331,7 @@ struct setsid_args {
#endif
/* ARGSUSED */
int
-sys_setsid(register struct thread *td, struct setsid_args *uap)
+sys_setsid(struct thread *td, struct setsid_args *uap)
{
struct pgrp *pgrp;
int error;
@@ -389,11 +389,11 @@ struct setpgid_args {
#endif
/* ARGSUSED */
int
-sys_setpgid(struct thread *td, register struct setpgid_args *uap)
+sys_setpgid(struct thread *td, struct setpgid_args *uap)
{
struct proc *curp = td->td_proc;
- register struct proc *targp; /* target process */
- register struct pgrp *pgrp; /* target pgrp */
+ struct proc *targp; /* target process */
+ struct pgrp *pgrp; /* target pgrp */
int error;
struct pgrp *newpgrp;
@@ -884,7 +884,7 @@ struct setreuid_args {
#endif
/* ARGSUSED */
int
-sys_setreuid(register struct thread *td, struct setreuid_args *uap)
+sys_setreuid(struct thread *td, struct setreuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -954,7 +954,7 @@ struct setregid_args {
#endif
/* ARGSUSED */
int
-sys_setregid(register struct thread *td, struct setregid_args *uap)
+sys_setregid(struct thread *td, struct setregid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1019,7 +1019,7 @@ struct setresuid_args {
#endif
/* ARGSUSED */
int
-sys_setresuid(register struct thread *td, struct setresuid_args *uap)
+sys_setresuid(struct thread *td, struct setresuid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1101,7 +1101,7 @@ struct setresgid_args {
#endif
/* ARGSUSED */
int
-sys_setresgid(register struct thread *td, struct setresgid_args *uap)
+sys_setresgid(struct thread *td, struct setresgid_args *uap)
{
struct proc *p = td->td_proc;
struct ucred *newcred, *oldcred;
@@ -1168,7 +1168,7 @@ struct getresuid_args {
#endif
/* ARGSUSED */
int
-sys_getresuid(register struct thread *td, struct getresuid_args *uap)
+sys_getresuid(struct thread *td, struct getresuid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@@ -1195,7 +1195,7 @@ struct getresgid_args {
#endif
/* ARGSUSED */
int
-sys_getresgid(register struct thread *td, struct getresgid_args *uap)
+sys_getresgid(struct thread *td, struct getresgid_args *uap)
{
struct ucred *cred;
int error1 = 0, error2 = 0, error3 = 0;
@@ -1220,7 +1220,7 @@ struct issetugid_args {
#endif
/* ARGSUSED */
int
-sys_issetugid(register struct thread *td, struct issetugid_args *uap)
+sys_issetugid(struct thread *td, struct issetugid_args *uap)
{
struct proc *p = td->td_proc;
@@ -1813,7 +1813,7 @@ p_canwait(struct thread *td, struct proc *p)
struct ucred *
crget(void)
{
- register struct ucred *cr;
+ struct ucred *cr;
cr = malloc(sizeof(*cr), M_CRED, M_WAITOK | M_ZERO);
refcount_init(&cr->cr_ref, 1);
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 0d7f898..ea07fb6 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -92,7 +92,7 @@ struct getpriority_args {
};
#endif
int
-sys_getpriority(struct thread *td, register struct getpriority_args *uap)
+sys_getpriority(struct thread *td, struct getpriority_args *uap)
{
struct proc *p;
struct pgrp *pg;
@@ -369,7 +369,7 @@ struct rtprio_args {
};
#endif
int
-sys_rtprio(struct thread *td, register struct rtprio_args *uap)
+sys_rtprio(struct thread *td, struct rtprio_args *uap)
{
struct proc *p;
struct thread *tdp;
@@ -535,7 +535,7 @@ struct osetrlimit_args {
};
#endif
int
-osetrlimit(struct thread *td, register struct osetrlimit_args *uap)
+osetrlimit(struct thread *td, struct osetrlimit_args *uap)
{
struct orlimit olim;
struct rlimit lim;
@@ -556,7 +556,7 @@ struct ogetrlimit_args {
};
#endif
int
-ogetrlimit(struct thread *td, register struct ogetrlimit_args *uap)
+ogetrlimit(struct thread *td, struct ogetrlimit_args *uap)
{
struct orlimit olim;
struct rlimit rl;
@@ -589,7 +589,7 @@ struct __setrlimit_args {
};
#endif
int
-sys_setrlimit(struct thread *td, register struct __setrlimit_args *uap)
+sys_setrlimit(struct thread *td, struct __setrlimit_args *uap)
{
struct rlimit alim;
int error;
@@ -647,7 +647,7 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which,
struct rlimit *limp)
{
struct plimit *newlim, *oldlim;
- register struct rlimit *alimp;
+ struct rlimit *alimp;
struct rlimit oldssiz;
int error;
@@ -777,7 +777,7 @@ struct __getrlimit_args {
#endif
/* ARGSUSED */
int
-sys_getrlimit(struct thread *td, register struct __getrlimit_args *uap)
+sys_getrlimit(struct thread *td, struct __getrlimit_args *uap)
{
struct rlimit rlim;
int error;
@@ -947,7 +947,7 @@ struct getrusage_args {
};
#endif
int
-sys_getrusage(register struct thread *td, register struct getrusage_args *uap)
+sys_getrusage(struct thread *td, struct getrusage_args *uap)
{
struct rusage ru;
int error;
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 982592a..85e2663 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -828,12 +828,10 @@ struct sigaction_args {
};
#endif
int
-sys_sigaction(td, uap)
- struct thread *td;
- register struct sigaction_args *uap;
+sys_sigaction(struct thread *td, struct sigaction_args *uap)
{
struct sigaction act, oact;
- register struct sigaction *actp, *oactp;
+ struct sigaction *actp, *oactp;
int error;
actp = (uap->act != NULL) ? &act : NULL;
@@ -858,12 +856,10 @@ struct freebsd4_sigaction_args {
};
#endif
int
-freebsd4_sigaction(td, uap)
- struct thread *td;
- register struct freebsd4_sigaction_args *uap;
+freebsd4_sigaction(struct thread *td, struct freebsd4_sigaction_args *uap)
{
struct sigaction act, oact;
- register struct sigaction *actp, *oactp;
+ struct sigaction *actp, *oactp;
int error;
@@ -890,13 +886,11 @@ struct osigaction_args {
};
#endif
int
-osigaction(td, uap)
- struct thread *td;
- register struct osigaction_args *uap;
+osigaction(struct thread *td, struct osigaction_args *uap)
{
struct osigaction sa;
struct sigaction nsa, osa;
- register struct sigaction *nsap, *osap;
+ struct sigaction *nsap, *osap;
int error;
if (uap->signum <= 0 || uap->signum >= ONSIG)
@@ -926,9 +920,7 @@ osigaction(td, uap)
#if !defined(__i386__)
/* Avoid replicating the same stub everywhere */
int
-osigreturn(td, uap)
- struct thread *td;
- struct osigreturn_args *uap;
+osigreturn(struct thread *td, struct osigreturn_args *uap)
{
return (nosys(td, (struct nosys_args *)uap));
@@ -941,10 +933,9 @@ osigreturn(td, uap)
* set to ignore signals that are ignored by default.
*/
void
-siginit(p)
- struct proc *p;
+siginit(struct proc *p)
{
- register int i;
+ int i;
struct sigacts *ps;
PROC_LOCK(p);
@@ -1116,9 +1107,7 @@ struct sigprocmask_args {
};
#endif
int
-sys_sigprocmask(td, uap)
- register struct thread *td;
- struct sigprocmask_args *uap;
+sys_sigprocmask(struct thread *td, struct sigprocmask_args *uap)
{
sigset_t set, oset;
sigset_t *setp, *osetp;
@@ -1146,9 +1135,7 @@ struct osigprocmask_args {
};
#endif
int
-osigprocmask(td, uap)
- register struct thread *td;
- struct osigprocmask_args *uap;
+osigprocmask(struct thread *td, struct osigprocmask_args *uap)
{
sigset_t set, oset;
int error;
@@ -1381,9 +1368,7 @@ struct sigpending_args {
};
#endif
int
-sys_sigpending(td, uap)
- struct thread *td;
- struct sigpending_args *uap;
+sys_sigpending(struct thread *td, struct sigpending_args *uap)
{
struct proc *p = td->td_proc;
sigset_t pending;
@@ -1402,9 +1387,7 @@ struct osigpending_args {
};
#endif
int
-osigpending(td, uap)
- struct thread *td;
- struct osigpending_args *uap;
+osigpending(struct thread *td, struct osigpending_args *uap)
{
struct proc *p = td->td_proc;
sigset_t pending;
@@ -1431,13 +1414,11 @@ struct osigvec_args {
#endif
/* ARGSUSED */
int
-osigvec(td, uap)
- struct thread *td;
- register struct osigvec_args *uap;
+osigvec(struct thread *td, struct osigvec_args *uap)
{
struct sigvec vec;
struct sigaction nsa, osa;
- register struct sigaction *nsap, *osap;
+ struct sigaction *nsap, *osap;
int error;
if (uap->signum <= 0 || uap->signum >= ONSIG)
@@ -1471,9 +1452,7 @@ struct osigblock_args {
};
#endif
int
-osigblock(td, uap)
- register struct thread *td;
- struct osigblock_args *uap;
+osigblock(struct thread *td, struct osigblock_args *uap)
{
sigset_t set, oset;
@@ -1489,9 +1468,7 @@ struct osigsetmask_args {
};
#endif
int
-osigsetmask(td, uap)
- struct thread *td;
- struct osigsetmask_args *uap;
+osigsetmask(struct thread *td, struct osigsetmask_args *uap)
{
sigset_t set, oset;
@@ -1513,9 +1490,7 @@ struct sigsuspend_args {
#endif
/* ARGSUSED */
int
-sys_sigsuspend(td, uap)
- struct thread *td;
- struct sigsuspend_args *uap;
+sys_sigsuspend(struct thread *td, struct sigsuspend_args *uap)
{
sigset_t mask;
int error;
@@ -1581,9 +1556,7 @@ struct osigsuspend_args {
#endif
/* ARGSUSED */
int
-osigsuspend(td, uap)
- struct thread *td;
- struct osigsuspend_args *uap;
+osigsuspend(struct thread *td, struct osigsuspend_args *uap)
{
sigset_t mask;
@@ -1601,9 +1574,7 @@ struct osigstack_args {
#endif
/* ARGSUSED */
int
-osigstack(td, uap)
- struct thread *td;
- register struct osigstack_args *uap;
+osigstack(struct thread *td, struct osigstack_args *uap)
{
struct sigstack nss, oss;
int error = 0;
@@ -1636,9 +1607,7 @@ struct sigaltstack_args {
#endif
/* ARGSUSED */
int
-sys_sigaltstack(td, uap)
- struct thread *td;
- register struct sigaltstack_args *uap;
+sys_sigaltstack(struct thread *td, struct sigaltstack_args *uap)
{
stack_t ss, oss;
int error;
@@ -1821,9 +1790,7 @@ sys_kill(struct thread *td, struct kill_args *uap)
}
int
-sys_pdkill(td, uap)
- struct thread *td;
- struct pdkill_args *uap;
+sys_pdkill(struct thread *td, struct pdkill_args *uap)
{
struct proc *p;
cap_rights_t rights;
@@ -2431,7 +2398,7 @@ static void
tdsigwakeup(struct thread *td, int sig, sig_t action, int intrval)
{
struct proc *p = td->td_proc;
- register int prop;
+ int prop;
int wakeup_swapper;
wakeup_swapper = 0;
@@ -3115,9 +3082,7 @@ postsig(int sig)
* Kill the current process for stated reason.
*/
void
-killproc(p, why)
- struct proc *p;
- char *why;
+killproc(struct proc *p, char *why)
{
PROC_LOCK_ASSERT(p, MA_OWNED);
@@ -3138,9 +3103,7 @@ killproc(p, why)
* does not return.
*/
void
-sigexit(td, sig)
- struct thread *td;
- int sig;
+sigexit(struct thread *td, int sig)
{
struct proc *p = td->td_proc;
@@ -3624,9 +3587,7 @@ struct nosys_args {
#endif
/* ARGSUSED */
int
-nosys(td, args)
- struct thread *td;
- struct nosys_args *args;
+nosys(struct thread *td, struct nosys_args *args)
{
struct proc *p;
@@ -3651,9 +3612,7 @@ nosys(td, args)
* credentials rather than those of the current process.
*/
void
-pgsigio(sigiop, sig, checkctty)
- struct sigio **sigiop;
- int sig, checkctty;
+pgsigio(struct sigio **sigiop, int sig, int checkctty)
{
ksiginfo_t ksi;
struct sigio *sigio;
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 01d9c27..767b23f 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1477,7 +1477,7 @@ _callout_init_lock(struct callout *c, struct lock_object *lock, int flags)
void
adjust_timeout_calltodo(struct timeval *time_change)
{
- register struct callout *p;
+ struct callout *p;
unsigned long delta_ticks;
/*
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index 92d9c91..b04b210 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -60,9 +60,7 @@ struct gethostname_args {
#endif
/* ARGSUSED */
int
-ogethostname(td, uap)
- struct thread *td;
- struct gethostname_args *uap;
+ogethostname(struct thread *td, struct gethostname_args *uap)
{
int name[2];
size_t len = uap->len;
@@ -81,9 +79,7 @@ struct sethostname_args {
#endif
/* ARGSUSED */
int
-osethostname(td, uap)
- struct thread *td;
- register struct sethostname_args *uap;
+osethostname(struct thread *td, struct sethostname_args *uap)
{
int name[2];
@@ -100,9 +96,7 @@ struct ogethostid_args {
#endif
/* ARGSUSED */
int
-ogethostid(td, uap)
- struct thread *td;
- struct ogethostid_args *uap;
+ogethostid(struct thread *td, struct ogethostid_args *uap)
{
size_t len = sizeof(long);
int name[2];
@@ -122,9 +116,7 @@ struct osethostid_args {
#endif
/* ARGSUSED */
int
-osethostid(td, uap)
- struct thread *td;
- struct osethostid_args *uap;
+osethostid(struct thread *td, struct osethostid_args *uap)
{
int name[2];
@@ -135,9 +127,7 @@ osethostid(td, uap)
}
int
-oquota(td, uap)
- struct thread *td;
- struct oquota_args *uap;
+oquota(struct thread *td, struct oquota_args *uap)
{
return (ENOSYS);
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 52c96c8..656888c 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -458,7 +458,7 @@ SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "");
static void
schedcpu(void)
{
- register fixpt_t loadfac = loadfactor(averunnable.ldavg[0]);
+ fixpt_t loadfac = loadfactor(averunnable.ldavg[0]);
struct thread *td;
struct proc *p;
struct td_sched *ts;
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index b7cdafd..442bce7 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -473,9 +473,7 @@ struct msgctl_args {
};
#endif
int
-sys_msgctl(td, uap)
- struct thread *td;
- register struct msgctl_args *uap;
+sys_msgctl(struct thread *td, struct msgctl_args *uap)
{
int msqid = uap->msqid;
int cmd = uap->cmd;
@@ -500,7 +498,7 @@ kern_msgctl(td, msqid, cmd, msqbuf)
struct msqid_ds *msqbuf;
{
int rval, error, msqix;
- register struct msqid_kernel *msqkptr;
+ struct msqid_kernel *msqkptr;
struct prison *rpr;
rpr = msg_find_prison(td->td_ucred);
@@ -634,15 +632,13 @@ struct msgget_args {
#endif
int
-sys_msgget(td, uap)
- struct thread *td;
- register struct msgget_args *uap;
+sys_msgget(struct thread *td, struct msgget_args *uap)
{
int msqid, error = 0;
int key = uap->key;
int msgflg = uap->msgflg;
struct ucred *cred = td->td_ucred;
- register struct msqid_kernel *msqkptr = NULL;
+ struct msqid_kernel *msqkptr = NULL;
DPRINTF(("msgget(0x%x, 0%o)\n", key, msgflg));
@@ -751,23 +747,18 @@ done2:
#ifndef _SYS_SYSPROTO_H_
struct msgsnd_args {
int msqid;
- const void *msgp;
+ const void *msgp; /* XXX msgp is actually mtext. */
size_t msgsz;
int msgflg;
};
#endif
int
-kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype)
- struct thread *td;
- int msqid;
- const void *msgp; /* XXX msgp is actually mtext. */
- size_t msgsz;
- int msgflg;
- long mtype;
+kern_msgsnd(struct thread *td, int msqid, const void *msgp,
+ size_t msgsz, int msgflg, long mtype)
{
int msqix, segs_needed, error = 0;
- register struct msqid_kernel *msqkptr;
- register struct msg *msghdr;
+ struct msqid_kernel *msqkptr;
+ struct msg *msghdr;
struct prison *rpr;
short next;
#ifdef RACCT
@@ -1102,9 +1093,7 @@ done2:
}
int
-sys_msgsnd(td, uap)
- struct thread *td;
- register struct msgsnd_args *uap;
+sys_msgsnd(struct thread *td, struct msgsnd_args *uap)
{
int error;
long mtype;
@@ -1130,19 +1119,14 @@ struct msgrcv_args {
int msgflg;
};
#endif
+/* XXX msgp is actually mtext. */
int
-kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype)
- struct thread *td;
- int msqid;
- void *msgp; /* XXX msgp is actually mtext. */
- size_t msgsz;
- long msgtyp;
- int msgflg;
- long *mtype;
+kern_msgrcv(struct thread *td, int msqid, void *msgp, size_t msgsz, long msgtyp,
+ int msgflg, long *mtype)
{
size_t len;
- register struct msqid_kernel *msqkptr;
- register struct msg *msghdr;
+ struct msqid_kernel *msqkptr;
+ struct msg *msghdr;
struct prison *rpr;
int msqix, error = 0;
short next;
@@ -1394,9 +1378,7 @@ done2:
}
int
-sys_msgrcv(td, uap)
- struct thread *td;
- register struct msgrcv_args *uap;
+sys_msgrcv(struct thread *td, struct msgrcv_args *uap)
{
int error;
long mtype;
@@ -1833,19 +1815,19 @@ static sy_call_t *msgcalls[] = {
/*
* Entry point for all MSG calls.
+ *
+ * XXX actually varargs.
+ * struct msgsys_args {
+ * int which;
+ * int a2;
+ * int a3;
+ * int a4;
+ * int a5;
+ * int a6;
+ * } *uap;
*/
int
-sys_msgsys(td, uap)
- struct thread *td;
- /* XXX actually varargs. */
- struct msgsys_args /* {
- int which;
- int a2;
- int a3;
- int a4;
- int a5;
- int a6;
- } */ *uap;
+sys_msgsys(struct thread *td, struct msgsys_args *uap)
{
int error;
@@ -1867,9 +1849,7 @@ struct freebsd7_msgctl_args {
};
#endif
int
-freebsd7_msgctl(td, uap)
- struct thread *td;
- struct freebsd7_msgctl_args *uap;
+freebsd7_msgctl(struct thread *td, struct freebsd7_msgctl_args *uap)
{
struct msqid_ds_old msqold;
struct msqid_ds msqbuf;
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 3cce417..13f2426 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -100,9 +100,9 @@ static int
vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
struct export_args *argp)
{
- register struct netcred *np;
- register struct radix_node_head *rnh;
- register int i;
+ struct netcred *np;
+ struct radix_node_head *rnh;
+ int i;
struct radix_node *rn;
struct sockaddr *saddr, *smask = NULL;
#if defined(INET6) || defined(INET)
@@ -446,8 +446,8 @@ static struct netcred *
vfs_export_lookup(struct mount *mp, struct sockaddr *nam)
{
struct netexport *nep;
- register struct netcred *np;
- register struct radix_node_head *rnh;
+ struct netcred *np;
+ struct radix_node_head *rnh;
struct sockaddr *saddr;
nep = mp->mnt_export;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 1115081..6111831 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -366,14 +366,15 @@ vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *oldopts)
/*
* Mount a filesystem.
*/
+#ifndef _SYS_SYSPROTO_H_
+struct nmount_args {
+ struct iovec *iovp;
+ unsigned int iovcnt;
+ int flags;
+};
+#endif
int
-sys_nmount(td, uap)
- struct thread *td;
- struct nmount_args /* {
- struct iovec *iovp;
- unsigned int iovcnt;
- int flags;
- } */ *uap;
+sys_nmount(struct thread *td, struct nmount_args *uap)
{
struct uio *auio;
int error;
@@ -704,14 +705,7 @@ struct mount_args {
#endif
/* ARGSUSED */
int
-sys_mount(td, uap)
- struct thread *td;
- struct mount_args /* {
- char *type;
- char *path;
- int flags;
- caddr_t data;
- } */ *uap;
+sys_mount(struct thread *td, struct mount_args *uap)
{
char *fstype;
struct vfsconf *vfsp = NULL;
@@ -1543,11 +1537,7 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal)
* with the address of the option.
*/
int
-vfs_getopt(opts, name, buf, len)
- struct vfsoptlist *opts;
- const char *name;
- void **buf;
- int *len;
+vfs_getopt(struct vfsoptlist *opts, const char *name, void **buf, int *len)
{
struct vfsopt *opt;
@@ -1760,11 +1750,7 @@ vfs_setopts(struct vfsoptlist *opts, const char *name, const char *value)
* Returns ENOENT if the option is not found.
*/
int
-vfs_copyopt(opts, name, dest, len)
- struct vfsoptlist *opts;
- const char *name;
- void *dest;
- int len;
+vfs_copyopt(struct vfsoptlist *opts, const char *name, void *dest, int len)
{
struct vfsopt *opt;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index d64e699..219e862 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -117,9 +117,7 @@ struct sync_args {
#endif
/* ARGSUSED */
int
-sys_sync(td, uap)
- struct thread *td;
- struct sync_args *uap;
+sys_sync(struct thread *td, struct sync_args *uap)
{
struct mount *mp, *nmp;
int save;
@@ -158,14 +156,7 @@ struct quotactl_args {
};
#endif
int
-sys_quotactl(td, uap)
- struct thread *td;
- register struct quotactl_args /* {
- char *path;
- int cmd;
- int uid;
- caddr_t arg;
- } */ *uap;
+sys_quotactl(struct thread *td, struct quotactl_args *uap)
{
struct mount *mp;
struct nameidata nd;
@@ -293,12 +284,7 @@ struct statfs_args {
};
#endif
int
-sys_statfs(td, uap)
- struct thread *td;
- register struct statfs_args /* {
- char *path;
- struct statfs *buf;
- } */ *uap;
+sys_statfs(struct thread *td, struct statfs_args *uap)
{
struct statfs *sfp;
int error;
@@ -341,12 +327,7 @@ struct fstatfs_args {
};
#endif
int
-sys_fstatfs(td, uap)
- struct thread *td;
- register struct fstatfs_args /* {
- int fd;
- struct statfs *buf;
- } */ *uap;
+sys_fstatfs(struct thread *td, struct fstatfs_args *uap)
{
struct statfs *sfp;
int error;
@@ -396,13 +377,7 @@ struct getfsstat_args {
};
#endif
int
-sys_getfsstat(td, uap)
- struct thread *td;
- register struct getfsstat_args /* {
- struct statfs *buf;
- long bufsize;
- int mode;
- } */ *uap;
+sys_getfsstat(struct thread *td, struct getfsstat_args *uap)
{
size_t count;
int error;
@@ -559,12 +534,7 @@ struct freebsd4_statfs_args {
};
#endif
int
-freebsd4_statfs(td, uap)
- struct thread *td;
- struct freebsd4_statfs_args /* {
- char *path;
- struct ostatfs *buf;
- } */ *uap;
+freebsd4_statfs(struct thread *td, struct freebsd4_statfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@@ -590,12 +560,7 @@ struct freebsd4_fstatfs_args {
};
#endif
int
-freebsd4_fstatfs(td, uap)
- struct thread *td;
- struct freebsd4_fstatfs_args /* {
- int fd;
- struct ostatfs *buf;
- } */ *uap;
+freebsd4_fstatfs(struct thread *td, struct freebsd4_fstatfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@@ -622,13 +587,7 @@ struct freebsd4_getfsstat_args {
};
#endif
int
-freebsd4_getfsstat(td, uap)
- struct thread *td;
- register struct freebsd4_getfsstat_args /* {
- struct ostatfs *buf;
- long bufsize;
- int mode;
- } */ *uap;
+freebsd4_getfsstat(struct thread *td, struct freebsd4_getfsstat_args *uap)
{
struct statfs *buf, *sp;
struct ostatfs osb;
@@ -668,12 +627,7 @@ struct freebsd4_fhstatfs_args {
};
#endif
int
-freebsd4_fhstatfs(td, uap)
- struct thread *td;
- struct freebsd4_fhstatfs_args /* {
- struct fhandle *u_fhp;
- struct ostatfs *buf;
- } */ *uap;
+freebsd4_fhstatfs(struct thread *td, struct freebsd4_fhstatfs_args *uap)
{
struct ostatfs osb;
struct statfs *sfp;
@@ -697,9 +651,7 @@ freebsd4_fhstatfs(td, uap)
* Convert a new format statfs structure to an old format statfs structure.
*/
static void
-cvtstatfs(nsp, osp)
- struct statfs *nsp;
- struct ostatfs *osp;
+cvtstatfs(struct statfs *nsp, struct ostatfs *osp)
{
statfs_scale_blocks(nsp, LONG_MAX);
@@ -737,11 +689,7 @@ struct fchdir_args {
};
#endif
int
-sys_fchdir(td, uap)
- struct thread *td;
- struct fchdir_args /* {
- int fd;
- } */ *uap;
+sys_fchdir(struct thread *td, struct fchdir_args *uap)
{
struct vnode *vp, *tdp;
struct mount *mp;
@@ -788,11 +736,7 @@ struct chdir_args {
};
#endif
int
-sys_chdir(td, uap)
- struct thread *td;
- struct chdir_args /* {
- char *path;
- } */ *uap;
+sys_chdir(struct thread *td, struct chdir_args *uap)
{
return (kern_chdir(td, uap->path, UIO_USERSPACE));
@@ -828,11 +772,7 @@ struct chroot_args {
};
#endif
int
-sys_chroot(td, uap)
- struct thread *td;
- struct chroot_args /* {
- char *path;
- } */ *uap;
+sys_chroot(struct thread *td, struct chroot_args *uap)
{
struct nameidata nd;
int error;
@@ -870,9 +810,7 @@ error:
* instance.
*/
int
-change_dir(vp, td)
- struct vnode *vp;
- struct thread *td;
+change_dir(struct vnode *vp, struct thread *td)
{
#ifdef MAC
int error;
@@ -936,13 +874,7 @@ struct open_args {
};
#endif
int
-sys_open(td, uap)
- struct thread *td;
- register struct open_args /* {
- char *path;
- int flags;
- int mode;
- } */ *uap;
+sys_open(struct thread *td, struct open_args *uap)
{
return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -1116,12 +1048,7 @@ struct ocreat_args {
};
#endif
int
-ocreat(td, uap)
- struct thread *td;
- register struct ocreat_args /* {
- char *path;
- int mode;
- } */ *uap;
+ocreat(struct thread *td, struct ocreat_args *uap)
{
return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -1140,13 +1067,7 @@ struct mknod_args {
};
#endif
int
-sys_mknod(td, uap)
- struct thread *td;
- register struct mknod_args /* {
- char *path;
- int mode;
- int dev;
- } */ *uap;
+sys_mknod(struct thread *td, struct mknod_args *uap)
{
return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -1277,12 +1198,7 @@ struct mkfifo_args {
};
#endif
int
-sys_mkfifo(td, uap)
- struct thread *td;
- register struct mkfifo_args /* {
- char *path;
- int mode;
- } */ *uap;
+sys_mkfifo(struct thread *td, struct mkfifo_args *uap)
{
return (kern_mkfifoat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -1369,12 +1285,7 @@ struct link_args {
};
#endif
int
-sys_link(td, uap)
- struct thread *td;
- register struct link_args /* {
- char *path;
- char *link;
- } */ *uap;
+sys_link(struct thread *td, struct link_args *uap)
{
return (kern_linkat(td, AT_FDCWD, AT_FDCWD, uap->path, uap->link,
@@ -1538,12 +1449,7 @@ struct symlink_args {
};
#endif
int
-sys_symlink(td, uap)
- struct thread *td;
- register struct symlink_args /* {
- char *path;
- char *link;
- } */ *uap;
+sys_symlink(struct thread *td, struct symlink_args *uap)
{
return (kern_symlinkat(td, uap->path, AT_FDCWD, uap->link,
@@ -1635,12 +1541,13 @@ out:
/*
* Delete a whiteout from the filesystem.
*/
+#ifndef _SYS_SYSPROTO_H_
+struct undelete_args {
+ char *path;
+};
+#endif
int
-sys_undelete(td, uap)
- struct thread *td;
- register struct undelete_args /* {
- char *path;
- } */ *uap;
+sys_undelete(struct thread *td, struct undelete_args *uap)
{
struct mount *mp;
struct nameidata nd;
@@ -1687,11 +1594,7 @@ struct unlink_args {
};
#endif
int
-sys_unlink(td, uap)
- struct thread *td;
- struct unlink_args /* {
- char *path;
- } */ *uap;
+sys_unlink(struct thread *td, struct unlink_args *uap)
{
return (kern_unlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, 0));
@@ -1856,11 +1759,8 @@ freebsd6_lseek(struct thread *td, struct freebsd6_lseek_args *uap)
* Check access permissions using passed credentials.
*/
static int
-vn_access(vp, user_flags, cred, td)
- struct vnode *vp;
- int user_flags;
- struct ucred *cred;
- struct thread *td;
+vn_access(struct vnode *vp, int user_flags, struct ucred *cred,
+ struct thread *td)
{
accmode_t accmode;
int error;
@@ -1896,12 +1796,7 @@ struct access_args {
};
#endif
int
-sys_access(td, uap)
- struct thread *td;
- register struct access_args /* {
- char *path;
- int amode;
- } */ *uap;
+sys_access(struct thread *td, struct access_args *uap)
{
return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -1982,12 +1877,7 @@ struct eaccess_args {
};
#endif
int
-sys_eaccess(td, uap)
- struct thread *td;
- register struct eaccess_args /* {
- char *path;
- int amode;
- } */ *uap;
+sys_eaccess(struct thread *td, struct eaccess_args *uap)
{
return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2005,12 +1895,7 @@ struct ostat_args {
};
#endif
int
-ostat(td, uap)
- struct thread *td;
- register struct ostat_args /* {
- char *path;
- struct ostat *ub;
- } */ *uap;
+ostat(struct thread *td, struct ostat_args *uap)
{
struct stat sb;
struct ostat osb;
@@ -2034,12 +1919,7 @@ struct olstat_args {
};
#endif
int
-olstat(td, uap)
- struct thread *td;
- register struct olstat_args /* {
- char *path;
- struct ostat *ub;
- } */ *uap;
+olstat(struct thread *td, struct olstat_args *uap)
{
struct stat sb;
struct ostat osb;
@@ -2057,9 +1937,7 @@ olstat(td, uap)
* Convert from an old to a new stat structure.
*/
void
-cvtstat(st, ost)
- struct stat *st;
- struct ostat *ost;
+cvtstat(struct stat *st, struct ostat *ost)
{
bzero(ost, sizeof(*ost));
@@ -2094,12 +1972,7 @@ struct stat_args {
};
#endif
int
-sys_stat(td, uap)
- struct thread *td;
- register struct stat_args /* {
- char *path;
- struct stat *ub;
- } */ *uap;
+sys_stat(struct thread *td, struct stat_args *uap)
{
struct stat sb;
int error;
@@ -2181,12 +2054,7 @@ struct lstat_args {
};
#endif
int
-sys_lstat(td, uap)
- struct thread *td;
- register struct lstat_args /* {
- char *path;
- struct stat *ub;
- } */ *uap;
+sys_lstat(struct thread *td, struct lstat_args *uap)
{
struct stat sb;
int error;
@@ -2202,9 +2070,7 @@ sys_lstat(td, uap)
* Implementation of the NetBSD [l]stat() functions.
*/
void
-cvtnstat(sb, nsb)
- struct stat *sb;
- struct nstat *nsb;
+cvtnstat( struct stat *sb, struct nstat *nsb)
{
bzero(nsb, sizeof *nsb);
@@ -2233,12 +2099,7 @@ struct nstat_args {
};
#endif
int
-sys_nstat(td, uap)
- struct thread *td;
- register struct nstat_args /* {
- char *path;
- struct nstat *ub;
- } */ *uap;
+sys_nstat(struct thread *td, struct nstat_args *uap)
{
struct stat sb;
struct nstat nsb;
@@ -2262,12 +2123,7 @@ struct lstat_args {
};
#endif
int
-sys_nlstat(td, uap)
- struct thread *td;
- register struct nlstat_args /* {
- char *path;
- struct nstat *ub;
- } */ *uap;
+sys_nlstat(struct thread *td, struct nlstat_args *uap)
{
struct stat sb;
struct nstat nsb;
@@ -2291,12 +2147,7 @@ struct pathconf_args {
};
#endif
int
-sys_pathconf(td, uap)
- struct thread *td;
- register struct pathconf_args /* {
- char *path;
- int name;
- } */ *uap;
+sys_pathconf(struct thread *td, struct pathconf_args *uap)
{
return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name, FOLLOW));
@@ -2309,12 +2160,7 @@ struct lpathconf_args {
};
#endif
int
-sys_lpathconf(td, uap)
- struct thread *td;
- register struct lpathconf_args /* {
- char *path;
- int name;
- } */ *uap;
+sys_lpathconf(struct thread *td, struct lpathconf_args *uap)
{
return (kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name,
@@ -2350,13 +2196,7 @@ struct readlink_args {
};
#endif
int
-sys_readlink(td, uap)
- struct thread *td;
- register struct readlink_args /* {
- char *path;
- char *buf;
- size_t count;
- } */ *uap;
+sys_readlink(struct thread *td, struct readlink_args *uap)
{
return (kern_readlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2428,10 +2268,7 @@ kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
* Common implementation code for chflags() and fchflags().
*/
static int
-setfflags(td, vp, flags)
- struct thread *td;
- struct vnode *vp;
- u_long flags;
+setfflags(struct thread *td, struct vnode *vp, u_long flags)
{
struct mount *mp;
struct vattr vattr;
@@ -2478,12 +2315,7 @@ struct chflags_args {
};
#endif
int
-sys_chflags(td, uap)
- struct thread *td;
- register struct chflags_args /* {
- const char *path;
- u_long flags;
- } */ *uap;
+sys_chflags(struct thread *td, struct chflags_args *uap)
{
return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2515,13 +2347,14 @@ sys_chflagsat(struct thread *td, struct chflagsat_args *uap)
/*
* Same as chflags() but doesn't follow symlinks.
*/
+#ifndef _SYS_SYSPROTO_H_
+struct lchflags_args {
+ const char *path;
+ u_long flags;
+};
+#endif
int
-sys_lchflags(td, uap)
- struct thread *td;
- register struct lchflags_args /* {
- const char *path;
- u_long flags;
- } */ *uap;
+sys_lchflags(struct thread *td, struct lchflags_args *uap)
{
return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2558,12 +2391,7 @@ struct fchflags_args {
};
#endif
int
-sys_fchflags(td, uap)
- struct thread *td;
- register struct fchflags_args /* {
- int fd;
- u_long flags;
- } */ *uap;
+sys_fchflags(struct thread *td, struct fchflags_args *uap)
{
struct file *fp;
cap_rights_t rights;
@@ -2589,11 +2417,7 @@ sys_fchflags(td, uap)
* Common implementation code for chmod(), lchmod() and fchmod().
*/
int
-setfmode(td, cred, vp, mode)
- struct thread *td;
- struct ucred *cred;
- struct vnode *vp;
- int mode;
+setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode)
{
struct mount *mp;
struct vattr vattr;
@@ -2624,12 +2448,7 @@ struct chmod_args {
};
#endif
int
-sys_chmod(td, uap)
- struct thread *td;
- register struct chmod_args /* {
- char *path;
- int mode;
- } */ *uap;
+sys_chmod(struct thread *td, struct chmod_args *uap)
{
return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2668,12 +2487,7 @@ struct lchmod_args {
};
#endif
int
-sys_lchmod(td, uap)
- struct thread *td;
- register struct lchmod_args /* {
- char *path;
- int mode;
- } */ *uap;
+sys_lchmod(struct thread *td, struct lchmod_args *uap)
{
return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2731,12 +2545,8 @@ sys_fchmod(struct thread *td, struct fchmod_args *uap)
* Common implementation for chown(), lchown(), and fchown()
*/
int
-setfown(td, cred, vp, uid, gid)
- struct thread *td;
- struct ucred *cred;
- struct vnode *vp;
- uid_t uid;
- gid_t gid;
+setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid,
+ gid_t gid)
{
struct mount *mp;
struct vattr vattr;
@@ -2770,13 +2580,7 @@ struct chown_args {
};
#endif
int
-sys_chown(td, uap)
- struct thread *td;
- register struct chown_args /* {
- char *path;
- int uid;
- int gid;
- } */ *uap;
+sys_chown(struct thread *td, struct chown_args *uap)
{
return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE, uap->uid,
@@ -2837,13 +2641,7 @@ struct lchown_args {
};
#endif
int
-sys_lchown(td, uap)
- struct thread *td;
- register struct lchown_args /* {
- char *path;
- int uid;
- int gid;
- } */ *uap;
+sys_lchown(struct thread *td, struct lchown_args *uap)
{
return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -2861,13 +2659,7 @@ struct fchown_args {
};
#endif
int
-sys_fchown(td, uap)
- struct thread *td;
- register struct fchown_args /* {
- int fd;
- int uid;
- int gid;
- } */ *uap;
+sys_fchown(struct thread *td, struct fchown_args *uap)
{
struct file *fp;
cap_rights_t rights;
@@ -2887,10 +2679,8 @@ sys_fchown(td, uap)
* Common implementation code for utimes(), lutimes(), and futimes().
*/
static int
-getutimes(usrtvp, tvpseg, tsp)
- const struct timeval *usrtvp;
- enum uio_seg tvpseg;
- struct timespec *tsp;
+getutimes(const struct timeval *usrtvp, enum uio_seg tvpseg,
+ struct timespec *tsp)
{
struct timeval tv[2];
const struct timeval *tvp;
@@ -2967,12 +2757,8 @@ getutimens(const struct timespec *usrtsp, enum uio_seg tspseg,
* and utimensat().
*/
static int
-setutimes(td, vp, ts, numtimes, nullflag)
- struct thread *td;
- struct vnode *vp;
- const struct timespec *ts;
- int numtimes;
- int nullflag;
+setutimes(struct thread *td, struct vnode *vp, const struct timespec *ts,
+ int numtimes, int nullflag)
{
struct mount *mp;
struct vattr vattr;
@@ -3015,12 +2801,7 @@ struct utimes_args {
};
#endif
int
-sys_utimes(td, uap)
- struct thread *td;
- register struct utimes_args /* {
- char *path;
- struct timeval *tptr;
- } */ *uap;
+sys_utimes(struct thread *td, struct utimes_args *uap)
{
return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -3074,12 +2855,7 @@ struct lutimes_args {
};
#endif
int
-sys_lutimes(td, uap)
- struct thread *td;
- register struct lutimes_args /* {
- char *path;
- struct timeval *tptr;
- } */ *uap;
+sys_lutimes(struct thread *td, struct lutimes_args *uap)
{
return (kern_lutimes(td, uap->path, UIO_USERSPACE, uap->tptr,
@@ -3115,12 +2891,7 @@ struct futimes_args {
};
#endif
int
-sys_futimes(td, uap)
- struct thread *td;
- register struct futimes_args /* {
- int fd;
- struct timeval *tptr;
- } */ *uap;
+sys_futimes(struct thread *td, struct futimes_args *uap)
{
return (kern_futimes(td, uap->fd, uap->tptr, UIO_USERSPACE));
@@ -3238,13 +3009,7 @@ struct truncate_args {
};
#endif
int
-sys_truncate(td, uap)
- struct thread *td;
- register struct truncate_args /* {
- char *path;
- int pad;
- off_t length;
- } */ *uap;
+sys_truncate(struct thread *td, struct truncate_args *uap)
{
return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
@@ -3403,12 +3168,7 @@ struct rename_args {
};
#endif
int
-sys_rename(td, uap)
- struct thread *td;
- register struct rename_args /* {
- char *from;
- char *to;
- } */ *uap;
+sys_rename(struct thread *td, struct rename_args *uap)
{
return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD,
@@ -3573,12 +3333,7 @@ struct mkdir_args {
};
#endif
int
-sys_mkdir(td, uap)
- struct thread *td;
- register struct mkdir_args /* {
- char *path;
- int mode;
- } */ *uap;
+sys_mkdir(struct thread *td, struct mkdir_args *uap)
{
return (kern_mkdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
@@ -3671,11 +3426,7 @@ struct rmdir_args {
};
#endif
int
-sys_rmdir(td, uap)
- struct thread *td;
- struct rmdir_args /* {
- char *path;
- } */ *uap;
+sys_rmdir(struct thread *td, struct rmdir_args *uap)
{
return (kern_rmdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE));
@@ -3912,14 +3663,7 @@ struct getdirentries_args {
};
#endif
int
-sys_getdirentries(td, uap)
- struct thread *td;
- register struct getdirentries_args /* {
- int fd;
- char *buf;
- u_int count;
- long *basep;
- } */ *uap;
+sys_getdirentries(struct thread *td, struct getdirentries_args *uap)
{
long base;
int error;
@@ -4017,13 +3761,7 @@ struct getdents_args {
};
#endif
int
-sys_getdents(td, uap)
- struct thread *td;
- register struct getdents_args /* {
- int fd;
- char *buf;
- u_int count;
- } */ *uap;
+sys_getdents(struct thread *td, struct getdents_args *uap)
{
struct getdirentries_args ap;
@@ -4043,11 +3781,7 @@ struct umask_args {
};
#endif
int
-sys_umask(td, uap)
- struct thread *td;
- struct umask_args /* {
- int newmask;
- } */ *uap;
+sys_umask(struct thread *td, struct umask_args *uap)
{
struct filedesc *fdp;
@@ -4069,11 +3803,7 @@ struct revoke_args {
};
#endif
int
-sys_revoke(td, uap)
- struct thread *td;
- register struct revoke_args /* {
- char *path;
- } */ *uap;
+sys_revoke(struct thread *td, struct revoke_args *uap)
{
struct vnode *vp;
struct vattr vattr;
@@ -4156,13 +3886,11 @@ struct lgetfh_args {
};
#endif
int
-sys_lgetfh(td, uap)
- struct thread *td;
- register struct lgetfh_args *uap;
+sys_lgetfh(struct thread *td, struct lgetfh_args *uap)
{
struct nameidata nd;
fhandle_t fh;
- register struct vnode *vp;
+ struct vnode *vp;
int error;
error = priv_check(td, PRIV_VFS_GETFH);
@@ -4191,13 +3919,11 @@ struct getfh_args {
};
#endif
int
-sys_getfh(td, uap)
- struct thread *td;
- register struct getfh_args *uap;
+sys_getfh(struct thread *td, struct getfh_args *uap)
{
struct nameidata nd;
fhandle_t fh;
- register struct vnode *vp;
+ struct vnode *vp;
int error;
error = priv_check(td, PRIV_VFS_GETFH);
@@ -4233,12 +3959,7 @@ struct fhopen_args {
};
#endif
int
-sys_fhopen(td, uap)
- struct thread *td;
- struct fhopen_args /* {
- const struct fhandle *u_fhp;
- int flags;
- } */ *uap;
+sys_fhopen(struct thread *td, struct fhopen_args *uap)
{
struct mount *mp;
struct vnode *vp;
@@ -4322,12 +4043,7 @@ struct fhstat_args {
};
#endif
int
-sys_fhstat(td, uap)
- struct thread *td;
- register struct fhstat_args /* {
- struct fhandle *u_fhp;
- struct stat *sb;
- } */ *uap;
+sys_fhstat(struct thread *td, struct fhstat_args *uap)
{
struct stat sb;
struct fhandle fh;
@@ -4373,12 +4089,7 @@ struct fhstatfs_args {
};
#endif
int
-sys_fhstatfs(td, uap)
- struct thread *td;
- struct fhstatfs_args /* {
- struct fhandle *u_fhp;
- struct statfs *buf;
- } */ *uap;
+sys_fhstatfs(struct thread *td, struct fhstatfs_args *uap)
{
struct statfs *sfp;
fhandle_t fh;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 7a13375..12cbe31 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -413,8 +413,7 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
* Prototype text segments cannot be written.
*/
int
-vn_writechk(vp)
- register struct vnode *vp;
+vn_writechk(struct vnode *vp)
{
ASSERT_VOP_LOCKED(vp, "vn_writechk");
@@ -1369,15 +1368,11 @@ vn_statfile(fp, sb, active_cred, td)
* Stat a vnode; implementation for the stat syscall
*/
int
-vn_stat(vp, sb, active_cred, file_cred, td)
- struct vnode *vp;
- register struct stat *sb;
- struct ucred *active_cred;
- struct ucred *file_cred;
- struct thread *td;
+vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
+ struct ucred *file_cred, struct thread *td)
{
struct vattr vattr;
- register struct vattr *vap;
+ struct vattr *vap;
int error;
u_short mode;
@@ -1480,12 +1475,8 @@ vn_stat(vp, sb, active_cred, file_cred, td)
* File table vnode ioctl routine.
*/
static int
-vn_ioctl(fp, com, data, active_cred, td)
- struct file *fp;
- u_long com;
- void *data;
- struct ucred *active_cred;
- struct thread *td;
+vn_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,
+ struct thread *td)
{
struct vattr vattr;
struct vnode *vp;
@@ -1519,11 +1510,8 @@ vn_ioctl(fp, com, data, active_cred, td)
* File table vnode poll routine.
*/
static int
-vn_poll(fp, events, active_cred, td)
- struct file *fp;
- int events;
- struct ucred *active_cred;
- struct thread *td;
+vn_poll(struct file *fp, int events, struct ucred *active_cred,
+ struct thread *td)
{
struct vnode *vp;
int error;
@@ -1768,8 +1756,7 @@ vn_start_secondary_write(struct vnode *vp, struct mount **mpp, int flags)
* now in effect.
*/
void
-vn_finished_write(mp)
- struct mount *mp;
+vn_finished_write(struct mount *mp)
{
if (mp == NULL || !vn_suspendable(mp))
return;
@@ -1791,8 +1778,7 @@ vn_finished_write(mp)
* that the suspension is now in effect.
*/
void
-vn_finished_secondary_write(mp)
- struct mount *mp;
+vn_finished_secondary_write(struct mount *mp)
{
if (mp == NULL || !vn_suspendable(mp))
return;
OpenPOWER on IntegriCloud