From patchwork Wed Sep 6 09:34:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 810463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3xnJLk3J61z9s82; Wed, 6 Sep 2017 19:34:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1dpWii-00084F-Ph; Wed, 06 Sep 2017 09:34:04 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1dpWii-000849-9G for fwts-devel@lists.ubuntu.com; Wed, 06 Sep 2017 09:34:04 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dpWih-0006as-Vw; Wed, 06 Sep 2017 09:34:04 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] lib: fwts_log: make magic uint64_t to improve corruption checking Date: Wed, 6 Sep 2017 10:34:03 +0100 Message-Id: <20170906093403.23835-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King Make the magic field 64 bits to ensure we have more magic bits to check on for structure corruption checking. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/lib/include/fwts_log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h index 028ba36c..da8cb42b 100644 --- a/src/lib/include/fwts_log.h +++ b/src/lib/include/fwts_log.h @@ -26,7 +26,7 @@ #include "fwts_framework.h" #include "fwts_list.h" -#define LOG_MAGIC (0xfe23ab13) +#define LOG_MAGIC (0xfe23ab13cb1ef754ULL) #define LOG_MAX_BUF_SIZE (4096) /* Max output per log line */ typedef enum { @@ -87,7 +87,7 @@ typedef enum { * top level log descriptor */ typedef struct log_t { - unsigned int magic; /* magic ID of the log */ + uint64_t magic; /* magic ID of the log */ fwts_list log_files; /* list of fwts_log_file */ char *owner; /* who is writing to this log */ } fwts_log;