Module Name: src
Committed By: joerg
Date: Sat Aug 27 22:38:48 UTC 2011
Modified Files:
src/usr.sbin/cpuctl: cpuctl.c
Log Message:
static + __dead
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/cpuctl/cpuctl.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/cpuctl.c
diff -u src/usr.sbin/cpuctl/cpuctl.c:1.15 src/usr.sbin/cpuctl/cpuctl.c:1.16
--- src/usr.sbin/cpuctl/cpuctl.c:1.15 Thu Apr 23 01:36:56 2009
+++ src/usr.sbin/cpuctl/cpuctl.c Sat Aug 27 22:38:48 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuctl.c,v 1.15 2009/04/23 01:36:56 lukem Exp $ */
+/* $NetBSD: cpuctl.c,v 1.16 2011/08/27 22:38:48 joerg Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#ifndef lint
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cpuctl.c,v 1.15 2009/04/23 01:36:56 lukem Exp $");
+__RCSID("$NetBSD: cpuctl.c,v 1.16 2011/08/27 22:38:48 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -53,18 +53,17 @@
#include "cpuctl.h"
-u_int getcpuid(char **);
-int main(int, char **);
-void usage(void);
-
-void cpu_identify(char **);
-void cpu_list(char **);
-void cpu_offline(char **);
-void cpu_online(char **);
-void cpu_intr(char **);
-void cpu_nointr(char **);
+static u_int getcpuid(char **);
+__dead static void usage(void);
-struct cmdtab {
+static void cpu_identify(char **);
+static void cpu_list(char **);
+static void cpu_offline(char **);
+static void cpu_online(char **);
+static void cpu_intr(char **);
+static void cpu_nointr(char **);
+
+static struct cmdtab {
const char *label;
int takesargs;
void (*func)(char **);
@@ -78,7 +77,7 @@
{ NULL, 0, NULL },
};
-int fd;
+static int fd;
int
main(int argc, char **argv)
@@ -108,7 +107,7 @@
/* NOTREACHED */
}
-void
+static void
usage(void)
{
const char *progname = getprogname();
@@ -123,7 +122,7 @@
/* NOTREACHED */
}
-void
+static void
cpu_online(char **argv)
{
cpustate_t cs;
@@ -136,7 +135,7 @@
err(EXIT_FAILURE, "IOC_CPU_SETSTATE");
}
-void
+static void
cpu_offline(char **argv)
{
cpustate_t cs;
@@ -149,7 +148,7 @@
err(EXIT_FAILURE, "IOC_CPU_SETSTATE");
}
-void
+static void
cpu_intr(char **argv)
{
cpustate_t cs;
@@ -162,7 +161,7 @@
err(EXIT_FAILURE, "IOC_CPU_SETSTATE");
}
-void
+static void
cpu_nointr(char **argv)
{
cpustate_t cs;
@@ -180,7 +179,7 @@
}
}
-void
+static void
cpu_identify(char **argv)
{
char name[32];
@@ -211,7 +210,7 @@
identifycpu(name);
}
-u_int
+static u_int
getcpuid(char **argv)
{
char *argp;
@@ -229,7 +228,7 @@
return id;
}
-void
+static void
cpu_list(char **argv)
{
const char *state, *intr;