vchain revision 1.2
11.2Sgwr# $NetBSD: vchain,v 1.2 1997/02/12 23:35:10 gwr Exp $ 21.2Sgwr 31.1Sgwr# @(#)vchain 8.1 (Berkeley) 6/10/93 41.1Sgwr# 51.1Sgwr# Given a vnode, follow its mount pointers 61.1Sgwrdefine vchain 71.1Sgwr 81.1Sgwr set $num = 0 91.1Sgwr 101.1Sgwr set $vp=(struct vnode *)$arg0 111.1Sgwr while ($vp) 121.1Sgwr printf "vp: 0x%x freef: 0x%x usecount: %d flags: 0x%x\n", $vp, $vp->v_freef, $vp->v_usecount, $vp->v_flag 131.1Sgwr set $num++ 141.1Sgwr set $vp = $vp->v_mountf 151.1Sgwr end 161.1Sgwr printf "Number of vnodes: %d\n", $num 171.1Sgwrend 181.1Sgwr 191.1Sgwrdefine vprint 201.1Sgwr set $vp=(struct vnode *)$arg0 211.1Sgwr set $ip=(struct inode *)$vp->v_data 221.1Sgwrend 231.1Sgwr 241.1Sgwrdefine vall 251.1Sgwr set $mp=rootfs 261.1Sgwr while ($mp) 271.1Sgwr vchain $mp->mnt_mounth 281.1Sgwr set $mp=$mp->mnt_next 291.1Sgwr end 301.1Sgwrend 31