Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs KNF and other misc. cosmetic changes.
details: https://anonhg.NetBSD.org/src/rev/4051e860f57a
branches: trunk
changeset: 525717:4051e860f57a
user: enami <enami%NetBSD.org@localhost>
date: Tue Apr 16 06:00:46 2002 +0000
description:
KNF and other misc. cosmetic changes.
diffstat:
sys/miscfs/genfs/genfs_vnops.c | 228 +++++++++++++++++++---------------------
1 files changed, 106 insertions(+), 122 deletions(-)
diffs (truncated from 738 to 300 lines):
diff -r c3c46cccf107 -r 4051e860f57a sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c Tue Apr 16 05:23:33 2002 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c Tue Apr 16 06:00:46 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_vnops.c,v 1.52 2002/03/22 03:51:51 chs Exp $ */
+/* $NetBSD: genfs_vnops.c,v 1.53 2002/04/16 06:00:46 enami Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.52 2002/03/22 03:51:51 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.53 2002/04/16 06:00:46 enami Exp $");
#include "opt_nfsserver.h"
@@ -69,8 +69,7 @@
#define MAX_READ_AHEAD 16 /* XXXUBC 16 */
int
-genfs_poll(v)
- void *v;
+genfs_poll(void *v)
{
struct vop_poll_args /* {
struct vnode *a_vp;
@@ -82,8 +81,7 @@
}
int
-genfs_fsync(v)
- void *v;
+genfs_fsync(void *v)
{
struct vop_fsync_args /* {
struct vnode *a_vp;
@@ -105,8 +103,7 @@
}
int
-genfs_seek(v)
- void *v;
+genfs_seek(void *v)
{
struct vop_seek_args /* {
struct vnode *a_vp;
@@ -122,22 +119,20 @@
}
int
-genfs_abortop(v)
- void *v;
+genfs_abortop(void *v)
{
struct vop_abortop_args /* {
struct vnode *a_dvp;
struct componentname *a_cnp;
} */ *ap = v;
-
+
if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
PNBUF_PUT(ap->a_cnp->cn_pnbuf);
return (0);
}
int
-genfs_fcntl(v)
- void *v;
+genfs_fcntl(void *v)
{
struct vop_fcntl_args /* {
struct vnode *a_vp;
@@ -156,8 +151,7 @@
/*ARGSUSED*/
int
-genfs_badop(v)
- void *v;
+genfs_badop(void *v)
{
panic("genfs: bad op");
@@ -165,8 +159,7 @@
/*ARGSUSED*/
int
-genfs_nullop(v)
- void *v;
+genfs_nullop(void *v)
{
return (0);
@@ -174,8 +167,7 @@
/*ARGSUSED*/
int
-genfs_einval(v)
- void *v;
+genfs_einval(void *v)
{
return (EINVAL);
@@ -183,8 +175,7 @@
/*ARGSUSED*/
int
-genfs_eopnotsupp(v)
- void *v;
+genfs_eopnotsupp(void *v)
{
return (EOPNOTSUPP);
@@ -195,12 +186,11 @@
* vrele, vput, or vunlock passed in vnodes.
*/
int
-genfs_eopnotsupp_rele(v)
- void *v;
+genfs_eopnotsupp_rele(void *v)
{
struct vop_generic_args /*
struct vnodeop_desc *a_desc;
- / * other random data follows, presumably * /
+ / * other random data follows, presumably * /
} */ *ap = v;
struct vnodeop_desc *desc = ap->a_desc;
struct vnode *vp;
@@ -211,7 +201,7 @@
if ((offset = desc->vdesc_vp_offsets[i]) == VDESC_NO_OFFSET)
break; /* stop at end of list */
if ((j = flags & VDESC_VP0_WILLPUT)) {
- vp = *VOPARG_OFFSETTO(struct vnode**,offset,ap);
+ vp = *VOPARG_OFFSETTO(struct vnode **, offset, ap);
switch (j) {
case VDESC_VP0_WILLPUT:
vput(vp);
@@ -231,8 +221,7 @@
/*ARGSUSED*/
int
-genfs_ebadf(v)
- void *v;
+genfs_ebadf(void *v)
{
return (EBADF);
@@ -240,8 +229,7 @@
/* ARGSUSED */
int
-genfs_enoioctl(v)
- void *v;
+genfs_enoioctl(void *v)
{
return (EPASSTHROUGH);
@@ -253,8 +241,7 @@
* and with all vnodes aliased to the requested vnode.
*/
int
-genfs_revoke(v)
- void *v;
+genfs_revoke(void *v)
{
struct vop_revoke_args /* {
struct vnode *a_vp;
@@ -317,8 +304,7 @@
* Lock the node.
*/
int
-genfs_lock(v)
- void *v;
+genfs_lock(void *v)
{
struct vop_lock_args /* {
struct vnode *a_vp;
@@ -333,8 +319,7 @@
* Unlock the node.
*/
int
-genfs_unlock(v)
- void *v;
+genfs_unlock(void *v)
{
struct vop_unlock_args /* {
struct vnode *a_vp;
@@ -343,15 +328,14 @@
struct vnode *vp = ap->a_vp;
return (lockmgr(&vp->v_lock, ap->a_flags | LK_RELEASE,
- &vp->v_interlock));
+ &vp->v_interlock));
}
/*
* Return whether or not the node is locked.
*/
int
-genfs_islocked(v)
- void *v;
+genfs_islocked(void *v)
{
struct vop_islocked_args /* {
struct vnode *a_vp;
@@ -365,8 +349,7 @@
* Stubs to use when there is no locking to be done on the underlying object.
*/
int
-genfs_nolock(v)
- void *v;
+genfs_nolock(void *v)
{
struct vop_lock_args /* {
struct vnode *a_vp;
@@ -384,16 +367,16 @@
}
int
-genfs_nounlock(v)
- void *v;
+genfs_nounlock(void *v)
{
+
return (0);
}
int
-genfs_noislocked(v)
- void *v;
+genfs_noislocked(void *v)
{
+
return (0);
}
@@ -403,8 +386,7 @@
* this is a null operation.
*/
int
-genfs_lease_check(v)
- void *v;
+genfs_lease_check(void *v)
{
#ifdef NFSSERVER
struct vop_lease_args /* {
@@ -426,10 +408,10 @@
}
int
-genfs_mmap(v)
- void *v;
+genfs_mmap(void *v)
{
- return 0;
+
+ return (0);
}
/*
@@ -439,8 +421,7 @@
*/
int
-genfs_getpages(v)
- void *v;
+genfs_getpages(void *v)
{
struct vop_getpages_args /* {
struct vnode *a_vp;
@@ -475,7 +456,7 @@
UVMHIST_FUNC("genfs_getpages"); UVMHIST_CALLED(ubchist);
UVMHIST_LOG(ubchist, "vp %p off 0x%x/%x count %d",
- vp, ap->a_offset >> 32, ap->a_offset, *ap->a_count);
+ vp, ap->a_offset >> 32, ap->a_offset, *ap->a_count);
/* XXXUBC temp limit */
if (*ap->a_count > MAX_READ_AHEAD) {
@@ -488,7 +469,7 @@
GOP_SIZE(vp, vp->v_size, &diskeof);
if (flags & PGO_PASTEOF) {
newsize = MAX(vp->v_size,
- origoffset + (orignpages << PAGE_SHIFT));
+ origoffset + (orignpages << PAGE_SHIFT));
GOP_SIZE(vp, newsize, &memeof);
} else {
memeof = diskeof;
@@ -506,8 +487,8 @@
simple_unlock(&uobj->vmobjlock);
}
UVMHIST_LOG(ubchist, "off 0x%x count %d goes past EOF 0x%x",
- origoffset, *ap->a_count, memeof,0);
- return EINVAL;
+ origoffset, *ap->a_count, memeof,0);
+ return (EINVAL);
}
/*
Home |
Main Index |
Thread Index |
Old Index