Merged from sys/i386/i386/machdep.c revisions 1.459 and 1.460.

This commit is contained in:
Yoshihiro Takahashi 2001-07-07 04:06:04 +00:00
parent 662a42f752
commit 3b2b0a59d0
2 changed files with 0 additions and 90 deletions

View File

@ -107,9 +107,6 @@
#include <machine/perfmon.h>
#endif
#ifdef OLD_BUS_ARCH
#include <i386/isa/isa_device.h>
#endif
#include <i386/isa/icu.h>
#include <i386/isa/intr_machdep.h>
#ifdef PC98
@ -197,48 +194,6 @@ sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD,
0, 0, sysctl_hw_availpages, "I", "");
static int
sysctl_machdep_msgbuf(SYSCTL_HANDLER_ARGS)
{
int error;
/* Unwind the buffer, so that it's linear (possibly starting with
* some initial nulls).
*/
error=sysctl_handle_opaque(oidp,msgbufp->msg_ptr+msgbufp->msg_bufr,
msgbufp->msg_size-msgbufp->msg_bufr,req);
if(error) return(error);
if(msgbufp->msg_bufr>0) {
error=sysctl_handle_opaque(oidp,msgbufp->msg_ptr,
msgbufp->msg_bufr,req);
}
return(error);
}
SYSCTL_PROC(_machdep, OID_AUTO, msgbuf, CTLTYPE_STRING|CTLFLAG_RD,
0, 0, sysctl_machdep_msgbuf, "A","Contents of kernel message buffer");
static int msgbuf_clear;
static int
sysctl_machdep_msgbuf_clear(SYSCTL_HANDLER_ARGS)
{
int error;
error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2,
req);
if (!error && req->newptr) {
/* Clear the buffer and reset write pointer */
bzero(msgbufp->msg_ptr,msgbufp->msg_size);
msgbufp->msg_bufr=msgbufp->msg_bufx=0;
msgbuf_clear=0;
}
return (error);
}
SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
"Clear kernel message buffer");
int Maxmem = 0;
#ifdef PC98
int Maxmem_under16M = 0;

View File

@ -107,9 +107,6 @@
#include <machine/perfmon.h>
#endif
#ifdef OLD_BUS_ARCH
#include <i386/isa/isa_device.h>
#endif
#include <i386/isa/icu.h>
#include <i386/isa/intr_machdep.h>
#ifdef PC98
@ -197,48 +194,6 @@ sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD,
0, 0, sysctl_hw_availpages, "I", "");
static int
sysctl_machdep_msgbuf(SYSCTL_HANDLER_ARGS)
{
int error;
/* Unwind the buffer, so that it's linear (possibly starting with
* some initial nulls).
*/
error=sysctl_handle_opaque(oidp,msgbufp->msg_ptr+msgbufp->msg_bufr,
msgbufp->msg_size-msgbufp->msg_bufr,req);
if(error) return(error);
if(msgbufp->msg_bufr>0) {
error=sysctl_handle_opaque(oidp,msgbufp->msg_ptr,
msgbufp->msg_bufr,req);
}
return(error);
}
SYSCTL_PROC(_machdep, OID_AUTO, msgbuf, CTLTYPE_STRING|CTLFLAG_RD,
0, 0, sysctl_machdep_msgbuf, "A","Contents of kernel message buffer");
static int msgbuf_clear;
static int
sysctl_machdep_msgbuf_clear(SYSCTL_HANDLER_ARGS)
{
int error;
error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2,
req);
if (!error && req->newptr) {
/* Clear the buffer and reset write pointer */
bzero(msgbufp->msg_ptr,msgbufp->msg_size);
msgbufp->msg_bufr=msgbufp->msg_bufx=0;
msgbuf_clear=0;
}
return (error);
}
SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
"Clear kernel message buffer");
int Maxmem = 0;
#ifdef PC98
int Maxmem_under16M = 0;