aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index eecf84526afe..d8e49e659027 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -489,6 +489,12 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void __user
489 magic2 != LINUX_REBOOT_MAGIC2C)) 489 magic2 != LINUX_REBOOT_MAGIC2C))
490 return -EINVAL; 490 return -EINVAL;
491 491
492 /* Instead of trying to make the power_off code look like
493 * halt when pm_power_off is not set do it the easy way.
494 */
495 if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
496 cmd = LINUX_REBOOT_CMD_HALT;
497
492 lock_kernel(); 498 lock_kernel();
493 switch (cmd) { 499 switch (cmd) {
494 case LINUX_REBOOT_CMD_RESTART: 500 case LINUX_REBOOT_CMD_RESTART: