ACK: [PATCH] acpi: devices: print device name in acpi_ac test

ivanhu ivan.hu at canonical.com
Wed Oct 11 09:57:46 UTC 2017



On 10/05/2017 08:55 AM, 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: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list