ACK: [PATCH] acpi: acpiinfo: Print minor version where applicable
Alex Hung
alex.hung at canonical.com
Thu Mar 2 02:12:34 UTC 2017
On 2017-03-02 08:13 AM, Jeffrey Hugo wrote:
> The acpiinfo test does not read the minor version when possible, which
> causes platform supporting say ACPI v6.1 to display as only supporting
> ACPI v6.0. Modify the test to read the minor version and print it.
>
> Signed-off-by: Jeffrey Hugo <jhugo at codeaurora.org>
> ---
> src/acpi/acpiinfo/acpiinfo.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c
> index 6a8428f..9b7a631 100644
> --- a/src/acpi/acpiinfo/acpiinfo.c
> +++ b/src/acpi/acpiinfo/acpiinfo.c
> @@ -101,7 +101,9 @@ static int acpiinfo_test1(fwts_framework *fw)
> static int acpiinfo_test2(fwts_framework *fw)
> {
> fwts_acpi_table_info *table;
> - fwts_acpi_table_header *header;
> + fwts_acpi_table_fadt *fadt;
> + uint8_t major;
> + uint8_t minor = 0;
>
> if (fwts_acpi_find_table(fw, "FACP", 0, &table) != FWTS_OK)
> return FWTS_ERROR;
> @@ -109,10 +111,14 @@ static int acpiinfo_test2(fwts_framework *fw)
> if (table == NULL || table->data == NULL)
> return FWTS_ERROR;
>
> - header = (fwts_acpi_table_header *)table->data;
> + fadt = (fwts_acpi_table_fadt *)table->data;
> +
> + major = fadt->header.revision;
> + if (major >= 5 && fadt->header.length >= 268)
> + minor = fadt->minor_version;
>
> fwts_log_info(fw,
> - "FACP ACPI Version: %d.0\n", header->revision);
> + "FACP ACPI Version: %d.%d\n", major, minor);
>
> fwts_infoonly(fw);
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list