ACK: [PATCH] acpi: acpidump: provide table provenance (LP: #1284205)

Alex Hung alex.hung at canonical.com
Thu Feb 27 03:41:24 UTC 2014


On 02/25/2014 12:40 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> fwts sometimes has to patch up and generate missing tables when
> loading them from file, so inform the user which tables are
> from file and which ones are from fwts fix-ups.  The default mode
> when from memory is not annotated for the sake of brevity.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/acpidump/acpidump.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index e9dccde..4bcf935 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -2006,8 +2006,20 @@ static int acpidump_test1(fwts_framework *fw)
>  	fwts_infoonly(fw);
>  
>  	for (i = 0; (fwts_acpi_get_table(fw, i, &table) == FWTS_OK) && (table !=NULL); i++) {
> -		fwts_log_info_verbatum(fw, "%s @ %lx (%zd bytes)",
> -			table->name, (unsigned long)table->addr, table->length);
> +		char *provenance;
> +		switch (table->provenance) {
> +		case FWTS_ACPI_TABLE_FROM_FILE:
> +			provenance = " (loaded from file)";
> +			break;
> +		case FWTS_ACPI_TABLE_FROM_FIXUP:
> +			provenance = " (generated by fwts)";
> +			break;
> +		default:
> +			provenance = "";
> +			break;
> +		}
> +		fwts_log_info_verbatum(fw, "%s @ %lx (%zd bytes)%s",
> +			table->name, (unsigned long)table->addr, table->length, provenance);
>  		fwts_log_info_verbatum(fw, "----");
>  		acpidump_table(fw, table);
>  		fwts_log_nl(fw);
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list