Let reboot work again by making PM check for RBT_REBOOT
This commit is contained in:
parent
138a372e84
commit
c236121692
2 changed files with 12 additions and 4 deletions
|
@ -680,7 +680,9 @@ timer_t *tp; /* watchdog timer pointer */
|
|||
unlock(5);
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
kprintf("ticks_added: %d\n", ticks_added);
|
||||
#endif
|
||||
|
||||
/* Now schedule a new watchdog timer to balance the queues again. The
|
||||
* period depends on the total amount of quantum ticks added.
|
||||
|
|
|
@ -171,10 +171,10 @@ PUBLIC int do_getprocnr()
|
|||
*===========================================================================*/
|
||||
PUBLIC int do_reboot()
|
||||
{
|
||||
char monitor_code[32*sizeof(char *)];
|
||||
static char *monitor_code = "delay;boot";
|
||||
vir_bytes code_addr;
|
||||
int code_size;
|
||||
int abort_flag;
|
||||
int abort_flag, abort_proc_e;
|
||||
|
||||
/* Check permission to abort the system. */
|
||||
if (mp->mp_effuid != SUPER_USER) return(EPERM);
|
||||
|
@ -182,7 +182,13 @@ PUBLIC int do_reboot()
|
|||
/* See how the system should be aborted. */
|
||||
abort_flag = (unsigned) m_in.reboot_flag;
|
||||
if (abort_flag >= RBT_INVALID) return(EINVAL);
|
||||
if (RBT_MONITOR == abort_flag) {
|
||||
abort_proc_e = who_e;
|
||||
if (RBT_REBOOT == abort_flag) {
|
||||
abort_flag = RBT_MONITOR;
|
||||
abort_proc_e = PM_PROC_NR;
|
||||
code_addr = (vir_bytes) monitor_code;
|
||||
code_size = strlen(monitor_code)+1;
|
||||
} else if (RBT_MONITOR == abort_flag) {
|
||||
code_addr = (vir_bytes) m_in.reboot_code;
|
||||
code_size = m_in.reboot_strlen + 1;
|
||||
}
|
||||
|
@ -203,7 +209,7 @@ PUBLIC int do_reboot()
|
|||
/* Ask the kernel to abort. All system services, including the PM, will
|
||||
* get a HARD_STOP notification. Await the notification in the main loop.
|
||||
*/
|
||||
sys_abort(abort_flag, who_e, code_addr, code_size);
|
||||
sys_abort(abort_flag, abort_proc_e, code_addr, code_size);
|
||||
return(SUSPEND); /* don't reply to caller */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue