1*63244Sbostic# @(#)vchain 8.1 (Berkeley) 06/10/93 263243Sbostic# 363241Sbostic# Given a vnode, follow its mount pointers 463241Sbosticdefine vchain 563241Sbostic 663241Sbostic set $num = 0 763241Sbostic 863241Sbostic set $vp=(struct vnode *)$arg0 963241Sbostic while ($vp) 1063241Sbostic printf "vp: 0x%x freef: 0x%x usecount: %d flags: 0x%x\n", $vp, $vp->v_freef, $vp->v_usecount, $vp->v_flag 1163241Sbostic set $num++ 1263241Sbostic set $vp = $vp->v_mountf 1363241Sbostic end 1463241Sbostic printf "Number of vnodes: %d\n", $num 1563241Sbosticend 1663241Sbostic 1763241Sbosticdefine vprint 1863241Sbostic set $vp=(struct vnode *)$arg0 1963241Sbostic set $ip=(struct inode *)$vp->v_data 2063241Sbosticend 2163241Sbostic 2263241Sbosticdefine vall 2363241Sbostic set $mp=rootfs 2463241Sbostic while ($mp) 2563241Sbostic vchain $mp->mnt_mounth 2663241Sbostic set $mp=$mp->mnt_next 2763241Sbostic end 2863241Sbosticend 29