Message ID | 1330427263-26803-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Tue, Feb 28, 2012 at 7:07 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/checksum/checksum.c | 33 ++++++++++++++++++++++----------- > 1 files changed, 22 insertions(+), 11 deletions(-) > > diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c > index 5562d46..726f0f1 100644 > --- a/src/acpi/checksum/checksum.c > +++ b/src/acpi/checksum/checksum.c > @@ -33,7 +33,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > > if (table->length < 20) { > fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", > - "RSDP was expected to be at least 20 bytes long, got a shorted size of %d bytes.", > + "RSDP was expected to be at least 20 bytes long, " > + "got a shorted size of %d bytes.", > (int)table->length); > /* Won't test on a short RSDP */ > return; > @@ -43,18 +44,25 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > checksum = fwts_checksum(table->data, 20); > if (checksum != 0) > fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", > - "RSDP has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", > + "RSDP has incorrect checksum, expected 0x%2.2x, " > + "got 0x%2.2x.", > (uint8_t)(rsdp->checksum)-checksum, rsdp->checksum); > else > - fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", rsdp->checksum); > + fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", > + rsdp->checksum); > > - /* Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a zero version number */ > + /* > + * Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a > + * zero version number > + */ > if (rsdp->revision > 0) { > if (table->length < sizeof(fwts_acpi_table_rsdp)) { > fwts_failed(fw, LOG_LEVEL_HIGH, > "ACPITableCheckSumShortRSDP", > - "RSDP was expected to be %d bytes long, got a shorted size of %d bytes.", > - (int)sizeof(fwts_acpi_table_rsdp), (int)table->length); > + "RSDP was expected to be %d bytes long, " > + "got a shorted size of %d bytes.", > + (int)sizeof(fwts_acpi_table_rsdp), > + (int)table->length); > /* Won't test on a short RSDP */ > return; > } > @@ -62,12 +70,13 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > if (checksum != 0) > fwts_failed(fw, LOG_LEVEL_HIGH, > "ACPITableChecksumRSDP", > - "RSDP has incorrect extended checksum, expected 0x%2.2x, got 0x%2.2x.", > + "RSDP has incorrect extended checksum, " > + "expected 0x%2.2x, got 0x%2.2x.", > (uint8_t)(rsdp->extended_checksum-checksum), > rsdp->extended_checksum); > else > - fwts_passed(fw, "Table RSDP has correct extended checksum 0x%x.", rsdp->extended_checksum); > - > + fwts_passed(fw, "Table RSDP has correct extended " > + "checksum 0x%x.", rsdp->extended_checksum); > } > > } > @@ -100,10 +109,12 @@ static int checksum_scan_tables(fwts_framework *fw) > > checksum = fwts_checksum(table->data, table->length); > if (checksum == 0) > - fwts_passed(fw, "Table %s has correct checksum 0x%x.", table->name, hdr->checksum); > + fwts_passed(fw, "Table %s has correct checksum 0x%x.", > + table->name, hdr->checksum); > else { > fwts_failed(fw, LOG_LEVEL_LOW, "ACPITableChecksum", > - "Table %s has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", > + "Table %s has incorrect checksum, " > + "expected 0x%2.2x, got 0x%2.2x.", > table->name, (uint8_t)(hdr->checksum-checksum), hdr->checksum); > } fwts_tag_failed(fw, FWTS_TAG_ACPI_TABLE_CHECKSUM); > } > -- > 1.7.9 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 02/28/2012 07:07 PM, Colin King wrote: > From: Colin Ian King<colin.king@canonical.com> > > Signed-off-by: Colin Ian King<colin.king@canonical.com> > --- > src/acpi/checksum/checksum.c | 33 ++++++++++++++++++++++----------- > 1 files changed, 22 insertions(+), 11 deletions(-) > > diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c > index 5562d46..726f0f1 100644 > --- a/src/acpi/checksum/checksum.c > +++ b/src/acpi/checksum/checksum.c > @@ -33,7 +33,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > > if (table->length< 20) { > fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", > - "RSDP was expected to be at least 20 bytes long, got a shorted size of %d bytes.", > + "RSDP was expected to be at least 20 bytes long, " > + "got a shorted size of %d bytes.", > (int)table->length); > /* Won't test on a short RSDP */ > return; > @@ -43,18 +44,25 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > checksum = fwts_checksum(table->data, 20); > if (checksum != 0) > fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", > - "RSDP has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", > + "RSDP has incorrect checksum, expected 0x%2.2x, " > + "got 0x%2.2x.", > (uint8_t)(rsdp->checksum)-checksum, rsdp->checksum); > else > - fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", rsdp->checksum); > + fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", > + rsdp->checksum); > > - /* Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a zero version number */ > + /* > + * Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a > + * zero version number > + */ > if (rsdp->revision> 0) { > if (table->length< sizeof(fwts_acpi_table_rsdp)) { > fwts_failed(fw, LOG_LEVEL_HIGH, > "ACPITableCheckSumShortRSDP", > - "RSDP was expected to be %d bytes long, got a shorted size of %d bytes.", > - (int)sizeof(fwts_acpi_table_rsdp), (int)table->length); > + "RSDP was expected to be %d bytes long, " > + "got a shorted size of %d bytes.", > + (int)sizeof(fwts_acpi_table_rsdp), > + (int)table->length); > /* Won't test on a short RSDP */ > return; > } > @@ -62,12 +70,13 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) > if (checksum != 0) > fwts_failed(fw, LOG_LEVEL_HIGH, > "ACPITableChecksumRSDP", > - "RSDP has incorrect extended checksum, expected 0x%2.2x, got 0x%2.2x.", > + "RSDP has incorrect extended checksum, " > + "expected 0x%2.2x, got 0x%2.2x.", > (uint8_t)(rsdp->extended_checksum-checksum), > rsdp->extended_checksum); > else > - fwts_passed(fw, "Table RSDP has correct extended checksum 0x%x.", rsdp->extended_checksum); > - > + fwts_passed(fw, "Table RSDP has correct extended " > + "checksum 0x%x.", rsdp->extended_checksum); > } > > } > @@ -100,10 +109,12 @@ static int checksum_scan_tables(fwts_framework *fw) > > checksum = fwts_checksum(table->data, table->length); > if (checksum == 0) > - fwts_passed(fw, "Table %s has correct checksum 0x%x.", table->name, hdr->checksum); > + fwts_passed(fw, "Table %s has correct checksum 0x%x.", > + table->name, hdr->checksum); > else { > fwts_failed(fw, LOG_LEVEL_LOW, "ACPITableChecksum", > - "Table %s has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", > + "Table %s has incorrect checksum, " > + "expected 0x%2.2x, got 0x%2.2x.", > table->name, (uint8_t)(hdr->checksum-checksum), hdr->checksum); > } fwts_tag_failed(fw, FWTS_TAG_ACPI_TABLE_CHECKSUM); > } Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c index 5562d46..726f0f1 100644 --- a/src/acpi/checksum/checksum.c +++ b/src/acpi/checksum/checksum.c @@ -33,7 +33,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) if (table->length < 20) { fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", - "RSDP was expected to be at least 20 bytes long, got a shorted size of %d bytes.", + "RSDP was expected to be at least 20 bytes long, " + "got a shorted size of %d bytes.", (int)table->length); /* Won't test on a short RSDP */ return; @@ -43,18 +44,25 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) checksum = fwts_checksum(table->data, 20); if (checksum != 0) fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", - "RSDP has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", + "RSDP has incorrect checksum, expected 0x%2.2x, " + "got 0x%2.2x.", (uint8_t)(rsdp->checksum)-checksum, rsdp->checksum); else - fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", rsdp->checksum); + fwts_passed(fw, "Table RSDP has correct checksum 0x%x.", + rsdp->checksum); - /* Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a zero version number */ + /* + * Version 2.0 RSP or more. Note ACPI 1.0 is indicated by a + * zero version number + */ if (rsdp->revision > 0) { if (table->length < sizeof(fwts_acpi_table_rsdp)) { fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP", - "RSDP was expected to be %d bytes long, got a shorted size of %d bytes.", - (int)sizeof(fwts_acpi_table_rsdp), (int)table->length); + "RSDP was expected to be %d bytes long, " + "got a shorted size of %d bytes.", + (int)sizeof(fwts_acpi_table_rsdp), + (int)table->length); /* Won't test on a short RSDP */ return; } @@ -62,12 +70,13 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table) if (checksum != 0) fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableChecksumRSDP", - "RSDP has incorrect extended checksum, expected 0x%2.2x, got 0x%2.2x.", + "RSDP has incorrect extended checksum, " + "expected 0x%2.2x, got 0x%2.2x.", (uint8_t)(rsdp->extended_checksum-checksum), rsdp->extended_checksum); else - fwts_passed(fw, "Table RSDP has correct extended checksum 0x%x.", rsdp->extended_checksum); - + fwts_passed(fw, "Table RSDP has correct extended " + "checksum 0x%x.", rsdp->extended_checksum); } } @@ -100,10 +109,12 @@ static int checksum_scan_tables(fwts_framework *fw) checksum = fwts_checksum(table->data, table->length); if (checksum == 0) - fwts_passed(fw, "Table %s has correct checksum 0x%x.", table->name, hdr->checksum); + fwts_passed(fw, "Table %s has correct checksum 0x%x.", + table->name, hdr->checksum); else { fwts_failed(fw, LOG_LEVEL_LOW, "ACPITableChecksum", - "Table %s has incorrect checksum, expected 0x%2.2x, got 0x%2.2x.", + "Table %s has incorrect checksum, " + "expected 0x%2.2x, got 0x%2.2x.", table->name, (uint8_t)(hdr->checksum-checksum), hdr->checksum); } fwts_tag_failed(fw, FWTS_TAG_ACPI_TABLE_CHECKSUM); }