summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/machdep.c23
-rw-r--r--sys/i386/i386/machdep.c23
2 files changed, 44 insertions, 2 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 97c01e9..69ad611 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.306 1998/08/31 16:18:45 luoqi Exp $
+ * $Id: machdep.c,v 1.307 1998/09/01 02:04:12 kato Exp $
*/
#include "apm.h"
@@ -211,6 +211,27 @@ 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 is 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","");
+
int bootverbose = 0, Maxmem = 0;
long dumplo;
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 97c01e9..69ad611 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.306 1998/08/31 16:18:45 luoqi Exp $
+ * $Id: machdep.c,v 1.307 1998/09/01 02:04:12 kato Exp $
*/
#include "apm.h"
@@ -211,6 +211,27 @@ 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 is 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","");
+
int bootverbose = 0, Maxmem = 0;
long dumplo;
OpenPOWER on IntegriCloud