Module Name:    src
Committed By:   snj
Date:           Tue Mar 24 20:34:57 UTC 2009

Modified Files:
        src/usr.sbin/cpuctl/arch [netbsd-5]: i386.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #594):
        usr.sbin/cpuctl/arch/i386.c: revision 1.16
Increase size of buffer for humanize_number(3) to print cache sizes
so that it can return 128KB, 256KB and 512KB properly instead of
truncated 0MB or rounded 1MB.
Problem reported by nisimura@ on port-amd64 and port-i386.


To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/usr.sbin/cpuctl/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.13.2.1 src/usr.sbin/cpuctl/arch/i386.c:1.13.2.2
--- src/usr.sbin/cpuctl/arch/i386.c:1.13.2.1	Tue Dec 23 03:36:43 2008
+++ src/usr.sbin/cpuctl/arch/i386.c	Tue Mar 24 20:34:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.13.2.1 2008/12/23 03:36:43 snj Exp $	*/
+/*	$NetBSD: i386.c,v 1.13.2.2 2009/03/24 20:34:56 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.13.2.1 2008/12/23 03:36:43 snj Exp $");
+__RCSID("$NetBSD: i386.c,v 1.13.2.2 2009/03/24 20:34:56 snj Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -83,7 +83,7 @@
 #include "../cpuctl.h"
 
 /* Size of buffer for printing humanized numbers */
-#define HUMAN_BUFSIZE 5
+#define HUMAN_BUFSIZE sizeof("999KB")
 
 #define       x86_cpuid(a,b)  x86_cpuid2((a),0,(b))
 

Reply via email to