Wed Mar 18 01:28:25 2009 UTC ()
Format the address/offset of hexdump in hex, not decimal.

Addresses my PR bin/41035


(pgoyette)
diff -r1.126 -r1.127 src/sbin/sysctl/sysctl.c

cvs diff -r1.126 -r1.127 src/sbin/sysctl/sysctl.c (expand / switch to context diff)
--- src/sbin/sysctl/sysctl.c 2009/03/05 15:35:59 1.126
+++ src/sbin/sysctl/sysctl.c 2009/03/18 01:28:25 1.127
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.c,v 1.126 2009/03/05 15:35:59 njoly Exp $ */
+/*	$NetBSD: sysctl.c,v 1.127 2009/03/18 01:28:25 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
 #if 0
 static char sccsid[] = "@(#)sysctl.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: sysctl.c,v 1.126 2009/03/05 15:35:59 njoly Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.127 2009/03/18 01:28:25 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -1927,7 +1927,7 @@
 			line[58] = '|';
 			line[77] = '|';
 			line[78] = 0;
-			snprintf(tmp, sizeof(tmp), "%07d", i);
+			snprintf(tmp, sizeof(tmp), "%07x", i);
 			memcpy(&line[0], tmp, 7);
 		}
 		/* copy out hex version of byte */