Update DDB show vnet command to print all used and available information.

Reviewed by:	rwatson, zec
Approved by:	re
This commit is contained in:
Bjoern A. Zeeb 2009-08-12 12:00:21 +00:00
parent 96a65baf76
commit 281c86a4ef

View File

@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets)
{
VNET_ITERATOR_DECL(vnet_iter);
#if SIZE_MAX == UINT32_MAX /* 32-bit arch */
db_printf(" vnet ifs socks\n");
#else /* 64-bit arch, most probaly... */
db_printf(" vnet ifs socks\n");
#endif
VNET_FOREACH(vnet_iter) {
db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt,
vnet_iter->vnet_sockcnt);
db_printf("vnet = %p\n", vnet_iter);
db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n",
vnet_iter->vnet_magic_n,
(vnet_iter->vnet_magic_n == VNET_MAGIC_N) ?
"ok" : "mismatch", VNET_MAGIC_N);
db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt);
db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt);
db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem);
db_printf(" vnet_data_base = 0x%jx\n",
(uintmax_t)vnet_iter->vnet_data_base);
db_printf("\n");
if (db_pager_quit)
break;
}
}
#endif