PERFORCE change 161252 for review
Marko Zec
zec at FreeBSD.org
Tue Apr 28 13:53:17 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=161252
Change 161252 by zec at zec_amdx2 on 2009/04/28 13:52:29
"opt_ddb.h" needs to be #included in order for DDB bits to
be compiled in.
While here, add a crude hack to improve indenting output
on 64-bit architectures, while hopefully not breaking anything
on 32-bit ones.
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#21 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#21 (text+ko) ====
@@ -31,6 +31,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/kern/kern_vimage.c,v 1.3 2009/04/26 07:09:39 zec Exp $");
+#include "opt_ddb.h"
+
#include <sys/param.h>
#include <sys/types.h>
#include <sys/kernel.h>
@@ -38,6 +40,10 @@
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/vimage.h>
+#ifdef DDB
+#include <ddb/ddb.h>
+#endif
+
#ifndef VIMAGE_GLOBALS
@@ -342,15 +348,24 @@
if (arg)
db_printf(" %p", arg);
else
+#if SIZE_MAX == UINT32_MAX /* 32-bit arch */
db_printf(" 0");
+#else /* 64-bit arch, most probaly... */
+ db_printf(" 0");
+#endif
}
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");
db_printf(" net inet inet6 ipsec netgraph\n");
+#else /* 64-bit arch, most probaly... */
+ db_printf(" vnet ifs socks");
+ db_printf(" net inet inet6 ipsec netgraph\n");
+#endif
VNET_FOREACH(vnet_iter) {
db_printf("%p %3d %5d",
vnet_iter, vnet_iter->ifccnt, vnet_iter->sockcnt);
More information about the p4-projects
mailing list