Tweak the output of VOP_PRINT/vn_printf() some.

- Align the fifo output in fifo_print() with other vn_printf() output.
- Remove the leading space from lockmgr_printinfo() so its output lines up
  in vn_printf().
- lockmgr_printinfo() now ends with a newline, so remove an extra newline
  from vn_printf().
This commit is contained in:
John Baldwin 2009-02-06 20:06:48 +00:00
parent ec48c16f14
commit 8941aad19b
4 changed files with 5 additions and 4 deletions

View File

@ -468,6 +468,7 @@ fifo_print(ap)
struct vnode *a_vp;
} */ *ap;
{
printf(" ");
fifo_printinfo(ap->a_vp);
printf("\n");
return (0);

View File

@ -897,14 +897,14 @@ lockmgr_printinfo(struct lock *lk)
uintptr_t x;
if (lk->lk_lock == LK_UNLOCKED)
printf(" lock type %s: UNLOCKED\n", lk->lock_object.lo_name);
printf("lock type %s: UNLOCKED\n", lk->lock_object.lo_name);
else if (lk->lk_lock & LK_SHARE)
printf(" lock type %s: SHARED (count %ju)\n",
printf("lock type %s: SHARED (count %ju)\n",
lk->lock_object.lo_name,
(uintmax_t)LK_SHARERS(lk->lk_lock));
else {
td = lockmgr_xholder(lk);
printf(" lock type %s: EXCL by thread %p (pid %d)\n",
printf("lock type %s: EXCL by thread %p (pid %d)\n",
lk->lock_object.lo_name, td, td->td_proc->p_pid);
}

View File

@ -3920,6 +3920,7 @@ DB_SHOW_COMMAND(buffer, db_show_buffer)
}
db_printf("\n");
}
db_printf(" ");
lockmgr_printinfo(&bp->b_lock);
}

View File

@ -2719,7 +2719,6 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
vp->v_object->resident_page_count);
printf(" ");
lockmgr_printinfo(vp->v_vnlock);
printf("\n");
if (vp->v_data != NULL)
VOP_PRINT(vp);
}