#define RTCDEV_Y2KBUG 0x01 /* Interpret 1980 as 2000 for RTC w/Y2K bug */
#define RTCDEV_CMOSREG 0x02 /* Also set the CMOS clock register bits. */
-/*===========================================================================*
- * Field names shared across several call codes *
- *===========================================================================*/
-
-/* Field names for the getsysinfo(2) call. */
-#define SI_WHAT m1_i1 /* int */
-#define SI_WHERE m1_p1 /* void */
-#define SI_SIZE m1_i2 /* size_t */
-
/*===========================================================================*
* Internal codes used by several services *
*===========================================================================*/
} mess_linputdriver_input_event;
_ASSERT_MSG_SIZE(mess_linputdriver_input_event);
+typedef struct {
+ int what;
+ vir_bytes where;
+ size_t size;
+
+ uint8_t padding[44];
+} mess_lsys_getsysinfo;
+_ASSERT_MSG_SIZE(mess_lsys_getsysinfo);
+
typedef struct {
uint32_t flags;
endpoint_t endpoint;
mess_linputdriver_input_event m_linputdriver_input_event;
+ mess_lsys_getsysinfo m_lsys_getsysinfo;
+
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
}
memset(&m, 0, sizeof(m));
- m.SI_WHAT = what;
- m.SI_WHERE = where;
- m.SI_SIZE = size;
+ m.m_lsys_getsysinfo.what = what;
+ m.m_lsys_getsysinfo.where = where;
+ m.m_lsys_getsysinfo.size = size;
return _taskcall(who, call_nr, &m);
}
size_t length;
int s;
- switch(m_ptr->SI_WHAT) {
+ switch(m_ptr->m_lsys_getsysinfo.what) {
case SI_DATA_STORE:
src_addr = (vir_bytes)ds_store;
length = sizeof(struct data_store) * NR_DS_KEYS;
return EINVAL;
}
- if (length != m_ptr->SI_SIZE)
+ if (length != m_ptr->m_lsys_getsysinfo.size)
return EINVAL;
if (OK != (s=sys_datacopy(SELF, src_addr,
- m_ptr->m_source, (vir_bytes)m_ptr->SI_WHERE, length))) {
+ m_ptr->m_source, m_ptr->m_lsys_getsysinfo.where, length))) {
printf("DS: copy failed: %d\n", s);
return s;
}
return EPERM;
}
- switch(m_in.SI_WHAT) {
+ switch(m_in.m_lsys_getsysinfo.what) {
case SI_PROC_TAB: /* copy entire process table */
src_addr = (vir_bytes) mproc;
len = sizeof(struct mproc) * NR_PROCS;
return(EINVAL);
}
- if (len != m_in.SI_SIZE)
+ if (len != m_in.m_lsys_getsysinfo.size)
return(EINVAL);
- dst_addr = (vir_bytes) m_in.SI_WHERE;
+ dst_addr = m_in.m_lsys_getsysinfo.where;
return sys_datacopy(SELF, src_addr, who_e, dst_addr, len);
}
if((s = check_call_permission(m_ptr->m_source, 0, NULL)) != OK)
return s;
- switch(m_ptr->SI_WHAT) {
+ switch(m_ptr->m_lsys_getsysinfo.what) {
case SI_PROC_TAB:
src_addr = (vir_bytes) rproc;
len = sizeof(struct rproc) * NR_SYS_PROCS;
return(EINVAL);
}
- if (len != m_ptr->SI_SIZE)
+ if (len != m_ptr->m_lsys_getsysinfo.size)
return(EINVAL);
dst_proc = m_ptr->m_source;
- dst_addr = (vir_bytes) m_ptr->SI_WHERE;
+ dst_addr = m_ptr->m_lsys_getsysinfo.where;
return sys_datacopy(SELF, src_addr, dst_proc, dst_addr, len);
}
size_t len, buf_size;
int what;
- what = job_m_in.SI_WHAT;
- dst_addr = (vir_bytes) job_m_in.SI_WHERE;
- buf_size = (size_t) job_m_in.SI_SIZE;
+ what = job_m_in.m_lsys_getsysinfo.what;
+ dst_addr = job_m_in.m_lsys_getsysinfo.where;
+ buf_size = job_m_in.m_lsys_getsysinfo.size;
/* Only su may call do_getsysinfo. This call may leak information (and is not
* stable enough to be part of the API/ABI). In the future, requests from