summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/spec_vnops.c73
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c64
-rw-r--r--sys/miscfs/portal/portal_vfsops.c29
-rw-r--r--sys/miscfs/portal/portal_vnops.c49
-rw-r--r--sys/miscfs/procfs/procfs_cmdline.c8
-rw-r--r--sys/miscfs/procfs/procfs_ctl.c14
-rw-r--r--sys/miscfs/procfs/procfs_linux.c6
-rw-r--r--sys/miscfs/procfs/procfs_note.c8
-rw-r--r--sys/miscfs/procfs/procfs_status.c13
-rw-r--r--sys/miscfs/procfs/procfs_subr.c29
-rw-r--r--sys/miscfs/procfs/procfs_vfsops.c29
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c68
-rw-r--r--sys/miscfs/specfs/spec_vnops.c73
13 files changed, 152 insertions, 311 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index 906a9422a13..d6507439703 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.42 2007/06/02 00:45:21 thib Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.43 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -110,8 +110,7 @@ spec_vnoperate(void *v)
* Trivial lookup routine that always fails.
*/
int
-spec_lookup(v)
- void *v;
+spec_lookup(void *v)
{
struct vop_lookup_args *ap = v;
@@ -124,8 +123,7 @@ spec_lookup(v)
*/
/* ARGSUSED */
int
-spec_open(v)
- void *v;
+spec_open(void *v)
{
struct vop_open_args *ap = v;
struct proc *p = ap->a_p;
@@ -133,7 +131,7 @@ spec_open(v)
struct vnode *bvp;
dev_t bdev;
dev_t dev = (dev_t)vp->v_rdev;
- register int maj = major(dev);
+ int maj = major(dev);
int error;
/*
@@ -213,12 +211,11 @@ spec_open(v)
*/
/* ARGSUSED */
int
-spec_read(v)
- void *v;
+spec_read(void *v)
{
struct vop_read_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct uio *uio = ap->a_uio;
+ struct vnode *vp = ap->a_vp;
+ struct uio *uio = ap->a_uio;
struct proc *p = uio->uio_procp;
struct buf *bp;
daddr64_t bn, nextbn, bscale;
@@ -290,8 +287,7 @@ spec_read(v)
}
int
-spec_inactive(v)
- void *v;
+spec_inactive(void *v)
{
struct vop_inactive_args *ap = v;
@@ -304,12 +300,11 @@ spec_inactive(v)
*/
/* ARGSUSED */
int
-spec_write(v)
- void *v;
+spec_write(void *v)
{
struct vop_write_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct uio *uio = ap->a_uio;
+ struct vnode *vp = ap->a_vp;
+ struct uio *uio = ap->a_uio;
struct proc *p = uio->uio_procp;
struct buf *bp;
daddr64_t bn, bscale;
@@ -382,8 +377,7 @@ spec_write(v)
*/
/* ARGSUSED */
int
-spec_ioctl(v)
- void *v;
+spec_ioctl(void *v)
{
struct vop_ioctl_args *ap = v;
dev_t dev = ap->a_vp->v_rdev;
@@ -407,11 +401,10 @@ spec_ioctl(v)
/* ARGSUSED */
int
-spec_poll(v)
- void *v;
+spec_poll(void *v)
{
struct vop_poll_args *ap = v;
- register dev_t dev;
+ dev_t dev;
switch (ap->a_vp->v_type) {
@@ -426,8 +419,7 @@ spec_poll(v)
}
/* ARGSUSED */
int
-spec_kqfilter(v)
- void *v;
+spec_kqfilter(void *v)
{
struct vop_kqfilter_args *ap = v;
@@ -444,12 +436,11 @@ spec_kqfilter(v)
*/
/* ARGSUSED */
int
-spec_fsync(v)
- void *v;
+spec_fsync(void *v)
{
struct vop_fsync_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct buf *bp;
+ struct vnode *vp = ap->a_vp;
+ struct buf *bp;
struct buf *nbp;
int s;
@@ -489,8 +480,7 @@ loop:
}
int
-spec_strategy(v)
- void *v;
+spec_strategy(void *v)
{
struct vop_strategy_args *ap = v;
struct buf *bp = ap->a_bp;
@@ -507,8 +497,7 @@ spec_strategy(v)
* This is a noop, simply returning what one has been given.
*/
int
-spec_bmap(v)
- void *v;
+spec_bmap(void *v)
{
struct vop_bmap_args *ap = v;
@@ -527,11 +516,10 @@ spec_bmap(v)
*/
/* ARGSUSED */
int
-spec_close(v)
- void *v;
+spec_close(void *v)
{
struct vop_close_args *ap = v;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
dev_t dev = vp->v_rdev;
int (*devclose)(dev_t, int, int, struct proc *);
int mode, error;
@@ -607,8 +595,7 @@ spec_close(v)
* Print out the contents of a special device vnode.
*/
int
-spec_print(v)
- void *v;
+spec_print(void *v)
{
struct vop_print_args *ap = v;
@@ -621,8 +608,7 @@ spec_print(v)
* Return POSIX pathconf information applicable to special devices.
*/
int
-spec_pathconf(v)
- void *v;
+spec_pathconf(void *v)
{
struct vop_pathconf_args *ap = v;
@@ -656,11 +642,10 @@ spec_pathconf(v)
*/
/* ARGSUSED */
int
-spec_advlock(v)
- void *v;
+spec_advlock(void *v)
{
struct vop_advlock_args *ap = v;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
return (lf_advlock(&vp->v_speclockf, (off_t)0, ap->a_id,
ap->a_op, ap->a_fl, ap->a_flags));
@@ -671,8 +656,7 @@ spec_advlock(v)
*/
/*ARGSUSED*/
int
-spec_ebadf(v)
- void *v;
+spec_ebadf(void *v)
{
return (EBADF);
@@ -683,8 +667,7 @@ spec_ebadf(v)
*/
/*ARGSUSED*/
int
-spec_badop(v)
- void *v;
+spec_badop(void *v)
{
panic("spec_badop called");
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 5f7961a2149..0a9ae50cf51 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.23 2007/06/01 23:47:57 deraadt Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.24 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -128,8 +128,7 @@ struct filterops fifowrite_filtops =
*/
/* ARGSUSED */
int
-fifo_lookup(v)
- void *v;
+fifo_lookup(void *v)
{
struct vop_lookup_args *ap = v;
@@ -143,12 +142,11 @@ fifo_lookup(v)
*/
/* ARGSUSED */
int
-fifo_open(v)
- void *v;
+fifo_open(void *v)
{
struct vop_open_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct fifoinfo *fip;
+ struct vnode *vp = ap->a_vp;
+ struct fifoinfo *fip;
struct proc *p = ap->a_p;
struct socket *rso, *wso;
int error;
@@ -229,12 +227,11 @@ bad:
*/
/* ARGSUSED */
int
-fifo_read(v)
- void *v;
+fifo_read(void *v)
{
struct vop_read_args *ap = v;
- register struct uio *uio = ap->a_uio;
- register struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock;
+ struct uio *uio = ap->a_uio;
+ struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock;
struct proc *p = uio->uio_procp;
int error;
@@ -263,8 +260,7 @@ fifo_read(v)
*/
/* ARGSUSED */
int
-fifo_write(v)
- void *v;
+fifo_write(void *v)
{
struct vop_write_args *ap = v;
struct socket *wso = ap->a_vp->v_fifoinfo->fi_writesock;
@@ -290,8 +286,7 @@ fifo_write(v)
*/
/* ARGSUSED */
int
-fifo_ioctl(v)
- void *v;
+fifo_ioctl(void *v)
{
struct vop_ioctl_args *ap = v;
struct file filetmp;
@@ -316,8 +311,7 @@ fifo_ioctl(v)
/* ARGSUSED */
int
-fifo_poll(v)
- void *v;
+fifo_poll(void *v)
{
struct vop_poll_args *ap = v;
struct file filetmp;
@@ -349,8 +343,7 @@ fifo_poll(v)
}
int
-fifo_inactive(v)
- void *v;
+fifo_inactive(void *v)
{
struct vop_inactive_args *ap = v;
@@ -362,8 +355,7 @@ fifo_inactive(v)
* This is a noop, simply returning what one has been given.
*/
int
-fifo_bmap(v)
- void *v;
+fifo_bmap(void *v)
{
struct vop_bmap_args *ap = v;
@@ -379,12 +371,11 @@ fifo_bmap(v)
*/
/* ARGSUSED */
int
-fifo_close(v)
- void *v;
+fifo_close(void *v)
{
struct vop_close_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct fifoinfo *fip = vp->v_fifoinfo;
+ struct vnode *vp = ap->a_vp;
+ struct fifoinfo *fip = vp->v_fifoinfo;
int error1 = 0, error2 = 0;
if (fip == NULL)
@@ -429,8 +420,7 @@ fifo_reclaim(void *v)
* Print out the contents of a fifo vnode.
*/
int
-fifo_print(v)
- void *v;
+fifo_print(void *v)
{
struct vop_print_args *ap = v;
@@ -444,10 +434,9 @@ fifo_print(v)
* Print out internal contents of a fifo vnode.
*/
void
-fifo_printinfo(vp)
- struct vnode *vp;
+fifo_printinfo(struct vnode *vp)
{
- register struct fifoinfo *fip = vp->v_fifoinfo;
+ struct fifoinfo *fip = vp->v_fifoinfo;
printf(", fifo with %ld readers and %ld writers",
fip->fi_readers, fip->fi_writers);
@@ -457,8 +446,7 @@ fifo_printinfo(vp)
* Return POSIX pathconf information applicable to fifo's.
*/
int
-fifo_pathconf(v)
- void *v;
+fifo_pathconf(void *v)
{
struct vop_pathconf_args *ap = v;
@@ -483,8 +471,7 @@ fifo_pathconf(v)
*/
/*ARGSUSED*/
int
-fifo_ebadf(v)
- void *v;
+fifo_ebadf(void *v)
{
return (EBADF);
@@ -495,8 +482,7 @@ fifo_ebadf(v)
*/
/* ARGSUSED */
int
-fifo_advlock(v)
- void *v;
+fifo_advlock(void *v)
{
return (EOPNOTSUPP);
}
@@ -506,8 +492,7 @@ fifo_advlock(v)
*/
/*ARGSUSED*/
int
-fifo_badop(v)
- void *v;
+fifo_badop(void *v)
{
panic("fifo_badop called");
@@ -517,8 +502,7 @@ fifo_badop(v)
int
-fifo_kqfilter(v)
- void *v;
+fifo_kqfilter(void *v)
{
struct vop_kqfilter_args *ap = v;
struct socket *so = (struct socket *)ap->a_vp->v_fifoinfo->fi_readsock;
diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c
index 228fda28e37..5564b84e233 100644
--- a/sys/miscfs/portal/portal_vfsops.c
+++ b/sys/miscfs/portal/portal_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portal_vfsops.c,v 1.20 2004/05/20 18:32:38 tedu Exp $ */
+/* $OpenBSD: portal_vfsops.c,v 1.21 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */
/*
@@ -73,12 +73,8 @@ int portal_statfs(struct mount *, struct statfs *, struct proc *);
* Mount the per-process file descriptors (/dev/fd)
*/
int
-portal_mount(mp, path, data, ndp, p)
- struct mount *mp;
- const char *path;
- void *data;
- struct nameidata *ndp;
- struct proc *p;
+portal_mount(struct mount *mp, const char *path, void *data, struct nameidata *ndp,
+ struct proc *p)
{
struct file *fp;
struct portal_args args;
@@ -139,20 +135,14 @@ portal_mount(mp, path, data, ndp, p)
}
int
-portal_start(mp, flags, p)
- struct mount *mp;
- int flags;
- struct proc *p;
+portal_start(struct mount *mp, int flags, struct proc *p)
{
return (0);
}
int
-portal_unmount(mp, mntflags, p)
- struct mount *mp;
- int mntflags;
- struct proc *p;
+portal_unmount(struct mount *mp, int mntflags, struct proc *p)
{
struct vnode *rvp = VFSTOPORTAL(mp)->pm_root;
int error, flags = 0;
@@ -205,9 +195,7 @@ portal_unmount(mp, mntflags, p)
}
int
-portal_root(mp, vpp)
- struct mount *mp;
- struct vnode **vpp;
+portal_root(struct mount *mp, struct vnode **vpp)
{
struct vnode *vp;
struct proc *p = curproc;
@@ -223,10 +211,7 @@ portal_root(mp, vpp)
}
int
-portal_statfs(mp, sbp, p)
- struct mount *mp;
- struct statfs *sbp;
- struct proc *p;
+portal_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
{
sbp->f_bsize = DEV_BSIZE;
diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c
index 68473dfb8fd..8da73a81bc9 100644
--- a/sys/miscfs/portal/portal_vnops.c
+++ b/sys/miscfs/portal/portal_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portal_vnops.c,v 1.23 2007/06/01 23:47:57 deraadt Exp $ */
+/* $OpenBSD: portal_vnops.c,v 1.24 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: portal_vnops.c,v 1.17 1996/02/13 13:12:57 mycroft Exp $ */
/*
@@ -147,9 +147,7 @@ struct vnodeopv_desc portal_vnodeop_opv_desc =
{ &portal_vnodeop_p, portal_vnodeop_entries };
static void
-portal_closefd(p, fd)
- struct proc *p;
- int fd;
+portal_closefd(struct proc *p, int fd)
{
struct sys_close_args /* {
syscallarg(int) fd;
@@ -172,8 +170,7 @@ portal_closefd(p, fd)
* cnp is the name to locate in that directory...
*/
int
-portal_lookup(v)
- void *v;
+portal_lookup(void *v)
{
struct vop_lookup_args *ap = v;
struct componentname *cnp = ap->a_cnp;
@@ -239,9 +236,7 @@ bad:;
}
static int
-portal_connect(so, so2)
- struct socket *so;
- struct socket *so2;
+portal_connect(struct socket *so, struct socket *so2)
{
/* from unp_connect, bypassing the namei stuff... */
struct socket *so3;
@@ -272,8 +267,7 @@ portal_connect(so, so2)
}
int
-portal_open(v)
- void *v;
+portal_open(void *v)
{
struct vop_open_args *ap = v;
struct socket *so = 0;
@@ -509,8 +503,7 @@ bad:;
}
int
-portal_getattr(v)
- void *v;
+portal_getattr(void *v)
{
struct vop_getattr_args *ap = v;
struct vnode *vp = ap->a_vp;
@@ -551,8 +544,7 @@ portal_getattr(v)
}
int
-portal_setattr(v)
- void *v;
+portal_setattr(void *v)
{
struct vop_setattr_args *ap = v;
@@ -574,16 +566,14 @@ portal_setattr(v)
*/
/*ARGSUSED*/
int
-portal_readdir(v)
- void *v;
+portal_readdir(void *v)
{
return (0);
}
/*ARGSUSED*/
int
-portal_inactive(v)
- void *v;
+portal_inactive(void *v)
{
struct vop_inactive_args *ap = v;
@@ -592,8 +582,7 @@ portal_inactive(v)
}
int
-portal_reclaim(v)
- void *v;
+portal_reclaim(void *v)
{
struct vop_reclaim_args *ap = v;
struct portalnode *pt = VTOPORTAL(ap->a_vp);
@@ -612,8 +601,7 @@ portal_reclaim(v)
* Return POSIX pathconf information applicable to special devices.
*/
int
-portal_pathconf(v)
- void *v;
+portal_pathconf(void *v)
{
struct vop_pathconf_args *ap = v;
@@ -647,16 +635,14 @@ portal_pathconf(v)
*/
/* ARGSUSED */
int
-portal_print(v)
- void *v;
+portal_print(void *v)
{
printf("tag VT_PORTAL, portal vnode\n");
return (0);
}
int
-portal_link(v)
- void *v;
+portal_link(void *v)
{
struct vop_link_args *ap = v;
@@ -666,8 +652,7 @@ portal_link(v)
}
int
-portal_symlink(v)
- void *v;
+portal_symlink(void *v)
{
struct vop_symlink_args *ap = v;
@@ -677,16 +662,14 @@ portal_symlink(v)
}
int
-portal_badop(v)
- void *v;
+portal_badop(void *v)
{
panic ("portal: bad op");
return (0);
}
int
-portal_poll(v)
- void *v;
+portal_poll(void *v)
{
struct vop_poll_args *ap = v;
diff --git a/sys/miscfs/procfs/procfs_cmdline.c b/sys/miscfs/procfs/procfs_cmdline.c
index 5e07d4fa122..c6a1209043a 100644
--- a/sys/miscfs/procfs/procfs_cmdline.c
+++ b/sys/miscfs/procfs/procfs_cmdline.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_cmdline.c,v 1.7 2006/11/29 12:24:18 miod Exp $ */
+/* $OpenBSD: procfs_cmdline.c,v 1.8 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_cmdline.c,v 1.3 1999/03/13 22:26:48 thorpej Exp $ */
/*
@@ -53,11 +53,7 @@
* code for returning process's command line arguments
*/
int
-procfs_docmdline(curp, p, pfs, uio)
- struct proc *curp;
- struct proc *p;
- struct pfsnode *pfs;
- struct uio *uio;
+procfs_docmdline(struct proc *curp, struct proc *p, struct pfsnode *pfs, struct uio *uio)
{
struct ps_strings pss;
int count, error, i;
diff --git a/sys/miscfs/procfs/procfs_ctl.c b/sys/miscfs/procfs/procfs_ctl.c
index 6644edb495b..b2d5a1ce74c 100644
--- a/sys/miscfs/procfs/procfs_ctl.c
+++ b/sys/miscfs/procfs/procfs_ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_ctl.c,v 1.20 2007/03/15 10:22:30 art Exp $ */
+/* $OpenBSD: procfs_ctl.c,v 1.21 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_ctl.c,v 1.14 1996/02/09 22:40:48 christos Exp $ */
/*
@@ -105,10 +105,8 @@ static const vfs_namemap_t signames[] = {
static int procfs_control(struct proc *, struct proc *, int);
static int
-procfs_control(curp, p, op)
- struct proc *curp; /* tracer */
- struct proc *p; /* traced */
- int op;
+procfs_control(struct proc *curp, struct proc *p, int op)
+/* *curp being the tracer, and *p the traced */
{
int error;
int s;
@@ -261,11 +259,7 @@ procfs_control(curp, p, op)
#endif
int
-procfs_doctl(curp, p, pfs, uio)
- struct proc *curp;
- struct pfsnode *pfs;
- struct uio *uio;
- struct proc *p;
+procfs_doctl(struct proc *curp, struct proc *p, struct pfsnode *pfs, struct uio *uio)
{
int xlen;
int error;
diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c
index ff765b01c21..51a673c639e 100644
--- a/sys/miscfs/procfs/procfs_linux.c
+++ b/sys/miscfs/procfs/procfs_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_linux.c,v 1.7 2007/01/01 21:43:57 pedro Exp $ */
+/* $OpenBSD: procfs_linux.c,v 1.8 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_linux.c,v 1.2.4.1 2001/03/30 21:48:11 he Exp $ */
/*
@@ -126,9 +126,7 @@ procfs_docpuinfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
#ifndef __i386__
int
-procfs_getcpuinfstr(buf, len)
- char *buf;
- int *len;
+procfs_getcpuinfstr(char *buf, int *len)
{
*len = 0;
diff --git a/sys/miscfs/procfs/procfs_note.c b/sys/miscfs/procfs/procfs_note.c
index 9ec70466a72..ce5b68a17e2 100644
--- a/sys/miscfs/procfs/procfs_note.c
+++ b/sys/miscfs/procfs/procfs_note.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_note.c,v 1.3 2003/06/02 23:28:11 millert Exp $ */
+/* $OpenBSD: procfs_note.c,v 1.4 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_note.c,v 1.8 1994/06/29 06:34:53 cgd Exp $ */
/*
@@ -46,11 +46,7 @@
#include <miscfs/procfs/procfs.h>
int
-procfs_donote(curp, p, pfs, uio)
- struct proc *curp;
- struct proc *p;
- struct pfsnode *pfs;
- struct uio *uio;
+procfs_donote(struct proc *curp, struct proc *p, struct pfsnode *pfs, struct uio *uio)
{
int xlen;
int error;
diff --git a/sys/miscfs/procfs/procfs_status.c b/sys/miscfs/procfs/procfs_status.c
index 0f26fbf9a52..0a6fbb47fff 100644
--- a/sys/miscfs/procfs/procfs_status.c
+++ b/sys/miscfs/procfs/procfs_status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_status.c,v 1.9 2006/11/29 12:24:18 miod Exp $ */
+/* $OpenBSD: procfs_status.c,v 1.10 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_status.c,v 1.11 1996/03/16 23:52:50 christos Exp $ */
/*
@@ -62,10 +62,7 @@ int procfs_stat_gen(struct proc *, char *s, int);
* comm pid ppid pgid sid maj,min ctty,sldr start ut st wmsg uid gid groups
*/
int
-procfs_stat_gen(p, s, l)
- struct proc *p;
- char *s;
- int l;
+procfs_stat_gen(struct proc *p, char *s, int l)
{
struct session *sess;
struct tty *tp;
@@ -148,11 +145,7 @@ procfs_stat_gen(p, s, l)
}
int
-procfs_dostatus(curp, p, pfs, uio)
- struct proc *curp;
- struct proc *p;
- struct pfsnode *pfs;
- struct uio *uio;
+procfs_dostatus(struct proc *curp, struct proc *p, struct pfsnode *pfs, struct uio *uio)
{
char *ps;
int error, len;
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c
index 7343fc7fb38..bbea0ff18bb 100644
--- a/sys/miscfs/procfs/procfs_subr.c
+++ b/sys/miscfs/procfs/procfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_subr.c,v 1.25 2006/03/05 21:48:56 miod Exp $ */
+/* $OpenBSD: procfs_subr.c,v 1.26 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */
/*
@@ -53,9 +53,7 @@ struct lock pfs_vlock;
/*ARGSUSED*/
int
-procfs_init(vfsp)
- struct vfsconf *vfsp;
-
+procfs_init(struct vfsconf *vfsp)
{
lockinit(&pfs_vlock, PVFS, "procfsl", 0, 0);
TAILQ_INIT(&pfshead);
@@ -89,11 +87,7 @@ procfs_init(vfsp)
* the vnode free list.
*/
int
-procfs_allocvp(mp, vpp, pid, pfs_type)
- struct mount *mp;
- struct vnode **vpp;
- long pid;
- pfstype pfs_type;
+procfs_allocvp(struct mount *mp, struct vnode **vpp, long pid, pfstype pfs_type)
{
struct proc *p = curproc;
struct pfsnode *pfs;
@@ -187,8 +181,7 @@ out:
}
int
-procfs_freevp(vp)
- struct vnode *vp;
+procfs_freevp(struct vnode *vp)
{
struct pfsnode *pfs = VTOPFS(vp);
@@ -199,8 +192,7 @@ procfs_freevp(vp)
}
int
-procfs_rw(v)
- void *v;
+procfs_rw(void *v)
{
struct vop_read_args *ap = v;
struct vnode *vp = ap->a_vp;
@@ -259,10 +251,7 @@ procfs_rw(v)
* EFAULT: user i/o buffer is not addressable
*/
int
-vfs_getuserstr(uio, buf, buflenp)
- struct uio *uio;
- char *buf;
- int *buflenp;
+vfs_getuserstr(struct uio *uio, char *buf, int *buflenp)
{
int xlen;
int error;
@@ -294,12 +283,8 @@ vfs_getuserstr(uio, buf, buflenp)
}
const vfs_namemap_t *
-vfs_findname(nm, buf, buflen)
- const vfs_namemap_t *nm;
- char *buf;
- int buflen;
+vfs_findname(const vfs_namemap_t *nm, char *buf, int buflen)
{
-
for (; nm->nm_name; nm++)
if (bcmp(buf, nm->nm_name, buflen + 1) == 0)
return (nm);
diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c
index 632d9c7867b..637786a675e 100644
--- a/sys/miscfs/procfs/procfs_vfsops.c
+++ b/sys/miscfs/procfs/procfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vfsops.c,v 1.24 2004/05/20 18:32:38 tedu Exp $ */
+/* $OpenBSD: procfs_vfsops.c,v 1.25 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */
/*
@@ -68,12 +68,8 @@ int procfs_statfs(struct mount *, struct statfs *, struct proc *);
*/
/* ARGSUSED */
int
-procfs_mount(mp, path, data, ndp, p)
- struct mount *mp;
- const char *path;
- void *data;
- struct nameidata *ndp;
- struct proc *p;
+procfs_mount(struct mount *mp, const char *path, void *data, struct nameidata *ndp,
+ struct proc *p)
{
size_t size;
struct procfsmount *pmnt;
@@ -123,10 +119,7 @@ procfs_mount(mp, path, data, ndp, p)
* unmount system call
*/
int
-procfs_unmount(mp, mntflags, p)
- struct mount *mp;
- int mntflags;
- struct proc *p;
+procfs_unmount(struct mount *mp, int mntflags, struct proc *p)
{
int error;
extern int doforce;
@@ -149,9 +142,7 @@ procfs_unmount(mp, mntflags, p)
}
int
-procfs_root(mp, vpp)
- struct mount *mp;
- struct vnode **vpp;
+procfs_root(struct mount *mp, struct vnode **vpp)
{
int error;
@@ -165,10 +156,7 @@ procfs_root(mp, vpp)
/* ARGSUSED */
int
-procfs_start(mp, flags, p)
- struct mount *mp;
- int flags;
- struct proc *p;
+procfs_start(struct mount *mp, int flags, struct proc *p)
{
return (0);
@@ -178,10 +166,7 @@ procfs_start(mp, flags, p)
* Get file system statistics.
*/
int
-procfs_statfs(mp, sbp, p)
- struct mount *mp;
- struct statfs *sbp;
- struct proc *p;
+procfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
{
struct vmtotal vmtotals;
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 12813cf8b34..829dcc1bc36 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vnops.c,v 1.39 2007/06/01 23:47:57 deraadt Exp $ */
+/* $OpenBSD: procfs_vnops.c,v 1.40 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */
/*
@@ -204,8 +204,7 @@ struct vnodeopv_desc procfs_vnodeop_opv_desc =
* memory images.
*/
int
-procfs_open(v)
- void *v;
+procfs_open(void *v)
{
struct vop_open_args *ap = v;
struct pfsnode *pfs = VTOPFS(ap->a_vp);
@@ -245,8 +244,7 @@ procfs_open(v)
* any exclusive open flag (see _open above).
*/
int
-procfs_close(v)
- void *v;
+procfs_close(void *v)
{
struct vop_close_args *ap = v;
struct pfsnode *pfs = VTOPFS(ap->a_vp);
@@ -282,8 +280,7 @@ procfs_close(v)
*/
/*ARGSUSED*/
int
-procfs_ioctl(v)
- void *v;
+procfs_ioctl(void *v)
{
return (ENOTTY);
@@ -300,8 +297,7 @@ procfs_ioctl(v)
* (EIO) would be a reasonable alternative.
*/
int
-procfs_bmap(v)
- void *v;
+procfs_bmap(void *v)
{
struct vop_bmap_args *ap = v;
@@ -329,8 +325,7 @@ procfs_bmap(v)
* (vp) is not locked on entry or exit.
*/
int
-procfs_inactive(v)
- void *v;
+procfs_inactive(void *v)
{
struct vop_inactive_args *ap = v;
struct vnode *vp = ap->a_vp;
@@ -350,8 +345,7 @@ procfs_inactive(v)
* from any private lists.
*/
int
-procfs_reclaim(v)
- void *v;
+procfs_reclaim(void *v)
{
struct vop_reclaim_args *ap = v;
@@ -362,8 +356,7 @@ procfs_reclaim(v)
* Return POSIX pathconf information applicable to special devices.
*/
int
-procfs_pathconf(v)
- void *v;
+procfs_pathconf(void *v)
{
struct vop_pathconf_args *ap = v;
@@ -398,8 +391,7 @@ procfs_pathconf(v)
* of (vp).
*/
int
-procfs_print(v)
- void *v;
+procfs_print(void *v)
{
struct vop_print_args *ap = v;
struct pfsnode *pfs = VTOPFS(ap->a_vp);
@@ -410,8 +402,7 @@ procfs_print(v)
}
int
-procfs_link(v)
- void *v;
+procfs_link(void *v)
{
struct vop_link_args *ap = v;
@@ -421,8 +412,7 @@ procfs_link(v)
}
int
-procfs_symlink(v)
- void *v;
+procfs_symlink(void *v)
{
struct vop_symlink_args *ap = v;
@@ -437,8 +427,7 @@ procfs_symlink(v)
*/
/*ARGSUSED*/
int
-procfs_badop(v)
- void *v;
+procfs_badop(void *v)
{
return (EIO);
@@ -454,8 +443,7 @@ procfs_badop(v)
* this is relatively minimal for procfs.
*/
int
-procfs_getattr(v)
- void *v;
+procfs_getattr(void *v)
{
struct vop_getattr_args *ap = v;
struct pfsnode *pfs = VTOPFS(ap->a_vp);
@@ -636,8 +624,7 @@ procfs_getattr(v)
/*ARGSUSED*/
int
-procfs_setattr(v)
- void *v;
+procfs_setattr(void *v)
{
/*
* just fake out attribute setting
@@ -661,8 +648,7 @@ procfs_setattr(v)
* that the operation really does make sense.
*/
int
-procfs_access(v)
- void *v;
+procfs_access(void *v)
{
struct vop_access_args *ap = v;
struct vattr va;
@@ -685,8 +671,7 @@ procfs_access(v)
* read and inwardly digest ufs_lookup().
*/
int
-procfs_lookup(v)
- void *v;
+procfs_lookup(void *v)
{
struct vop_lookup_args *ap = v;
struct componentname *cnp = ap->a_cnp;
@@ -827,18 +812,14 @@ procfs_lookup(v)
}
int
-procfs_validfile(p, mp)
- struct proc *p;
- struct mount *mp;
+procfs_validfile(struct proc *p, struct mount *mp)
{
return (p->p_textvp != NULLVP);
}
int
-procfs_validfile_linux(p, mp)
- struct proc *p;
- struct mount *mp;
+procfs_validfile_linux(struct proc *p, struct mount *mp)
{
int flags;
@@ -860,8 +841,7 @@ procfs_validfile_linux(p, mp)
* this should just be done through read()
*/
int
-procfs_readdir(v)
- void *v;
+procfs_readdir(void *v)
{
struct vop_readdir_args *ap = v;
struct uio *uio = ap->a_uio;
@@ -1029,8 +1009,7 @@ procfs_readdir(v)
* readlink reads the link of `curproc'
*/
int
-procfs_readlink(v)
- void *v;
+procfs_readlink(void *v)
{
struct vop_readlink_args *ap = v;
char buf[16]; /* should be enough */
@@ -1052,9 +1031,7 @@ procfs_readlink(v)
* convert decimal ascii to pid_t
*/
static pid_t
-atopid(b, len)
- const char *b;
- u_int len;
+atopid(const char *b, u_int len)
{
pid_t p = 0;
@@ -1070,8 +1047,7 @@ atopid(b, len)
return (p);
}
int
-procfs_poll(v)
- void *v;
+procfs_poll(void *v)
{
struct vop_poll_args *ap = v;
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index 906a9422a13..d6507439703 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.42 2007/06/02 00:45:21 thib Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.43 2007/06/18 08:30:07 jasper Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -110,8 +110,7 @@ spec_vnoperate(void *v)
* Trivial lookup routine that always fails.
*/
int
-spec_lookup(v)
- void *v;
+spec_lookup(void *v)
{
struct vop_lookup_args *ap = v;
@@ -124,8 +123,7 @@ spec_lookup(v)
*/
/* ARGSUSED */
int
-spec_open(v)
- void *v;
+spec_open(void *v)
{
struct vop_open_args *ap = v;
struct proc *p = ap->a_p;
@@ -133,7 +131,7 @@ spec_open(v)
struct vnode *bvp;
dev_t bdev;
dev_t dev = (dev_t)vp->v_rdev;
- register int maj = major(dev);
+ int maj = major(dev);
int error;
/*
@@ -213,12 +211,11 @@ spec_open(v)
*/
/* ARGSUSED */
int
-spec_read(v)
- void *v;
+spec_read(void *v)
{
struct vop_read_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct uio *uio = ap->a_uio;
+ struct vnode *vp = ap->a_vp;
+ struct uio *uio = ap->a_uio;
struct proc *p = uio->uio_procp;
struct buf *bp;
daddr64_t bn, nextbn, bscale;
@@ -290,8 +287,7 @@ spec_read(v)
}
int
-spec_inactive(v)
- void *v;
+spec_inactive(void *v)
{
struct vop_inactive_args *ap = v;
@@ -304,12 +300,11 @@ spec_inactive(v)
*/
/* ARGSUSED */
int
-spec_write(v)
- void *v;
+spec_write(void *v)
{
struct vop_write_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct uio *uio = ap->a_uio;
+ struct vnode *vp = ap->a_vp;
+ struct uio *uio = ap->a_uio;
struct proc *p = uio->uio_procp;
struct buf *bp;
daddr64_t bn, bscale;
@@ -382,8 +377,7 @@ spec_write(v)
*/
/* ARGSUSED */
int
-spec_ioctl(v)
- void *v;
+spec_ioctl(void *v)
{
struct vop_ioctl_args *ap = v;
dev_t dev = ap->a_vp->v_rdev;
@@ -407,11 +401,10 @@ spec_ioctl(v)
/* ARGSUSED */
int
-spec_poll(v)
- void *v;
+spec_poll(void *v)
{
struct vop_poll_args *ap = v;
- register dev_t dev;
+ dev_t dev;
switch (ap->a_vp->v_type) {
@@ -426,8 +419,7 @@ spec_poll(v)
}
/* ARGSUSED */
int
-spec_kqfilter(v)
- void *v;
+spec_kqfilter(void *v)
{
struct vop_kqfilter_args *ap = v;
@@ -444,12 +436,11 @@ spec_kqfilter(v)
*/
/* ARGSUSED */
int
-spec_fsync(v)
- void *v;
+spec_fsync(void *v)
{
struct vop_fsync_args *ap = v;
- register struct vnode *vp = ap->a_vp;
- register struct buf *bp;
+ struct vnode *vp = ap->a_vp;
+ struct buf *bp;
struct buf *nbp;
int s;
@@ -489,8 +480,7 @@ loop:
}
int
-spec_strategy(v)
- void *v;
+spec_strategy(void *v)
{
struct vop_strategy_args *ap = v;
struct buf *bp = ap->a_bp;
@@ -507,8 +497,7 @@ spec_strategy(v)
* This is a noop, simply returning what one has been given.
*/
int
-spec_bmap(v)
- void *v;
+spec_bmap(void *v)
{
struct vop_bmap_args *ap = v;
@@ -527,11 +516,10 @@ spec_bmap(v)
*/
/* ARGSUSED */
int
-spec_close(v)
- void *v;
+spec_close(void *v)
{
struct vop_close_args *ap = v;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
dev_t dev = vp->v_rdev;
int (*devclose)(dev_t, int, int, struct proc *);
int mode, error;
@@ -607,8 +595,7 @@ spec_close(v)
* Print out the contents of a special device vnode.
*/
int
-spec_print(v)
- void *v;
+spec_print(void *v)
{
struct vop_print_args *ap = v;
@@ -621,8 +608,7 @@ spec_print(v)
* Return POSIX pathconf information applicable to special devices.
*/
int
-spec_pathconf(v)
- void *v;
+spec_pathconf(void *v)
{
struct vop_pathconf_args *ap = v;
@@ -656,11 +642,10 @@ spec_pathconf(v)
*/
/* ARGSUSED */
int
-spec_advlock(v)
- void *v;
+spec_advlock(void *v)
{
struct vop_advlock_args *ap = v;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
return (lf_advlock(&vp->v_speclockf, (off_t)0, ap->a_id,
ap->a_op, ap->a_fl, ap->a_flags));
@@ -671,8 +656,7 @@ spec_advlock(v)
*/
/*ARGSUSED*/
int
-spec_ebadf(v)
- void *v;
+spec_ebadf(void *v)
{
return (EBADF);
@@ -683,8 +667,7 @@ spec_ebadf(v)
*/
/*ARGSUSED*/
int
-spec_badop(v)
- void *v;
+spec_badop(void *v)
{
panic("spec_badop called");