From: Lionel Sambuc Date: Thu, 22 May 2014 13:30:51 +0000 (+0200) Subject: Message type for SYS_STIME X-Git-Tag: v3.3.0~219 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-coverage.html?a=commitdiff_plain;h=9d1ed02a04124d9f7eff54a95a146f5b04c1c94f;p=minix.git Message type for SYS_STIME Change-Id: Ic4401e736bb66960e2ea4b30f5e1946dd93fd76e --- diff --git a/include/minix/com.h b/include/minix/com.h index a931d6dee..f37f01d99 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -338,8 +338,6 @@ # define GET_REGS 24 /* get general process registers */ # define GET_RUSAGE 25 /* get resource usage */ -#define T_BOOTTIME m4_ll1 /* Boottime in seconds (also for SYS_STIME) */ - /* Field names for SYS_SETTIME. */ #define T_SETTIME_NOW m4_l2 /* non-zero for immediate, 0 for adjtime */ #define T_CLOCK_ID m4_l3 /* clock to adjust */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 0f3e7fecc..f53c938e2 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 { + time_t boot_time; + + uint8_t padding[48]; +} mess_lsys_krn_sys_stime; +_ASSERT_MSG_SIZE(mess_lsys_krn_sys_stime); + typedef struct { endpoint_t endpt; @@ -1595,6 +1602,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_stime m_lsys_krn_sys_stime; mess_lsys_krn_sys_times m_lsys_krn_sys_times; mess_lsys_krn_sys_umap m_lsys_krn_sys_umap; mess_lsys_krn_sys_vdevio m_lsys_krn_sys_vdevio; diff --git a/kernel/system/do_stime.c b/kernel/system/do_stime.c index db6b6652a..2347f3652 100644 --- a/kernel/system/do_stime.c +++ b/kernel/system/do_stime.c @@ -2,7 +2,7 @@ * m_type: SYS_STIME * * The parameters for this kernel call are: - * m4_ll1: T_BOOTTIME + * m_lsys_krn_sys_stime.boot_time */ #include "kernel/system.h" @@ -14,6 +14,6 @@ *===========================================================================*/ int do_stime(struct proc * caller, message * m_ptr) { - boottime= m_ptr->T_BOOTTIME; + boottime = m_ptr->m_lsys_krn_sys_stime.boot_time; return(OK); } diff --git a/lib/libsys/sys_stime.c b/lib/libsys/sys_stime.c index e2b2bb587..a06a7a0a5 100644 --- a/lib/libsys/sys_stime.c +++ b/lib/libsys/sys_stime.c @@ -6,7 +6,7 @@ time_t boottime; /* New boottime */ message m; int r; - m.T_BOOTTIME = boottime; + m.m_lsys_krn_sys_stime.boot_time = boottime; r = _kernel_call(SYS_STIME, &m); return(r); }