ACK: [PATCH] acpi: devices: print device name in acpi_ac test
Colin Ian King
colin.king at canonical.com
Thu Oct 5 08:02:19 UTC 2017
On 05/10/17 01:55, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/acpi/devices/ac_adapter/ac.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/src/acpi/devices/ac_adapter/ac.c b/src/acpi/devices/ac_adapter/ac.c
> index d82b303..e573c4b 100644
> --- a/src/acpi/devices/ac_adapter/ac.c
> +++ b/src/acpi/devices/ac_adapter/ac.c
> @@ -58,6 +58,18 @@ static int acpi_ac_init(fwts_framework *fw)
> if (!device) {
> fwts_log_error(fw, "ACPI AC device does not exist, skipping test");
> return FWTS_SKIP;
> + } else {
> + ACPI_BUFFER buffer;
> + char full_name[128];
> +
> + buffer.Length = sizeof(full_name);
> + buffer.Pointer = full_name;
> +
> + status = AcpiGetName(device, ACPI_FULL_PATHNAME, &buffer);
> + if (ACPI_SUCCESS(status)) {
> + fwts_log_info_verbatim(fw, "ACPI AC Adapter Device: %s", full_name);
> + fwts_log_nl(fw);
> + }
> }
>
> return FWTS_OK;
>
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list