kernel/reboot.c: re-enable the function of variable reboot_default
authorChuansheng Liu <[email protected]>
Tue, 24 Sep 2013 22:27:43 +0000 (15:27 -0700)
committerLinus Torvalds <[email protected]>
Wed, 25 Sep 2013 00:00:26 +0000 (17:00 -0700)
Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic
kernel") did some cleanup for reboot= command line, but it made the
reboot_default inoperative.

The default value of variable reboot_default should be 1, and if command
line reboot= is not set, system will use the default reboot mode.

[[email protected]: fix comment layout]
Signed-off-by: Li Fei <[email protected]>
Signed-off-by: liu chuansheng <[email protected]>
Acked-by: Robin Holt <[email protected]>
Cc: <[email protected]> [3.11.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/reboot.c

index 269ed9384cc4284e9cf6043bd00667ea582c4369..f813b3474646c5b320a19d9a8997349bdd14d68e 100644 (file)
@@ -32,7 +32,14 @@ EXPORT_SYMBOL(cad_pid);
 #endif
 enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
 
-int reboot_default;
+/*
+ * This variable is used privately to keep track of whether or not
+ * reboot_type is still set to its default value (i.e., reboot= hasn't
+ * been set on the command line).  This is needed so that we can
+ * suppress DMI scanning for reboot quirks.  Without it, it's
+ * impossible to override a faulty reboot quirk without recompiling.
+ */
+int reboot_default = 1;
 int reboot_cpu;
 enum reboot_type reboot_type = BOOT_ACPI;
 int reboot_force;