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 Don't print the microcode version if th...



details:   https://anonhg.NetBSD.org/src/rev/95aab4f6e869
branches:  trunk
changeset: 334854:95aab4f6e869
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Dec 11 12:21:44 2014 +0000

description:
Don't print the microcode version if the ioctl failed to not to
print garbage.

diffstat:

 usr.sbin/cpuctl/arch/i386.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 517eed0a47d7 -r 95aab4f6e869 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c       Thu Dec 11 10:07:45 2014 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c       Thu Dec 11 12:21:44 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386.c,v 1.63 2014/12/11 10:07:45 msaitoh Exp $        */
+/*     $NetBSD: i386.c,v 1.64 2014/12/11 12:21:44 msaitoh 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.63 2014/12/11 10:07:45 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.64 2014/12/11 12:21:44 msaitoh Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1995,6 +1995,8 @@
                ucode_64.loader_version = ucode.loader_version;
                if (ioctl(fd, IOC_CPU_UCODE_GET_VERSION_64, &ucode_64) < 0)
                        return;
+#else
+               return;
 #endif
        }
 



Home | Main Index | Thread Index | Old Index