-/* $OpenBSD: power.c,v 1.7 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: power.c,v 1.8 2014/07/12 20:18:08 uebayasi Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
*/
#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/systm.h>
-#include <sys/reboot.h>
#include <sys/device.h>
#include <sys/kthread.h>
* switch and thus we have do dampen it ourselves.
*/
if (sc->sc_dr_cnt == hz / 10)
- reboot(RB_POWERDOWN | RB_HALT);
+ prsignal(initprocess, SIGUSR2);
tsleep(v, PWAIT, "drpower", 10);
}
-/* $OpenBSD: power.c,v 1.3 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: power.c,v 1.4 2014/07/12 20:18:08 uebayasi Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
*/
#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/systm.h>
-#include <sys/reboot.h>
#include <sys/device.h>
#include <sys/kthread.h>
: "=&r" (r) : "r" (sc->sc_pwr_reg));
if (!(r & 1))
- reboot(RB_POWERDOWN | RB_HALT);
+ prsignal(initprocess, SIGUSR2);
tsleep(v, PWAIT, "regpower", 10);
}
-/* $OpenBSD: sbus.c,v 1.41 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: sbus.c,v 1.42 2014/07/12 20:18:09 uebayasi Exp $ */
/* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */
/*-
*/
#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/signalvar.h>
#include <sys/extent.h>
#include <sys/malloc.h>
#include <sys/systm.h>
/* Should try a clean shutdown first */
printf("DANGER: OVER TEMPERATURE detected\nShutting down...\n");
delay(20);
- reboot(RB_POWERDOWN | RB_HALT);
- /*NOTREACHED*/
+ prsignal(initprocess, SIGUSR2);
return (1);
}