From f05edef98e025061f2629c6f7861212ee305d9cd Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 29 Dec 2021 13:37:51 +0000 Subject: [PATCH] acpibat(4): Print ACPI error when _STA fails. --- sys/dev/acpi/acpi_bat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpi/acpi_bat.c b/sys/dev/acpi/acpi_bat.c index bdcb1ca57d7c..f23a0a2f1d4c 100644 --- a/sys/dev/acpi/acpi_bat.c +++ b/sys/dev/acpi/acpi_bat.c @@ -294,7 +294,8 @@ acpibat_get_sta(device_t dv) rv = acpi_eval_integer(sc->sc_node->ad_handle, "_STA", &val); if (ACPI_FAILURE(rv)) { - aprint_error_dev(dv, "failed to evaluate _STA\n"); + aprint_error_dev(dv, "failed to evaluate _STA: %s\n", + AcpiFormatException(rv)); return -1; }