diff options
author | tmm <tmm@FreeBSD.org> | 2001-07-03 19:44:07 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2001-07-03 19:44:07 +0000 |
commit | 6dd375961b07fa6608ebb267904bfd314b0e4c55 (patch) | |
tree | d8e729d020ba0e0a230b079811d64621eb089600 /sys/amd64 | |
parent | 16f7cc2d2283209c8013c00af6771c98240991ee (diff) | |
download | FreeBSD-src-6dd375961b07fa6608ebb267904bfd314b0e4c55.zip FreeBSD-src-6dd375961b07fa6608ebb267904bfd314b0e4c55.tar.gz |
Make the code to read the kernel message buffer via sysctl machine-
independent and rename the corresponding sysctls from machdep.msgbuf and
machdep.msgbuf_clear (i386 only) to kern.msgbuf and kern.msgbuf_clear.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e5eb21e..73b8052 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -184,48 +184,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; long dumplo; |