]> xenbits.xensource.com Git - people/gdunlap/xen.git/commitdiff
x86: don't apply reboot quirks if reboot set by user
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 13 Mar 2015 11:41:51 +0000 (12:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Mar 2015 11:41:51 +0000 (12:41 +0100)
If reboot= is specified on the command-line, don't apply reboot quirks
to allow the command-line option to take precedence.

This is a port of Linux commit 5955633e91bf ("x86/reboot: Skip DMI
checks if reboot set by user").

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Leverage (and make apply on top of) c643fb110a ("x86/EFI: allow
reboot= overrides when running under EFI").

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/shutdown.c

index d2bb24b741cdf0e7d3668018b44cff81541587bd..9ec8f9795474cbb9b6b14c88b44cbd4327355996 100644 (file)
@@ -464,6 +464,13 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
 
 static int __init reboot_init(void)
 {
+    /*
+     * Only do the DMI check if reboot_type hasn't been overridden
+     * on the command line
+     */
+    if ( reboot_type != BOOT_INVALID )
+        return 0;
+
     default_reboot_type();
     dmi_check_system(reboot_dmi_table);
     return 0;