From patchwork Fri Mar 2 09:42:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 144173 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 236CE100827 for ; Fri, 2 Mar 2012 20:42:43 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S3P0c-0005ym-OI for incoming@patchwork.ozlabs.org; Fri, 02 Mar 2012 09:42:42 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S3P0b-0005yb-19 for fwts-devel@lists.ubuntu.com; Fri, 02 Mar 2012 09:42:41 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1S3P0a-0004dj-SA for fwts-devel@lists.ubuntu.com; Fri, 02 Mar 2012 09:42:41 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] bios: bios32: ensure source fits into 80 columns Date: Fri, 2 Mar 2012 09:42:40 +0000 Message-Id: <1330681360-16543-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Alex Hung --- src/bios/bios32/bios32.c | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/bios/bios32/bios32.c b/src/bios/bios32/bios32.c index 5fae0e6..e2f2cd6 100644 --- a/src/bios/bios32/bios32.c +++ b/src/bios/bios32/bios32.c @@ -36,7 +36,9 @@ typedef struct { static int bios32_init(fwts_framework *fw) { if (fw->firmware_type != FWTS_FIRMWARE_BIOS) { - fwts_log_info(fw, "Machine is not using traditional BIOS firmware, skipping test."); + fwts_log_info(fw, + "Machine is not using traditional BIOS firmware, " + "skipping test."); return FWTS_SKIP; } @@ -66,9 +68,12 @@ static int bios32_test1(fwts_framework *fw) (*(mem+i+1) == '3') && (*(mem+i+2) == '2') && (*(mem+i+3) == '_')) { - fwts_bios32_service_directory *bios32 = (fwts_bios32_service_directory*)(mem+i); + fwts_bios32_service_directory *bios32 = + (fwts_bios32_service_directory*)(mem+i); - fwts_log_info(fw, "Found BIOS32 Service Directory at 0x%8.8x", BIOS32_SD_REGION_START+i); + fwts_log_info(fw, + "Found BIOS32 Service Directory at 0x%8.8x", + BIOS32_SD_REGION_START+i); fwts_log_info_verbatum(fw, " Signature : %4.4s", bios32->signature); fwts_log_info_verbatum(fw, " Entry Point: 0x%8.8x", @@ -84,30 +89,40 @@ static int bios32_test1(fwts_framework *fw) if (bios32->entry_point >= 0x100000) { fwts_failed(fw, LOG_LEVEL_HIGH, "BIOS32SrvDirEntryPointHighMem", - "Service Directory Entry Point 0x%8.8x is in high memory and cannot be used by the kernel.", + "Service Directory Entry Point 0x%8.8x " + "is in high memory and cannot be used " + "by the kernel.", bios32->entry_point); fwts_tag_failed(fw, FWTS_TAG_BIOS); } else - fwts_passed(fw, "Service Directory Entry Point 0x%8.8x is not in high memory.", + fwts_passed(fw, "Service Directory Entry Point " + "0x%8.8x is not in high memory.", bios32->entry_point); if (bios32->length != 1) { fwts_failed(fw, LOG_LEVEL_HIGH, "BIOS32SrvDirEntryLength", - "Service Directory Length is 0x%8.8x, expected 1 (1 x 16 bytes).", + "Service Directory Length is 0x%8.8x, " + "expected 1 (1 x 16 bytes).", bios32->length); fwts_tag_failed(fw, FWTS_TAG_BIOS); } else - fwts_passed(fw, "Service Directory Length is 1 (1 x 16 bytes) as expected."); + fwts_passed(fw, + "Service Directory Length is 1 " + "(1 x 16 bytes) as expected."); if (bios32->revision_level != 0) { fwts_failed(fw, LOG_LEVEL_HIGH, "BIOS32SrvDirRevision", - "Service Directory Revision is 0x%2.2x, only version 0 is supported by the kernel.", + "Service Directory Revision is 0x%2.2x," + " only version 0 is supported by the " + "kernel.", bios32->revision_level); fwts_tag_failed(fw, FWTS_TAG_BIOS); } else - fwts_passed(fw, "Service Directory Revision is 0x%2.2x and is supported by the kernel.", + fwts_passed(fw, + "Service Directory Revision is 0x%2.2x " + "and is supported by the kernel.", bios32->revision_level); if (fwts_checksum(mem + i, 16) != 0) { @@ -116,7 +131,8 @@ static int bios32_test1(fwts_framework *fw) "Service Directory checksum failed."); fwts_tag_failed(fw, FWTS_TAG_BIOS); } else - fwts_passed(fw, "Service Directory checksum passed."); + fwts_passed(fw, + "Service Directory checksum passed."); found++; } } @@ -126,8 +142,8 @@ static int bios32_test1(fwts_framework *fw) else if (found > 1) { fwts_failed(fw, LOG_LEVEL_HIGH, "BIOS32MultipleSrvDirInstances", - "Found %d instances of BIOS32 Service Directory, there should only be 1.", - found); + "Found %d instances of BIOS32 Service Directory, " + "there should only be 1.", found); fwts_tag_failed(fw, FWTS_TAG_BIOS); } @@ -147,6 +163,7 @@ static fwts_framework_ops bios32_ops = { .minor_tests = bios32_tests }; -FWTS_REGISTER(bios32, &bios32_ops, FWTS_TEST_ANYTIME, FWTS_BATCH | FWTS_ROOT_PRIV); +FWTS_REGISTER(bios32, &bios32_ops, FWTS_TEST_ANYTIME, + FWTS_BATCH | FWTS_ROOT_PRIV); #endif