minix/lib/libsys/sys_diagctl.c
Lionel Sambuc 9ea21ea158 Message type for SYS_DIAGCTL.
Change-Id: Icdaa84847f8c75f5af6612dda3326f800166e0d7
2014-07-28 17:06:25 +02:00

28 lines
565 B
C

#include "syslib.h"
#include "sysutil.h"
int sys_diagctl(int code, char *arg1, int arg2)
{
message m;
m.m_lsys_krn_sys_diagctl.code = code;
switch(code) {
case DIAGCTL_CODE_DIAG:
m.m_lsys_krn_sys_diagctl.buf = (vir_bytes)arg1;
m.m_lsys_krn_sys_diagctl.len = arg2;
break;
case DIAGCTL_CODE_STACKTRACE:
m.m_lsys_krn_sys_diagctl.endpt = (endpoint_t)arg2;
break;
case DIAGCTL_CODE_REGISTER:
break;
case DIAGCTL_CODE_UNREGISTER:
break;
default:
panic("Unknown SYS_DIAGCTL request %d\n", code);
}
return(_kernel_call(SYS_DIAGCTL, &m));
}