Date: Tue, 28 Apr 2009 13:53:16 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 161252 for review Message-ID: <200904281353.n3SDrGZY094140@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=161252 Change 161252 by zec@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904281353.n3SDrGZY094140>