diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 4ea37f060..159341cd5 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -784,6 +784,13 @@ typedef struct { } mess_lsys_krn_sys_setalarm; _ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm); +typedef struct { + int request; + + uint8_t padding[52]; +} mess_lsys_krn_sys_statectl; +_ASSERT_MSG_SIZE(mess_lsys_krn_sys_statectl); + typedef struct { time_t boot_time; @@ -1630,6 +1637,7 @@ typedef struct { mess_lsys_krn_sys_memset m_lsys_krn_sys_memset; mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio; mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm; + mess_lsys_krn_sys_statectl m_lsys_krn_sys_statectl; mess_lsys_krn_sys_stime m_lsys_krn_sys_stime; mess_lsys_krn_sys_settime m_lsys_krn_sys_settime; mess_lsys_krn_sys_times m_lsys_krn_sys_times; diff --git a/kernel/system/do_statectl.c b/kernel/system/do_statectl.c index 88818dd09..4118216da 100644 --- a/kernel/system/do_statectl.c +++ b/kernel/system/do_statectl.c @@ -2,7 +2,7 @@ * m_type: SYS_STATECTL * * The parameters for this kernel call are: - * m2_i2: CTL_REQUEST (state control request) + * m_lsys_krn_sys_statectl.request (state control request) */ #include "kernel/system.h" @@ -16,7 +16,7 @@ int do_statectl(struct proc * caller, message * m_ptr) { /* Handle sys_statectl(). A process has issued a state control request. */ - switch(m_ptr->CTL_REQUEST) + switch(m_ptr->m_lsys_krn_sys_statectl.request) { case SYS_STATE_CLEAR_IPC_REFS: /* Clear IPC references for all the processes communicating @@ -25,7 +25,8 @@ int do_statectl(struct proc * caller, message * m_ptr) clear_ipc_refs(caller, EDEADSRCDST); return(OK); default: - printf("do_statectl: bad request %d\n", m_ptr->CTL_REQUEST); + printf("do_statectl: bad request %d\n", + m_ptr->m_lsys_krn_sys_statectl.request); return EINVAL; } } diff --git a/lib/libsys/sys_statectl.c b/lib/libsys/sys_statectl.c index d5d4ec7b5..40c9a1e11 100644 --- a/lib/libsys/sys_statectl.c +++ b/lib/libsys/sys_statectl.c @@ -4,7 +4,7 @@ int sys_statectl(int request) { message m; - m.CTL_REQUEST = request; + m.m_lsys_krn_sys_statectl.request = request; return _kernel_call(SYS_STATECTL, &m); }