From f982a09546b038c2c11d607965f057091b24b3fd Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 2 Apr 2013 17:44:30 +0200 Subject: [PATCH] Print path to DSM method on execution failure --- bbswitch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bbswitch.c b/bbswitch.c index 11fddec..77ad752 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -132,10 +132,14 @@ static int acpi_call_dsm(acpi_handle handle, const char muid[16], int revid, err = acpi_evaluate_object(handle, "_DSM", &input, &output); if (err) { + struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL }; char muid_str[5 * 16]; char args_str[5 * 4]; - pr_warn("failed to evaluate _DSM {%s} 0x%X 0x%X {%s}: %s\n", + acpi_get_name(handle, ACPI_FULL_PATHNAME, &buf); + + pr_warn("failed to evaluate %s._DSM {%s} 0x%X 0x%X {%s}: %s\n", + (char *)buf.pointer, buffer_to_string(muid, 16, muid_str), revid, func, buffer_to_string(args, 4, args_str), acpi_format_exception(err)); return err;