Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/cpuctl use stdbool.h



details:   https://anonhg.NetBSD.org/src/rev/6a19bd70a766
branches:  trunk
changeset: 341656:6a19bd70a766
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Nov 16 02:02:41 2015 +0000

description:
use stdbool.h

diffstat:

 usr.sbin/cpuctl/cpuctl.c |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (55 lines):

diff -r 80d48f773f7c -r 6a19bd70a766 usr.sbin/cpuctl/cpuctl.c
--- a/usr.sbin/cpuctl/cpuctl.c  Sun Nov 15 23:03:50 2015 +0000
+++ b/usr.sbin/cpuctl/cpuctl.c  Mon Nov 16 02:02:41 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $      */
+/*     $NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $  */
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: cpuctl.c,v 1.25 2014/12/16 04:07:40 msaitoh Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.26 2015/11/16 02:02:41 mrg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -51,6 +51,7 @@
 #include <util.h>
 #include <time.h>
 #include <sched.h>
+#include <stdbool.h>
 
 #include "cpuctl.h"
 
@@ -67,18 +68,18 @@
 
 static struct cmdtab {
        const char      *label;
-       int     takesargs;
-       int     argsoptional;
+       bool    takesargs;
+       bool    argsoptional;
        void    (*func)(char **);
 } const cpu_cmdtab[] = {
-       { "identify", 1, 0, cpu_identify },
-       { "list", 0, 0, cpu_list },
-       { "offline", 1, 0, cpu_offline },
-       { "online", 1, 0, cpu_online },
-       { "intr", 1, 0, cpu_intr },
-       { "nointr", 1, 0, cpu_nointr },
-       { "ucode", 1, 1, cpu_ucode },
-       { NULL, 0, 0, NULL },
+       { "identify",   true,  false, cpu_identify },
+       { "list",       false, false, cpu_list },
+       { "offline",    true,  false, cpu_offline },
+       { "online",     true,  false, cpu_online },
+       { "intr",       true,  false, cpu_intr },
+       { "nointr",     true,  false, cpu_nointr },
+       { "ucode",      true,  true,  cpu_ucode },
+       { NULL,         false, false, NULL },
 };
 
 static int     fd;



Home | Main Index | Thread Index | Old Index