summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mptable
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 16:47:50 +0000
committered <ed@FreeBSD.org>2011-11-06 16:47:50 +0000
commit599a60039ec44a2c0e779b1372864ca06d6e3cbf (patch)
tree988bc37318a931a822242ede9a8e3aa8c4e73bc8 /usr.sbin/mptable
parentf926e2345dc6c34c99b612cb5ed728f2d0d0c944 (diff)
downloadFreeBSD-src-599a60039ec44a2c0e779b1372864ca06d6e3cbf.zip
FreeBSD-src-599a60039ec44a2c0e779b1372864ca06d6e3cbf.tar.gz
Mark all global variables static for mptable(1).
While there, remove basetableEntryTypes, which became unused in r71209.
Diffstat (limited to 'usr.sbin/mptable')
-rw-r--r--usr.sbin/mptable/mptable.c41
1 files changed, 16 insertions, 25 deletions
diff --git a/usr.sbin/mptable/mptable.c b/usr.sbin/mptable/mptable.c
index a16a1b9..92279bc 100644
--- a/usr.sbin/mptable/mptable.c
+++ b/usr.sbin/mptable/mptable.c
@@ -96,7 +96,7 @@ typedef struct BUSTYPENAME {
char name[ 7 ];
} busTypeName;
-static busTypeName busTypeTable[] =
+static const busTypeName busTypeTable[] =
{
{ CBUS, "CBUS" },
{ CBUSII, "CBUSII" },
@@ -119,7 +119,7 @@ static busTypeName busTypeTable[] =
{ UNKNOWN_BUSTYPE, "---" }
};
-const char* whereStrings[] = {
+static const char *whereStrings[] = {
"Extended BIOS Data Area",
"BIOS top of memory",
"Default top of memory",
@@ -135,16 +135,7 @@ typedef struct TABLE_ENTRY {
char name[ 32 ];
} tableEntry;
-tableEntry basetableEntryTypes[] =
-{
- { 0, 20, "Processor" },
- { 1, 8, "Bus" },
- { 2, 8, "I/O APIC" },
- { 3, 8, "I/O INT" },
- { 4, 8, "Local INT" }
-};
-
-tableEntry extendedtableEntryTypes[] =
+static const tableEntry extendedtableEntryTypes[] =
{
{ 128, 20, "System Address Space" },
{ 129, 8, "Bus Hierarchy" },
@@ -277,19 +268,19 @@ static void doDmesg( void );
static void pnstr( char* s, int c );
/* global data */
-int pfd; /* physical /dev/mem fd */
+static int pfd; /* physical /dev/mem fd */
-int busses[ 16 ];
-int apics[ 16 ];
+static int busses[16];
+static int apics[16];
-int ncpu;
-int nbus;
-int napic;
-int nintr;
+static int ncpu;
+static int nbus;
+static int napic;
+static int nintr;
-int dmesg;
-int grope;
-int verbose;
+static int dmesg;
+static int grope;
+static int verbose;
static void
usage( void )
@@ -978,14 +969,14 @@ ioApicEntry( void )
}
-const char* intTypes[] = {
+static const char *intTypes[] = {
"INT", "NMI", "SMI", "ExtINT"
};
-const char* polarityMode[] = {
+static const char *polarityMode[] = {
"conforms", "active-hi", "reserved", "active-lo"
};
-const char* triggerMode[] = {
+static const char *triggerMode[] = {
"conforms", "edge", "reserved", "level"
};
OpenPOWER on IntegriCloud