[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] x86: Don't apply reboot quirks if reboot set by user



On 11/03/15 11:44, Ross Lagerwall wrote:
> 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@xxxxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

> ---
>  xen/arch/x86/shutdown.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
> index 21f6cf5..236b4a1 100644
> --- a/xen/arch/x86/shutdown.c
> +++ b/xen/arch/x86/shutdown.c
> @@ -35,6 +35,7 @@ enum reboot_type {
>  };
>  
>  static int reboot_mode;
> +static bool_t reboot_default = 1;
>  
>  /*
>   * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]
> @@ -51,6 +52,8 @@ static void __init set_reboot_type(char *str)
>  {
>      for ( ; ; )
>      {
> +        reboot_default = 0;
> +
>          switch ( *str )
>          {
>          case 'n': /* no reboot */
> @@ -452,6 +455,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_default )
> +        return 0;
> +
>      dmi_check_system(reboot_dmi_table);
>      return 0;
>  }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.