Re: [PATCH] x86, reboot: skip DMI checks if reboot set by user

From: Alan Cox
Date: Tue Jan 17 2012 - 15:00:53 EST


On Tue, 17 Jan 2012 10:16:03 -0500
Michael D Labriola <mlabriol@xxxxxxxx> wrote:

> This commit causes DMI checks for vendor specific reboot
> quirks to be skipped if the user passed in a reboot= arg
> on the command line.
>
> Signed-off-by: Michael D Labriola <mlabriol@xxxxxxxx>
> ---
> arch/x86/kernel/reboot.c | 16 ++++++++++++++--
> 1 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
> index 37a458b..4240d58 100644
> --- a/arch/x86/kernel/reboot.c
> +++ b/arch/x86/kernel/reboot.c
> @@ -38,6 +38,7 @@ static const struct desc_ptr no_idt = {};
> static int reboot_mode;
> enum reboot_type reboot_type = BOOT_ACPI;
> int reboot_force;
> +int reboot_user;

static ...

> case 'f':
> reboot_force = 1;
> + reboot_user = 1;

Cleaner would be to add a

BOOT_ACPI_FORCE perhaps so you can tell ACPI v ACPI specified by user

> break;
> }
>
> @@ -316,7 +322,10 @@ static struct dmi_system_id __initdata
> reboot_dmi_table[] = {
>
> static int __init reboot_init(void)
> {
> - dmi_check_system(reboot_dmi_table);
> + /* Skip the DMI check if user set reboot= on the command line */
> + if (!reboot_user) {

then do

if (reboot_type == BOOT_ACPI)
> + dmi_check_system(reboot_dmi_table);
> + }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/