PM: remove 'boottime' global variable

This commit is contained in:
David van Moolenbroek
2009-11-28 13:22:01 +00:00
parent 6da61b8f05
commit 45123f83d3
3 changed files with 7 additions and 10 deletions

View File

@@ -23,10 +23,10 @@ PUBLIC int do_time()
* rotates at a constant rate and that such things as leap seconds do not
* exist.
*/
clock_t uptime;
clock_t uptime, boottime;
int s;
if ( (s=getuptime(&uptime)) != OK)
if ( (s=getuptime2(&uptime, &boottime)) != OK)
panic(__FILE__,"do_time couldn't get uptime", s);
mp->mp_reply.reply_time = (time_t) (boottime + (uptime/system_hz));
@@ -40,10 +40,9 @@ PUBLIC int do_time()
PUBLIC int do_stime()
{
/* Perform the stime(tp) system call. Retrieve the system's uptime (ticks
* since boot) and store the time in seconds at system boot in the global
* variable 'boottime'.
* since boot) and pass the new time in seconds at system boot to the kernel.
*/
clock_t uptime;
clock_t uptime, boottime;
int s;
if (mp->mp_effuid != SUPER_USER) {