[Midnightbsd-cvs] src [10384] trunk/usr.sbin/mptable/mptable.c: sync
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jun 3 19:29:06 EDT 2018
Revision: 10384
http://svnweb.midnightbsd.org/src/?rev=10384
Author: laffer1
Date: 2018-06-03 19:29:05 -0400 (Sun, 03 Jun 2018)
Log Message:
-----------
sync
Modified Paths:
--------------
trunk/usr.sbin/mptable/Makefile
trunk/usr.sbin/mptable/mptable.1
trunk/usr.sbin/mptable/mptable.c
Property Changed:
----------------
trunk/usr.sbin/mptable/mptable.1
Modified: trunk/usr.sbin/mptable/Makefile
===================================================================
--- trunk/usr.sbin/mptable/Makefile 2018-06-03 23:28:43 UTC (rev 10383)
+++ trunk/usr.sbin/mptable/Makefile 2018-06-03 23:29:05 UTC (rev 10384)
@@ -1,4 +1,5 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/mptable/Makefile 201390 2010-01-02 11:07:44Z ed $
PROG= mptable
Modified: trunk/usr.sbin/mptable/mptable.1
===================================================================
--- trunk/usr.sbin/mptable/mptable.1 2018-06-03 23:28:43 UTC (rev 10383)
+++ trunk/usr.sbin/mptable/mptable.1 2018-06-03 23:29:05 UTC (rev 10384)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1996
.\" Steve Passe <fsmp at FreeBSD.org>. All rights reserved.
.\"
@@ -21,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/mptable/mptable.1 208291 2010-05-19 08:57:53Z uqs $
.\"
.Dd April 28, 1997
.Dt MPTABLE 1
Property changes on: trunk/usr.sbin/mptable/mptable.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/mptable/mptable.c
===================================================================
--- trunk/usr.sbin/mptable/mptable.c 2018-06-03 23:28:43 UTC (rev 10383)
+++ trunk/usr.sbin/mptable/mptable.c 2018-06-03 23:29:05 UTC (rev 10384)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1996, by Steve Passe
* All rights reserved.
@@ -29,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$MidnightBSD$";
+ "$FreeBSD: stable/10/usr.sbin/mptable/mptable.c 244530 2012-12-21 04:44:40Z neel $";
#endif /* not lint */
/*
@@ -42,7 +43,7 @@
#define EXTENDED_PROCESSING_READY
#define OEM_PROCESSING_READY_NOT
-#include <sys/types.h>
+#include <sys/param.h>
#include <err.h>
#include <fcntl.h>
#include <paths.h>
@@ -96,7 +97,7 @@
char name[ 7 ];
} busTypeName;
-static busTypeName busTypeTable[] =
+static const busTypeName busTypeTable[] =
{
{ CBUS, "CBUS" },
{ CBUSII, "CBUSII" },
@@ -119,7 +120,7 @@
{ UNKNOWN_BUSTYPE, "---" }
};
-const char* whereStrings[] = {
+static const char *whereStrings[] = {
"Extended BIOS Data Area",
"BIOS top of memory",
"Default top of memory",
@@ -135,17 +136,8 @@
char name[ 32 ];
} tableEntry;
-tableEntry basetableEntryTypes[] =
+static const tableEntry extendedtableEntryTypes[] =
{
- { 0, 20, "Processor" },
- { 1, 8, "Bus" },
- { 2, 8, "I/O APIC" },
- { 3, 8, "I/O INT" },
- { 4, 8, "Local INT" }
-};
-
-tableEntry extendedtableEntryTypes[] =
-{
{ 128, 20, "System Address Space" },
{ 129, 8, "Bus Hierarchy" },
{ 130, 8, "Compatibility Bus Address" }
@@ -277,19 +269,19 @@
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[256];
+static int apics[256];
-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 )
@@ -719,11 +711,13 @@
printf( "MP Config Base Table Entries:\n\n" );
- /* initialze tables */
- for ( x = 0; x < 16; ++x ) {
- busses[ x ] = apics[ x ] = 0xff;
- }
+ /* initialize tables */
+ for (x = 0; x < (int)nitems(busses); x++)
+ busses[x] = 0xff;
+ for (x = 0; x < (int)nitems(apics); x++)
+ apics[x] = 0xff;
+
ncpu = 0;
nbus = 0;
napic = 0;
@@ -837,7 +831,7 @@
int ofd;
u_char dumpbuf[ 4096 ];
- ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR );
+ ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 );
seekEntry( paddr );
readEntry( dumpbuf, 1024 );
write( ofd, dumpbuf, 1024 );
@@ -978,14 +972,14 @@
}
-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"
};
More information about the Midnightbsd-cvs
mailing list