Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/coda cosmetic only: __func__, vnode_t
details: https://anonhg.NetBSD.org/src/rev/75c77f2105bf
branches: trunk
changeset: 779047:75c77f2105bf
user: christos <christos%NetBSD.org@localhost>
date: Sat Apr 28 20:15:07 2012 +0000
description:
cosmetic only: __func__, vnode_t
diffstat:
sys/coda/coda_vnops.c | 274 ++++++++++++++++++++++++-------------------------
1 files changed, 134 insertions(+), 140 deletions(-)
diffs (truncated from 895 to 300 lines):
diff -r 5d46a69ae13f -r 75c77f2105bf sys/coda/coda_vnops.c
--- a/sys/coda/coda_vnops.c Sat Apr 28 20:01:09 2012 +0000
+++ b/sys/coda/coda_vnops.c Sat Apr 28 20:15:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coda_vnops.c,v 1.83 2012/04/28 20:01:09 christos Exp $ */
+/* $NetBSD: coda_vnops.c,v 1.84 2012/04/28 20:15:07 christos Exp $ */
/*
*
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.83 2012/04/28 20:01:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.84 2012/04/28 20:15:07 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -153,8 +153,8 @@
struct vnodeop_desc **desc = (struct vnodeop_desc **)anon;
if (codadebug) {
- myprintf(("coda_vop_error: Vnode operation %s called (error).\n",
- (*desc)->vdesc_name));
+ myprintf(("%s: Vnode operation %s called (error).\n",
+ __func__, (*desc)->vdesc_name));
}
return EIO;
@@ -214,7 +214,7 @@
*/
/* true args */
struct vop_open_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
int flag = ap->a_mode & (~O_EXCL);
kauth_cred_t cred = ap->a_cred;
@@ -222,7 +222,7 @@
int error;
dev_t dev; /* container file device, inode, vnode */
ino_t inode;
- struct vnode *container_vp;
+ vnode_t *container_vp;
MARK_ENTRY(CODA_OPEN_STATS);
@@ -241,9 +241,9 @@
if (error)
return (error);
if (!error) {
- CODADEBUG(CODA_OPEN,
- myprintf(("open: dev 0x%llx inode %llu result %d\n",
- (unsigned long long)dev, (unsigned long long)inode, error));)
+ CODADEBUG(CODA_OPEN, myprintf((
+ "%s: dev 0x%llx inode %llu result %d\n", __func__,
+ (unsigned long long)dev, (unsigned long long)inode, error));)
}
/*
@@ -263,7 +263,7 @@
* Perhaps venus returned a different container, or
* something else went wrong.
*/
- panic("coda_open: cp->c_ovp != container_vp");
+ panic("%s: cp->c_ovp != container_vp", __func__);
}
cp->c_ocount++;
@@ -300,7 +300,7 @@
{
/* true args */
struct vop_close_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
int flag = ap->a_fflag;
kauth_cred_t cred = ap->a_cred;
@@ -321,8 +321,8 @@
if (IS_UNMOUNTING(cp)) {
if (cp->c_ovp) {
#ifdef CODA_VERBOSE
- printf("coda_close: destroying container ref %d, ufs vp %p of vp %p/cp %p\n",
- vp->v_usecount, cp->c_ovp, vp, cp);
+ printf("%s: destroying container %d, ufs vp %p of vp %p/cp %p\n",
+ __func__, vp->v_usecount, cp->c_ovp, vp, cp);
#endif
#ifdef hmm
vgone(cp->c_ovp);
@@ -333,7 +333,7 @@
#endif
} else {
#ifdef CODA_VERBOSE
- printf("coda_close: NO container vp %p/cp %p\n", vp, cp);
+ printf("%s: NO container vp %p/cp %p\n", __func__, vp, cp);
#endif
}
return ENODEV;
@@ -355,7 +355,7 @@
error = venus_close(vtomi(vp), &cp->c_fid, flag, cred, curlwp);
- CODADEBUG(CODA_CLOSE, myprintf(("close: result %d\n",error)); )
+ CODADEBUG(CODA_CLOSE, myprintf(("%s: result %d\n", __func__, error)); )
return(error);
}
@@ -380,14 +380,14 @@
}
int
-coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag,
+coda_rdwr(vnode_t *vp, struct uio *uiop, enum uio_rw rw, int ioflag,
kauth_cred_t cred, struct lwp *l)
{
/* upcall decl */
/* NOTE: container file operation!!! */
/* locals */
struct cnode *cp = VTOC(vp);
- struct vnode *cfvp = cp->c_ovp;
+ vnode_t *cfvp = cp->c_ovp;
struct proc *p = l->l_proc;
int opened_internally = 0;
int error = 0;
@@ -395,9 +395,8 @@
MARK_ENTRY(CODA_RDWR_STATS);
CODADEBUG(CODA_RDWR, myprintf(("coda_rdwr(%d, %p, %lu, %lld)\n", rw,
- uiop->uio_iov->iov_base,
- (unsigned long) uiop->uio_resid,
- (long long) uiop->uio_offset)); )
+ uiop->uio_iov->iov_base, (unsigned long) uiop->uio_resid,
+ (long long) uiop->uio_offset)); )
/* Check for rdwr of control object. */
if (IS_CTL_VP(vp)) {
@@ -423,7 +422,8 @@
* it's completely written.
*/
if (cp->c_inode != 0 && !(p && (p->p_acflag & ACORE))) {
- printf("coda_rdwr: grabbing container vnode, losing reference\n");
+ printf("%s: grabbing container vnode, losing reference\n",
+ __func__);
/* Get locked and refed vnode. */
error = coda_grab_vnode(vp, cp->c_device, cp->c_inode, &cfvp);
if (error) {
@@ -437,12 +437,12 @@
VOP_UNLOCK(cfvp);
}
else {
- printf("coda_rdwr: internal VOP_OPEN\n");
+ printf("%s: internal VOP_OPEN\n", __func__);
opened_internally = 1;
MARK_INT_GEN(CODA_OPEN_STATS);
error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), cred);
#ifdef CODA_VERBOSE
-printf("coda_rdwr: Internally Opening %p\n", vp);
+ printf("%s: Internally Opening %p\n", __func__, vp);
#endif
if (error) {
MARK_INT_FAIL(CODA_RDWR_STATS);
@@ -453,8 +453,8 @@
}
/* Have UFS handle the call. */
- CODADEBUG(CODA_RDWR, myprintf(("indirect rdwr: fid = %s, refcnt = %d\n",
- coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount)); )
+ CODADEBUG(CODA_RDWR, myprintf(("%s: fid = %s, refcnt = %d\n", __func__,
+ coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount)); )
if (rw == UIO_READ) {
error = VOP_READ(cfvp, uiop, ioflag, cred);
@@ -484,14 +484,14 @@
{
/* true args */
struct vop_ioctl_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
int com = ap->a_command;
void *data = ap->a_data;
int flag = ap->a_fflag;
kauth_cred_t cred = ap->a_cred;
/* locals */
int error;
- struct vnode *tvp;
+ vnode_t *tvp;
struct PioctlData *iap = (struct PioctlData *)data;
namei_simple_flags_t sflags;
@@ -505,8 +505,8 @@
/* Must be control object to succeed. */
if (!IS_CTL_VP(vp)) {
MARK_INT_FAIL(CODA_IOCTL_STATS);
- CODADEBUG(CODA_IOCTL, myprintf(("coda_ioctl error: vp != ctlvp"));)
- return (EOPNOTSUPP);
+ CODADEBUG(CODA_IOCTL, myprintf(("%s error: vp != ctlvp", __func__));)
+ return (EOPNOTSUPP);
}
/* Look up the pathname. */
@@ -518,8 +518,8 @@
if (error) {
MARK_INT_FAIL(CODA_IOCTL_STATS);
- CODADEBUG(CODA_IOCTL, myprintf(("coda_ioctl error: lookup returns %d\n",
- error));)
+ CODADEBUG(CODA_IOCTL, myprintf(("%s error: lookup returns %d\n",
+ __func__, error));)
return(error);
}
@@ -531,9 +531,8 @@
if (tvp->v_tag != VT_CODA) {
vrele(tvp);
MARK_INT_FAIL(CODA_IOCTL_STATS);
- CODADEBUG(CODA_IOCTL,
- myprintf(("coda_ioctl error: %s not a coda object\n",
- iap->path));)
+ CODADEBUG(CODA_IOCTL, myprintf(("%s error: %s not a coda object\n",
+ __func__, iap->path));)
return(EINVAL);
}
@@ -567,7 +566,7 @@
{
/* true args */
struct vop_getattr_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
struct vattr *vap = ap->a_vap;
kauth_cred_t cred = ap->a_cred;
@@ -584,10 +583,10 @@
/* Check to see if the attributes have already been cached */
if (VALID_VATTR(cp)) {
- CODADEBUG(CODA_GETATTR, { myprintf(("attr cache hit: %s\n",
- coda_f2s(&cp->c_fid)));});
+ CODADEBUG(CODA_GETATTR, { myprintf(("%s: attr cache hit: %s\n",
+ __func__, coda_f2s(&cp->c_fid)));})
CODADEBUG(CODA_GETATTR, if (!(codadebug & ~CODA_GETATTR))
- print_vattr(&cp->c_vattr); );
+ print_vattr(&cp->c_vattr); )
*vap = cp->c_vattr;
MARK_INT_SAT(CODA_GETATTR_STATS);
@@ -597,11 +596,11 @@
error = venus_getattr(vtomi(vp), &cp->c_fid, cred, curlwp, vap);
if (!error) {
- CODADEBUG(CODA_GETATTR, myprintf(("getattr miss %s: result %d\n",
- coda_f2s(&cp->c_fid), error)); )
+ CODADEBUG(CODA_GETATTR, myprintf(("%s miss %s: result %d\n",
+ __func__, coda_f2s(&cp->c_fid), error)); )
CODADEBUG(CODA_GETATTR, if (!(codadebug & ~CODA_GETATTR))
- print_vattr(vap); );
+ print_vattr(vap); )
/* If not open for write, store attributes in cnode */
if ((cp->c_owrite == 0) && (coda_attr_cache)) {
@@ -618,7 +617,7 @@
{
/* true args */
struct vop_setattr_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
struct vattr *vap = ap->a_vap;
kauth_cred_t cred = ap->a_cred;
@@ -650,7 +649,7 @@
{
/* true args */
struct vop_access_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
int mode = ap->a_mode;
kauth_cred_t cred = ap->a_cred;
@@ -698,7 +697,7 @@
{
/* true args */
struct vop_abortop_args /* {
- struct vnode *a_dvp;
+ vnode_t *a_dvp;
struct componentname *a_cnp;
} */ *ap = v;
@@ -714,7 +713,7 @@
{
/* true args */
struct vop_readlink_args *ap = v;
- struct vnode *vp = ap->a_vp;
+ vnode_t *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
struct uio *uiop = ap->a_uio;
kauth_cred_t cred = ap->a_cred;
@@ -765,11 +764,11 @@
{
/* true args */
Home |
Main Index |
Thread Index |
Old Index