mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -08:00
Put the bowels of the various VOP_PRINT routines under
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG) as they won't be used otherwise. Shaves a few bytes off installation kernels. ok kn@ semarie@
This commit is contained in:
parent
6e669df132
commit
5a0ec8146b
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cd9660_vnops.c,v 1.96 2024/09/12 09:04:51 claudio Exp $ */
|
||||
/* $OpenBSD: cd9660_vnops.c,v 1.97 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
|
||||
|
||||
/*-
|
||||
@ -743,7 +743,9 @@ cd9660_strategy(void *v)
|
||||
int
|
||||
cd9660_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
printf("tag VT_ISOFS, isofs vnode\n");
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: udf_vnops.c,v 1.74 2024/09/20 02:00:46 jsg Exp $ */
|
||||
/* $OpenBSD: udf_vnops.c,v 1.75 2024/10/18 05:52:32 miod Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
|
||||
@ -944,6 +944,7 @@ udf_islocked(void *v)
|
||||
int
|
||||
udf_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct unode *up = VTOU(vp);
|
||||
@ -954,6 +955,7 @@ udf_print(void *v)
|
||||
printf("tag VT_UDF, hash id %u\n", up->u_ino);
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("\n");
|
||||
#endif
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: spec_vnops.c,v 1.112 2024/02/03 18:51:58 beck Exp $ */
|
||||
/* $OpenBSD: spec_vnops.c,v 1.113 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -608,10 +608,12 @@ spec_access(void *v)
|
||||
int
|
||||
spec_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
|
||||
printf("tag VT_NON, dev %d, %d\n", major(ap->a_vp->v_rdev),
|
||||
minor(ap->a_vp->v_rdev));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vfs_subr.c,v 1.323 2024/10/17 22:44:17 dlg Exp $ */
|
||||
/* $OpenBSD: vfs_subr.c,v 1.324 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -979,7 +979,7 @@ vflush_vnode(struct vnode *vp, void *arg)
|
||||
if (empty)
|
||||
return (0);
|
||||
|
||||
#ifdef DEBUG_SYSCTL
|
||||
#if defined(DEBUG_SYSCTL) && (defined(DEBUG) || defined(DIAGNOSTIC))
|
||||
if (busyprt)
|
||||
vprint("vflush: busy vnode", vp);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vfs_sync.c,v 1.72 2024/05/13 11:17:40 semarie Exp $ */
|
||||
/* $OpenBSD: vfs_sync.c,v 1.73 2024/10/18 05:52:32 miod Exp $ */
|
||||
|
||||
/*
|
||||
* Portions of this code are:
|
||||
@ -363,7 +363,9 @@ sync_inactive(void *v)
|
||||
int
|
||||
sync_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
printf("syncer vnode\n");
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: vfs_vops.c,v 1.36 2024/05/13 11:17:40 semarie Exp $ */
|
||||
/* $OpenBSD: vfs_vops.c,v 1.37 2024/10/18 05:52:32 miod Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
|
||||
*
|
||||
@ -555,6 +555,7 @@ VOP_BMAP(struct vnode *vp, daddr_t bn, struct vnode **vpp,
|
||||
return ((vp->v_op->vop_bmap)(&a));
|
||||
}
|
||||
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
int
|
||||
VOP_PRINT(struct vnode *vp)
|
||||
{
|
||||
@ -566,6 +567,7 @@ VOP_PRINT(struct vnode *vp)
|
||||
|
||||
return ((vp->v_op->vop_print)(&a));
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
VOP_PATHCONF(struct vnode *vp, int name, register_t *retval)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dead_vnops.c,v 1.42 2023/03/08 04:43:08 guenther Exp $ */
|
||||
/* $OpenBSD: dead_vnops.c,v 1.43 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
@ -233,7 +233,9 @@ dead_bmap(void *v)
|
||||
int
|
||||
dead_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
printf("tag VT_NON, dead vnode\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fifo_vnops.c,v 1.107 2024/07/12 17:20:18 mvs Exp $ */
|
||||
/* $OpenBSD: fifo_vnops.c,v 1.108 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -397,14 +397,17 @@ fifo_reclaim(void *v)
|
||||
int
|
||||
fifo_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
|
||||
printf("tag VT_NON");
|
||||
fifo_printinfo(ap->a_vp);
|
||||
printf("\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
/*
|
||||
* Print out internal contents of a fifo vnode.
|
||||
*/
|
||||
@ -416,6 +419,7 @@ fifo_printinfo(struct vnode *vp)
|
||||
printf(", fifo with %ld readers and %ld writers",
|
||||
fip->fi_readers, fip->fi_writers);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return POSIX pathconf information applicable to fifo's.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: fuse_vnops.c,v 1.70 2024/09/12 09:10:46 claudio Exp $ */
|
||||
/* $OpenBSD: fuse_vnops.c,v 1.71 2024/10/18 05:52:32 miod Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
|
||||
*
|
||||
@ -990,6 +990,7 @@ fusefs_reclaim(void *v)
|
||||
int
|
||||
fusefs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct fusefs_node *ip = VTOI(vp);
|
||||
@ -997,6 +998,7 @@ fusefs_print(void *v)
|
||||
/* Complete the information given by vprint(). */
|
||||
printf("tag VT_FUSE, hash id %u ", ip->ufs_ino.i_number);
|
||||
printf("\n");
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: msdosfs_vfsops.c,v 1.97 2023/07/17 09:41:20 semarie Exp $ */
|
||||
/* $OpenBSD: msdosfs_vfsops.c,v 1.98 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
|
||||
|
||||
/*-
|
||||
@ -577,7 +577,7 @@ msdosfs_unmount(struct mount *mp, int mntflags,struct proc *p)
|
||||
pmp = VFSTOMSDOSFS(mp);
|
||||
pmp->pm_devvp->v_specmountpoint = NULL;
|
||||
vp = pmp->pm_devvp;
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
#if defined(MSDOSFS_DEBUG) && (defined(DEBUG) || defined(DIAGNOSTIC))
|
||||
vprint("msdosfs_umount(): just before calling VOP_CLOSE()\n", vp);
|
||||
#endif
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: msdosfs_vnops.c,v 1.142 2024/09/04 07:54:52 mglocker Exp $ */
|
||||
/* $OpenBSD: msdosfs_vnops.c,v 1.143 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -1802,6 +1802,7 @@ msdosfs_strategy(void *v)
|
||||
int
|
||||
msdosfs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct denode *dep = VTODE(ap->a_vp);
|
||||
|
||||
@ -1813,6 +1814,7 @@ msdosfs_print(void *v)
|
||||
VOP_ISLOCKED(ap->a_vp) ? "(LOCKED)" : "");
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: nfs_vnops.c,v 1.204 2024/09/18 05:21:19 jsg Exp $ */
|
||||
/* $OpenBSD: nfs_vnops.c,v 1.205 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
|
||||
|
||||
/*
|
||||
@ -3287,6 +3287,7 @@ nfs_advlock(void *v)
|
||||
int
|
||||
nfs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct nfsnode *np = VTONFS(vp);
|
||||
@ -3298,6 +3299,7 @@ nfs_print(void *v)
|
||||
fifo_printinfo(vp);
|
||||
#endif
|
||||
printf("\n");
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ntfs_vnops.c,v 1.50 2024/09/12 09:04:51 claudio Exp $ */
|
||||
/* $OpenBSD: ntfs_vnops.c,v 1.51 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
@ -234,11 +234,13 @@ ntfs_reclaim(void *v)
|
||||
int
|
||||
ntfs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct ntnode *ip = VTONT(ap->a_vp);
|
||||
|
||||
printf("tag VT_NTFS, ino %u, flag %#x, usecount %d, nlink %ld\n",
|
||||
ip->i_number, ip->i_flag, ip->i_usecount, ip->i_nlink);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tmpfs_vnops.c,v 1.55 2024/05/13 11:17:41 semarie Exp $ */
|
||||
/* $OpenBSD: tmpfs_vnops.c,v 1.56 2024/10/18 05:52:32 miod Exp $ */
|
||||
/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */
|
||||
|
||||
/*
|
||||
@ -1126,6 +1126,7 @@ tmpfs_advlock(void *v)
|
||||
int
|
||||
tmpfs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args /* {
|
||||
struct vnode *a_vp;
|
||||
} */ *ap = v;
|
||||
@ -1141,6 +1142,7 @@ tmpfs_print(void *v)
|
||||
fifo_printinfo(vp);
|
||||
#endif
|
||||
printf("\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mfs_vnops.c,v 1.61 2024/04/16 10:04:41 claudio Exp $ */
|
||||
/* $OpenBSD: mfs_vnops.c,v 1.62 2024/10/18 05:52:33 miod Exp $ */
|
||||
/* $NetBSD: mfs_vnops.c,v 1.8 1996/03/17 02:16:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -252,10 +252,12 @@ mfs_reclaim(void *v)
|
||||
int
|
||||
mfs_print(void *v)
|
||||
{
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
struct mfsnode *mfsp = VTOMFS(ap->a_vp);
|
||||
|
||||
printf("tag VT_MFS, tid %d, base %p, size %ld\n", mfsp->mfs_tid,
|
||||
mfsp->mfs_baseoff, mfsp->mfs_size);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ufs_vnops.c,v 1.163 2024/09/12 09:04:51 claudio Exp $ */
|
||||
/* $OpenBSD: ufs_vnops.c,v 1.164 2024/10/18 05:52:33 miod Exp $ */
|
||||
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
@ -1521,7 +1521,7 @@ ufs_strategy(void *v)
|
||||
int
|
||||
ufs_print(void *v)
|
||||
{
|
||||
#ifdef DIAGNOSTIC
|
||||
#if defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
|
||||
struct vop_print_args *ap = v;
|
||||
|
||||
struct vnode *vp = ap->a_vp;
|
||||
@ -1539,8 +1539,7 @@ ufs_print(void *v)
|
||||
fifo_printinfo(vp);
|
||||
#endif /* FIFO */
|
||||
printf("\n");
|
||||
|
||||
#endif /* DIAGNOSTIC */
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user