-/* $OpenBSD: machdep.c,v 1.163 2014/07/20 18:24:34 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.164 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
config_suspend(mainbus, DVACT_POWERDOWN);
#ifdef BOOTKEY
- printf("hit any key to %s...\n", howto & RB_HALT ? "halt" : "reboot");
+ printf("hit any key to %s...\n",
+ (howto & RB_HALT) != 0 ? "halt" : "reboot");
cnpollc(1); /* for proper keyboard command handling */
cngetc();
cnpollc(0);
#endif
/* Finally, powerdown/halt/reboot the system. */
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN &&
+ if ((howto & RB_POWERDOWN) != 0 &&
platform.powerdown != NULL) {
(*platform.powerdown)();
printf("WARNING: powerdown failed!\n");
}
- printf("%s\n\n", howto & RB_HALT ? "halted." : "rebooting...");
- prom_halt(howto & RB_HALT);
+ printf("%s\n\n",
+ (howto & RB_HALT) != 0 ? "halted." : "rebooting...");
+ prom_halt((howto & RB_HALT) != 0);
for (;;) ;
/* NOTREACHED */
}
-/* $OpenBSD: machdep.c,v 1.188 2014/07/13 22:53:38 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.189 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
{
struct device *mainbus;
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_POWERDOWN) != 0)
lid_suspend = 0;
if (cold) {
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
x86_broadcast_ipi(X86_IPI_HALT);
#endif
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
#if NACPI > 0 && !defined(SMALL_KERNEL)
extern int acpi_enabled;
if (acpi_enabled) {
delay(500000);
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_POWERDOWN) != 0)
acpi_powerdown();
}
#endif
if (cpureset_delay > 0)
delay(cpureset_delay * 1000);
cpu_reset();
- for(;;) ;
+ for (;;) ;
/* NOTREACHED */
}
-/* $OpenBSD: armish_machdep.c,v 1.30 2014/07/13 22:53:38 uebayasi Exp $ */
+/* $OpenBSD: armish_machdep.c,v 1.31 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
* that it cannot page part of the binary in as the filesystem has
* been unmounted.
*/
- if (!(howto & RB_NOSYNC))
+ if ((howto & RB_NOSYNC) == 0)
bootsync(howto);
if_downall();
/* Make sure IRQ's are disabled */
IRQdisable;
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0) {
board_powerdown();
printf("WARNING: powerdown failed!\n");
}
-/* $OpenBSD: armv7_machdep.c,v 1.13 2014/07/13 22:53:38 uebayasi Exp $ */
+/* $OpenBSD: armv7_machdep.c,v 1.14 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
* that it cannot page part of the binary in as the filesystem has
* been unmounted.
*/
- if (!(howto & RB_NOSYNC))
+ if ((howto & RB_NOSYNC) == 0)
bootsync(howto);
if_downall();
/* Make sure IRQ's are disabled */
IRQdisable;
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN) {
-
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0) {
printf("\nAttempting to power down...\n");
delay(500000);
platform_powerdown();
-/* $OpenBSD: machdep.c,v 1.70 2014/07/13 22:53:38 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.71 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
printf("System halted.\n\n");
bootstack();
cmmu_shutdown();
-/* $OpenBSD: machdep.c,v 1.231 2014/07/13 22:53:38 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.232 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
boothowto = howto | (boothowto & RB_HALT);
- if (!(howto & RB_NOSYNC)) {
+ if ((howto & RB_NOSYNC) == 0) {
waittime = 0;
vfs_shutdown();
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (cold_hook)
(*cold_hook)(HPPA_COLD_COLD);
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN && cold_hook) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0 && cold_hook) {
printf("Powering off...");
DELAY(2000000);
(*cold_hook)(HPPA_COLD_OFF);
-/* $OpenBSD: machdep.c,v 1.69 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.70 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
boothowto = howto | (boothowto & RB_HALT);
- if (!(howto & RB_NOSYNC)) {
+ if ((howto & RB_NOSYNC) == 0) {
waittime = 0;
vfs_shutdown();
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (cold_hook)
(*cold_hook)(HPPA_COLD_COLD);
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN && cold_hook) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0 && cold_hook) {
printf("Powering off...");
DELAY(2000000);
(*cold_hook)(HPPA_COLD_OFF);
-/* $OpenBSD: machdep.c,v 1.549 2014/07/14 08:36:31 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.550 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
{
struct device *mainbus;
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_POWERDOWN) != 0)
lid_suspend = 0;
if (cold) {
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
i386_broadcast_ipi(I386_IPI_HALT);
#endif
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
#if NACPI > 0 && !defined(SMALL_KERNEL)
extern int acpi_enabled;
if (acpi_enabled) {
delay(500000);
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_POWERDOWN) != 0)
acpi_powerdown();
}
#endif
#if NAPM > 0
- if (howto & RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
int rv;
printf("\nAttempting to power down...\n");
printf("rebooting...\n");
cpu_reset();
- for(;;) ;
+ for (;;) ;
/* NOTREACHED */
}
-/* $OpenBSD: machdep.c,v 1.39 2014/07/14 08:36:31 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.40 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
_reg_write_1(LANDISK_PWRMNG, PWRMNG_POWEROFF);
delay(1 * 1000 * 1000);
printf("POWEROFF FAILED!\n");
howto |= RB_HALT;
}
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
printf("\n");
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
-/* $OpenBSD: machdep.c,v 1.57 2014/07/19 18:01:23 pirofti Exp $ */
+/* $OpenBSD: machdep.c,v 1.58 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
config_suspend(mainbus, DVACT_POWERDOWN);
}
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0) {
if (sys_platform->powerdown != NULL) {
printf("System Power Down.\n");
(*(sys_platform->powerdown))();
-/* $OpenBSD: machdep.c,v 1.107 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.108 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
config_suspend(mainbus, DVACT_POWERDOWN);
/* LUNA-88K supports automatic powerdown */
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
printf("attempting to power down...\n");
powerdown();
/* if failed, fall through. */
}
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
printf("halted\n\n");
} else {
/* Reset all cpus, which causes reboot */
-/* $OpenBSD: machdep.c,v 1.159 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.160 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0) {
#if NADB > 0
delay(1000000);
adb_poweroff();
-/* $OpenBSD: machdep.c,v 1.59 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.60 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0)
printf("System Power Down not supported,"
" halting system.\n");
else
-/* $OpenBSD: machdep.c,v 1.147 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.148 2014/07/21 17:25:47 uebayasi Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0)
printf("System Power Down.\n");
else
printf("System Halt.\n");
-/* $OpenBSD: machdep.c,v 1.54 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.55 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
+ if ((howto & RB_HALT) != 0) {
+ if ((howto & RB_POWERDOWN) != 0) {
;
}
-/* $OpenBSD: machdep.c,v 1.41 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.42 2014/07/21 17:25:47 uebayasi Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if ((howto & RB_HALT) || (howto & RB_POWERDOWN)) {
+ if ((howto & RB_HALT) != 0 || (howto & RB_POWERDOWN) != 0) {
printf("halted\n\n");
romhalt();
}
printf("rebooting\n\n");
i = 1;
- if (howto & RB_SINGLE)
+ if ((howto & RB_SINGLE) != 0)
str[i++] = 's';
- if (howto & RB_KDB)
+ if ((howto & RB_KDB) != 0)
str[i++] = 'd';
if (i > 1) {
str[0] = '-';
-/* $OpenBSD: machdep.c,v 1.163 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.164 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if ((howto & RB_HALT) || (howto & RB_POWERDOWN)) {
+ if ((howto & RB_HALT) != 0 || (howto & RB_POWERDOWN) != 0) {
#if defined(SUN4M)
- if (howto & RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
printf("attempting to power down...\n");
#if NTCTRL > 0
tadpole_powerdown();
printf("rebooting\n\n");
i = 1;
- if (howto & RB_SINGLE)
+ if ((howto & RB_SINGLE) != 0)
str[i++] = 's';
- if (howto & RB_KDB)
+ if ((howto & RB_KDB) != 0)
str[i++] = 'd';
if (i > 1) {
str[0] = '-';
-/* $OpenBSD: machdep.c,v 1.166 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.167 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
config_suspend(mainbus, DVACT_POWERDOWN);
/* If powerdown was requested, do it. */
- if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
/* Let the OBP do the work. */
OF_poweroff();
printf("WARNING: powerdown failed!\n");
*/
}
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
printf("halted\n\n");
OF_exit();
panic("PROM exit failed");
str[0] = '\0';
}
- if (howto & RB_SINGLE)
+ if ((howto & RB_SINGLE) != 0)
str[i++] = 's';
- if (howto & RB_KDB)
+ if ((howto & RB_KDB) != 0)
str[i++] = 'd';
if (i > 1) {
if (str[0] == '\0')
-/* $OpenBSD: machdep.c,v 1.142 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.143 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
splhigh();
cold = 1;
- if (howto & RB_DUMP)
+ if ((howto & RB_DUMP) != 0)
dumpsys();
haltsys:
if (mainbus != NULL)
config_suspend(mainbus, DVACT_POWERDOWN);
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
if (dep_call->cpu_halt)
(*dep_call->cpu_halt) ();
printf("halting (in tight loop); hit\n\t^P\n\tHALT\n\n");
-/* $OpenBSD: zaurus_machdep.c,v 1.50 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: zaurus_machdep.c,v 1.51 2014/07/21 17:25:47 uebayasi Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
struct device *mainbus;
extern int lid_suspend;
- if (howto & RB_POWERDOWN)
+ if ((howto & RB_POWERDOWN) != 0)
lid_suspend = 0;
if (cold) {
* that it cannot page part of the binary in as the filesystem has
* been unmounted.
*/
- if (!(howto & RB_NOSYNC))
+ if ((howto & RB_NOSYNC) == 0)
bootsync(howto);
if_downall();
/* Make sure IRQ's are disabled */
IRQdisable;
- if (howto & RB_HALT) {
+ if ((howto & RB_HALT) != 0) {
#if NAPM > 0
- if (howto & RB_POWERDOWN) {
+ if ((howto & RB_POWERDOWN) != 0) {
printf("\nAttempting to power down...\n");
delay(6000000);