2013-09-21 00:58:46 +02:00
|
|
|
|
|
|
|
#include "syslib.h"
|
2014-07-25 16:35:26 +02:00
|
|
|
#include "sysutil.h"
|
2013-09-21 00:58:46 +02:00
|
|
|
|
|
|
|
int sys_diagctl(int code, char *arg1, int arg2)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2014-07-25 16:35:26 +02:00
|
|
|
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);
|
|
|
|
}
|
2013-09-21 00:58:46 +02:00
|
|
|
|
|
|
|
return(_kernel_call(SYS_DIAGCTL, &m));
|
|
|
|
}
|