From 6c8d300275faaaa4a0e3c48fa9d45dd177528942 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 16 Oct 2010 19:12:18 +0200 Subject: [PATCH] * grub-core/commands/acpihalt.c (get_sleep_type): Accept \_S5_ as synonym to _S5_. Needed for some DSDTs. --- ChangeLog | 5 +++++ grub-core/commands/acpihalt.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 052fd1e27..34a092ca2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-16 Vladimir Serbinenko + + * grub-core/commands/acpihalt.c (get_sleep_type): Accept \_S5_ as + synonym to _S5_. Needed for some DSDTs. + 2010-10-16 Vladimir Serbinenko Userspace ACPI parser debugging. diff --git a/grub-core/commands/acpihalt.c b/grub-core/commands/acpihalt.c index 1e42f447f..d28a74323 100644 --- a/grub-core/commands/acpihalt.c +++ b/grub-core/commands/acpihalt.c @@ -175,11 +175,12 @@ get_sleep_type (grub_uint8_t *table, grub_uint8_t *end) break; case GRUB_ACPI_OPCODE_NAME: ptr++; - if (memcmp (ptr, "_S5_", 4) == 0) + if (memcmp (ptr, "_S5_", 4) == 0 || memcmp (ptr, "\\_S5_", 4) == 0) { int ll; grub_uint8_t *ptr2 = ptr; - ptr2 += 4; + grub_dprintf ("acpi", "S5 found\n"); + ptr2 += skip_name_string (ptr, end); if (*ptr2 != 0x12) { grub_printf ("Unknown opcode in _S5: 0x%x\n", *ptr2);