static int pm_reboot(void) { DPRINTF(("pm: rebooting...\n")); pm_stop_timer(); device_broadcast(DEVCTL_PM_POWERDOWN, NULL, 1); driver_shutdown(); machine_powerdown(PWR_REBOOT); /* NOTREACHED */ return 0; }
/*===========================================================================* * sef_cb_signal_handler * *===========================================================================*/ PRIVATE void sef_cb_signal_handler(int signo) { /* Only check for termination signal, ignore anything else. */ if (signo != SIGTERM) return; /* If so, shut down this driver. */ #if DEBUG printf("Filter: shutdown...\n"); #endif driver_shutdown(); exit(0); }
static int pm_poweroff(void) { DPRINTF(("pm: power off...\n")); pm_stop_timer(); device_broadcast(DEVCTL_PM_POWERDOWN, NULL, 1); driver_shutdown(); #ifdef CONFIG_CONS cons_puts("\nThe system is halted. You can turn off power."); #endif machine_powerdown(PWR_OFF); /* NOTREACHED */ return 0; }