Remove any VOP_PRINT that redundantly prints the tag.

Move lockmgr_printinfo() into vprint() for everyone's benefit.

Suggested by: bde
This commit is contained in:
Nate Lawson 2002-09-18 20:42:04 +00:00
parent 219c875a46
commit 86ed6d45ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103559
15 changed files with 32 additions and 150 deletions

View File

@ -74,7 +74,6 @@ static int iso_shipdir(struct isoreaddir *idp);
static int cd9660_readdir(struct vop_readdir_args *);
static int cd9660_readlink(struct vop_readlink_args *ap);
static int cd9660_strategy(struct vop_strategy_args *);
static int cd9660_print(struct vop_print_args *);
/*
* Setattr call. Only allowed for block and character special devices.
@ -736,20 +735,6 @@ cd9660_strategy(ap)
return (0);
}
/*
* Print out the contents of an inode.
*/
static int
cd9660_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, isofs vnode\n", ap->a_vp->v_tag);
return (0);
}
/*
* Return POSIX pathconf information applicable to cd9660 filesystems.
*/
@ -806,7 +791,7 @@ static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_lookup_desc, (vop_t *) vfs_cache_lookup },
{ &vop_pathconf_desc, (vop_t *) cd9660_pathconf },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_read_desc, (vop_t *) cd9660_read },
{ &vop_readdir_desc, (vop_t *) cd9660_readdir },
{ &vop_readlink_desc, (vop_t *) cd9660_readlink },
@ -831,7 +816,7 @@ static struct vnodeopv_entry_desc cd9660_specop_entries[] = {
{ &vop_inactive_desc, (vop_t *) cd9660_inactive },
{ &vop_islocked_desc, (vop_t *) vop_stdislocked },
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
{ &vop_setattr_desc, (vop_t *) cd9660_setattr },
{ &vop_unlock_desc, (vop_t *) vop_stdunlock },
@ -849,7 +834,7 @@ static struct vnodeopv_entry_desc cd9660_fifoop_entries[] = {
{ &vop_inactive_desc, (vop_t *) cd9660_inactive },
{ &vop_islocked_desc, (vop_t *) vop_stdislocked },
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
{ &vop_setattr_desc, (vop_t *) cd9660_setattr },
{ &vop_unlock_desc, (vop_t *) vop_stdunlock },

View File

@ -52,7 +52,6 @@ static int dead_lock(struct vop_lock_args *);
static int dead_lookup(struct vop_lookup_args *);
static int dead_open(struct vop_open_args *);
static int dead_poll(struct vop_poll_args *);
static int dead_print(struct vop_print_args *);
static int dead_read(struct vop_read_args *);
static int dead_write(struct vop_write_args *);
@ -74,7 +73,7 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
{ &vop_open_desc, (vop_t *) dead_open },
{ &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */
{ &vop_poll_desc, (vop_t *) dead_poll },
{ &vop_print_desc, (vop_t *) dead_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_read_desc, (vop_t *) dead_read },
{ &vop_readdir_desc, (vop_t *) vop_ebadf },
{ &vop_readlink_desc, (vop_t *) vop_ebadf },
@ -237,21 +236,6 @@ dead_bmap(ap)
return (VOP_BMAP(ap->a_vp, ap->a_bn, ap->a_vpp, ap->a_bnp, ap->a_runp, ap->a_runb));
}
/*
* Print out the contents of a dead vnode.
*/
/* ARGSUSED */
static int
dead_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, dead vnode\n", ap->a_vp->v_tag);
return (0);
}
/*
* We have to wait during times when the vnode is
* in a state of change.

View File

@ -68,7 +68,6 @@ static int devfs_ioctl(struct vop_ioctl_args *ap);
static int devfs_lookupx(struct vop_lookup_args *ap);
static int devfs_mknod(struct vop_mknod_args *ap);
static int devfs_pathconf(struct vop_pathconf_args *ap);
static int devfs_print(struct vop_print_args *ap);
static int devfs_read(struct vop_read_args *ap);
static int devfs_readdir(struct vop_readdir_args *ap);
static int devfs_readlink(struct vop_readlink_args *ap);
@ -526,18 +525,6 @@ devfs_pathconf(ap)
/* NOTREACHED */
}
/* ARGSUSED */
static int
devfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, devfs vnode\n", ap->a_vp->v_tag);
return (0);
}
static int
devfs_read(ap)
struct vop_read_args /* {
@ -899,7 +886,7 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
{ &vop_lookup_desc, (vop_t *) devfs_lookup },
{ &vop_mknod_desc, (vop_t *) devfs_mknod },
{ &vop_pathconf_desc, (vop_t *) devfs_pathconf },
{ &vop_print_desc, (vop_t *) devfs_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_read_desc, (vop_t *) devfs_read },
{ &vop_readdir_desc, (vop_t *) devfs_readdir },
{ &vop_readlink_desc, (vop_t *) devfs_readlink },
@ -930,7 +917,7 @@ static struct vnodeopv_entry_desc devfs_specop_entries[] = {
{ &vop_islocked_desc, (vop_t *) vop_stdislocked },
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_pathconf_desc, (vop_t *) devfs_pathconf },
{ &vop_print_desc, (vop_t *) devfs_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_reclaim_desc, (vop_t *) devfs_reclaim },
#ifdef MAC
{ &vop_refreshlabel_desc, (vop_t *) devfs_refreshlabel },

View File

@ -76,7 +76,6 @@ static int fdesc_getattr(struct vop_getattr_args *ap);
static int fdesc_inactive(struct vop_inactive_args *ap);
static int fdesc_lookup(struct vop_lookup_args *ap);
static int fdesc_open(struct vop_open_args *ap);
static int fdesc_print(struct vop_print_args *ap);
static int fdesc_readdir(struct vop_readdir_args *ap);
static int fdesc_reclaim(struct vop_reclaim_args *ap);
static int fdesc_poll(struct vop_poll_args *ap);
@ -536,21 +535,6 @@ fdesc_reclaim(ap)
return (0);
}
/*
* Print out the contents of a /dev/fd vnode.
*/
/* ARGSUSED */
static int
fdesc_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, fdesc vnode\n", ap->a_vp->v_tag);
return (0);
}
static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) vop_null },
@ -560,7 +544,7 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
{ &vop_open_desc, (vop_t *) fdesc_open },
{ &vop_pathconf_desc, (vop_t *) vop_stdpathconf },
{ &vop_poll_desc, (vop_t *) fdesc_poll },
{ &vop_print_desc, (vop_t *) fdesc_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_readdir_desc, (vop_t *) fdesc_readdir },
{ &vop_reclaim_desc, (vop_t *) fdesc_reclaim },
{ &vop_setattr_desc, (vop_t *) fdesc_setattr },

View File

@ -563,8 +563,6 @@ fifo_print(ap)
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s", ap->a_vp->v_tag);
fifo_printinfo(ap->a_vp);
printf("\n");
return (0);

View File

@ -659,9 +659,7 @@ hpfs_print(ap)
register struct vnode *vp = ap->a_vp;
register struct hpfsnode *hp = VTOHP(vp);
printf("tag %s, ino 0x%x", vp->v_tag, hp->h_no);
lockmgr_printinfo(&hp->h_lock);
printf("\n");
printf("ino 0x%x\n", hp->h_no);
return (0);
}

View File

@ -1830,12 +1830,9 @@ msdosfs_print(ap)
{
struct denode *dep = VTODE(ap->a_vp);
printf("tag %s, startcluster %lu, dircluster %lu, diroffset %lu ",
ap->a_vp->v_tag, dep->de_StartCluster,
dep->de_dirclust, dep->de_diroffset);
printf(" dev %d, %d", major(dep->de_dev), minor(dep->de_dev));
lockmgr_printinfo(&ap->a_vp->v_lock);
printf("\n");
printf("startcluster %lu, dircluster %lu, diroffset %lu, ",
dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset);
printf("on dev (%d, %d)\n", major(dep->de_dev), minor(dep->de_dev));
return (0);
}

View File

@ -74,7 +74,6 @@ static int ntfs_read(struct vop_read_args *);
static int ntfs_write(struct vop_write_args *ap);
static int ntfs_getattr(struct vop_getattr_args *ap);
static int ntfs_inactive(struct vop_inactive_args *ap);
static int ntfs_print(struct vop_print_args *ap);
static int ntfs_reclaim(struct vop_reclaim_args *ap);
static int ntfs_strategy(struct vop_strategy_args *ap);
static int ntfs_access(struct vop_access_args *ap);
@ -240,15 +239,6 @@ ntfs_reclaim(ap)
return (0);
}
static int
ntfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
return (0);
}
/*
* Calculate the logical to physical mapping if not done already,
* then call the device strategy routine.
@ -745,7 +735,7 @@ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = {
{ &vop_getattr_desc, (vop_t *)ntfs_getattr },
{ &vop_inactive_desc, (vop_t *)ntfs_inactive },
{ &vop_reclaim_desc, (vop_t *)ntfs_reclaim },
{ &vop_print_desc, (vop_t *)ntfs_print },
{ &vop_print_desc, (vop_t *)vop_null },
{ &vop_pathconf_desc, ntfs_pathconf },
{ &vop_islocked_desc, (vop_t *)vop_stdislocked },

View File

@ -70,7 +70,6 @@ static int portal_connect(struct socket *so, struct socket *so2);
static int portal_getattr(struct vop_getattr_args *ap);
static int portal_lookup(struct vop_lookup_args *ap);
static int portal_open(struct vop_open_args *ap);
static int portal_print(struct vop_print_args *ap);
static int portal_readdir(struct vop_readdir_args *ap);
static int portal_reclaim(struct vop_reclaim_args *ap);
static int portal_setattr(struct vop_setattr_args *ap);
@ -546,22 +545,6 @@ portal_reclaim(ap)
return (0);
}
/*
* Print out the contents of a Portal vnode.
*/
/* ARGSUSED */
static int
portal_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, portal vnode\n", ap->a_vp->v_tag);
return (0);
}
vop_t **portal_vnodeop_p;
static struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
@ -570,7 +553,7 @@ static struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
{ &vop_lookup_desc, (vop_t *) portal_lookup },
{ &vop_open_desc, (vop_t *) portal_open },
{ &vop_pathconf_desc, (vop_t *) vop_stdpathconf },
{ &vop_print_desc, (vop_t *) portal_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_readdir_desc, (vop_t *) portal_readdir },
{ &vop_reclaim_desc, (vop_t *) portal_reclaim },
{ &vop_setattr_desc, (vop_t *) portal_setattr },

View File

@ -845,11 +845,8 @@ int smbfs_print (ap)
printf("no smbnode data\n");
return (0);
}
printf("tag %s, name = %s, parent = %p, opencount = %d",
vp->v_tag, np->n_name, np->n_parent ? SMBTOV(np->n_parent) : NULL,
np->n_opencount);
lockmgr_printinfo(&vp->v_lock);
printf("\n");
printf("name = %s, parent = %p, opencount = %d\n", np->n_name,
np->n_parent ? SMBTOV(np->n_parent) : NULL, np->n_opencount);
return (0);
}

View File

@ -1557,12 +1557,10 @@ ext2_print(ap)
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
printf("tag %s, ino %lu, on dev %s (%d, %d)",
vp->v_tag, (u_long)ip->i_number, devtoname(ip->i_dev),
major(ip->i_dev), minor(ip->i_dev));
printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number,
devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev));
if (vp->v_type == VFIFO)
fifo_printinfo(vp);
lockmgr_printinfo(&vp->v_lock);
printf("\n");
return (0);
}

View File

@ -1557,12 +1557,10 @@ ext2_print(ap)
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
printf("tag %s, ino %lu, on dev %s (%d, %d)",
vp->v_tag, (u_long)ip->i_number, devtoname(ip->i_dev),
major(ip->i_dev), minor(ip->i_dev));
printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number,
devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev));
if (vp->v_type == VFIFO)
fifo_printinfo(vp);
lockmgr_printinfo(&vp->v_lock);
printf("\n");
return (0);
}

View File

@ -74,7 +74,6 @@ static int iso_shipdir(struct isoreaddir *idp);
static int cd9660_readdir(struct vop_readdir_args *);
static int cd9660_readlink(struct vop_readlink_args *ap);
static int cd9660_strategy(struct vop_strategy_args *);
static int cd9660_print(struct vop_print_args *);
/*
* Setattr call. Only allowed for block and character special devices.
@ -736,20 +735,6 @@ cd9660_strategy(ap)
return (0);
}
/*
* Print out the contents of an inode.
*/
static int
cd9660_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
{
printf("tag %s, isofs vnode\n", ap->a_vp->v_tag);
return (0);
}
/*
* Return POSIX pathconf information applicable to cd9660 filesystems.
*/
@ -806,7 +791,7 @@ static struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_lookup_desc, (vop_t *) vfs_cache_lookup },
{ &vop_pathconf_desc, (vop_t *) cd9660_pathconf },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_read_desc, (vop_t *) cd9660_read },
{ &vop_readdir_desc, (vop_t *) cd9660_readdir },
{ &vop_readlink_desc, (vop_t *) cd9660_readlink },
@ -831,7 +816,7 @@ static struct vnodeopv_entry_desc cd9660_specop_entries[] = {
{ &vop_inactive_desc, (vop_t *) cd9660_inactive },
{ &vop_islocked_desc, (vop_t *) vop_stdislocked },
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
{ &vop_setattr_desc, (vop_t *) cd9660_setattr },
{ &vop_unlock_desc, (vop_t *) vop_stdunlock },
@ -849,7 +834,7 @@ static struct vnodeopv_entry_desc cd9660_fifoop_entries[] = {
{ &vop_inactive_desc, (vop_t *) cd9660_inactive },
{ &vop_islocked_desc, (vop_t *) vop_stdislocked },
{ &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_print_desc, (vop_t *) cd9660_print },
{ &vop_print_desc, (vop_t *) vop_null },
{ &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
{ &vop_setattr_desc, (vop_t *) cd9660_setattr },
{ &vop_unlock_desc, (vop_t *) vop_stdunlock },

View File

@ -2617,9 +2617,9 @@ vprint(label, vp)
printf("%s: %p: ", label, (void *)vp);
else
printf("%p: ", (void *)vp);
printf("type %s, usecount %d, writecount %d, refcount %d,",
typename[vp->v_type], vp->v_usecount, vp->v_writecount,
vp->v_holdcnt);
printf("tag %s, type %s, usecount %d, writecount %d, refcount %d,",
vp->v_tag, typename[vp->v_type], vp->v_usecount,
vp->v_writecount, vp->v_holdcnt);
buf[0] = '\0';
if (vp->v_vflag & VV_ROOT)
strcat(buf, "|VV_ROOT");
@ -2640,11 +2640,11 @@ vprint(label, vp)
if (vp->v_vflag & VV_OBJBUF)
strcat(buf, "|VV_OBJBUF");
if (buf[0] != '\0')
printf(" flags (%s)", &buf[1]);
if (vp->v_data == NULL) {
printf("\n");
} else {
printf("\n\t");
printf(" flags (%s),", &buf[1]);
lockmgr_printinfo(&vp->v_lock);
printf("\n");
if (vp->v_data != NULL) {
printf("\t");
VOP_PRINT(vp);
}
}

View File

@ -1979,12 +1979,10 @@ ufs_print(ap)
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
printf("tag %s, ino %lu, on dev %s (%d, %d)",
vp->v_tag, (u_long)ip->i_number, devtoname(ip->i_dev),
major(ip->i_dev), minor(ip->i_dev));
printf("ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number,
devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev));
if (vp->v_type == VFIFO)
fifo_printinfo(vp);
lockmgr_printinfo(&vp->v_lock);
printf("\n");
return (0);
}