summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-10 14:27:34 +0000
committerbde <bde@FreeBSD.org>1998-08-10 14:27:34 +0000
commit5f83b9b480944421611a7688dc43b090b48d6951 (patch)
tree6913131568125ddbb5166c46f3d52902607605c6 /sys/kern/subr_prf.c
parent0e700d0611e1dc6fa1f19261cb75ac18878dd2b8 (diff)
downloadFreeBSD-src-5f83b9b480944421611a7688dc43b090b48d6951.zip
FreeBSD-src-5f83b9b480944421611a7688dc43b090b48d6951.tar.gz
Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p. Hacked the central printf routine to not add an "0x" prefix for %p formats if the field width is nonzero. The tables are still horribly misformatted on 64-bit machines. Use %p instead of %8p to print pointers when the field width isn't important.
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index b2715e5..0932081 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.47 1998/07/08 10:41:32 bde Exp $
+ * $Id: subr_prf.c,v 1.48 1998/07/15 02:32:11 bde Exp $
*/
#include <sys/param.h>
@@ -497,7 +497,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
case 'p':
ul = (uintptr_t)va_arg(ap, void *);
base = 16;
- sharpflag = 1;
+ sharpflag = (width == 0);
goto nosign;
case 'n':
case 'r':
OpenPOWER on IntegriCloud