Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/cpuctl/arch beautify printing of SVM features acros...



details:   https://anonhg.NetBSD.org/src/rev/1e3af32f14ba
branches:  trunk
changeset: 759728:1e3af32f14ba
user:      cegger <cegger%NetBSD.org@localhost>
date:      Wed Dec 15 17:09:07 2010 +0000

description:
beautify printing of SVM features across multiple lines

diffstat:

 usr.sbin/cpuctl/arch/i386.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 6466d5dd8884 -r 1e3af32f14ba usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c       Wed Dec 15 16:23:55 2010 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c       Wed Dec 15 17:09:07 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386.c,v 1.22 2010/02/23 08:46:33 cegger Exp $ */
+/*     $NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger 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.22 2010/02/23 08:46:33 cegger Exp $");
+__RCSID("$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1491,9 +1491,14 @@
                        aprint_verbose("%s: SVM Rev. %d\n", cpuname,
                            data[0] & 0xf);
                        aprint_verbose("%s: SVM NASID %d\n", cpuname, data[1]);
-                       snprintb(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
-                           data[3]);
-                       aprint_verbose("%s: SVM features %s\n", cpuname, buf);
+                       snprintb_m(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
+                                  data[3], MAX_FEATURE_LEN);
+                       bp = buf;
+                       while (*bp != '\0') {
+                               aprint_verbose("%s: SVM features %s\n",
+                                   cpuname, bp);
+                               bp += strlen(bp) + 1;
+                       }
                }
        }
 



Home | Main Index | Thread Index | Old Index