From patchwork Fri Jun 28 14:08:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1124267 X-Patchwork-Delegate: sjg@chromium.org 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.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="JTpPGbiN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45ZzJC2WWDz9s3Z for ; Sat, 29 Jun 2019 00:13:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 85E76C21C2F; Fri, 28 Jun 2019 14:12:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 073F2C21DEC; Fri, 28 Jun 2019 14:10:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 63BB8C21D65; Fri, 28 Jun 2019 14:09:52 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id EC575C21E13 for ; Fri, 28 Jun 2019 14:09:46 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id i10so12690721iol.13 for ; Fri, 28 Jun 2019 07:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pPUk0Em9Iqi+dAgVgT483udwPbh/3bHqIE74Q5D9xr4=; b=JTpPGbiNj8yBBjtbOOgYwjw5cOBCpzWRDm0x8rWJZfgCvRHaxKc759ZWCxzxt50KGc LnBzIJb5TjcvUxpJN8BraV0gFImHrOKhIz/rLB6BGJGhZiPOnDKq6WKPEVvSSeEkohNz 1kiCKkRot5iktOM6ZP7eZnsI4HkGKOESVEwa0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pPUk0Em9Iqi+dAgVgT483udwPbh/3bHqIE74Q5D9xr4=; b=hlknteRHGhCopXrDqbUt6cE3RfNbK4TzkPo/BybOD0mFAbJbZKmu6RYhn4odPiTzq9 7pW/OcoXsgwivVimQ7GVuAIJrmKHuJF7k1nJp1qaQJALGToKqGmgM/6vm74vxoHMVh6e ykkXsE52k7ItoGT2trr4Yv871FD0O++uF6QfMgTIm/s36ROhddNcd1own2e6+J+Gs/1g JEskajEvrBSyxNoU++uQ4A3CwPYuK3/2ZOJc4rXfKkgKZuPiLj6kYYy9f/wvkCq2QRpO DlFS/2M4+l+8Bv0mP0LF+qZ2k3jVkbfidnyABO67GW2vh8R0FPxb16DRbVXkd6fCC+yX H7DA== X-Gm-Message-State: APjAAAVG2h1mANumlt3JqTccBI76g7CwKmdM3aoH0JAJ6NerGivby/p2 a0crKYryKrLLTIOHPqe2yMfYxH+PbyA= X-Google-Smtp-Source: APXvYqz9lLQoqyDQ9CA/E23FUfRIwAELw5usWkIdXUUtWiqtQ3GZb2LnngEXwEYLmz74guvvFzXErg== X-Received: by 2002:a6b:fb0f:: with SMTP id h15mr11486262iog.266.1561730985855; Fri, 28 Jun 2019 07:09:45 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id e26sm2839157iod.10.2019.06.28.07.09.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 07:09:45 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Fri, 28 Jun 2019 08:08:45 -0600 Message-Id: <20190628140919.145948-4-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog In-Reply-To: <20190628140919.145948-1-sjg@chromium.org> References: <20190628140919.145948-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Stefan Reinauer Subject: [U-Boot] [PATCH 03/37] cbfs: Rename checksum to attributes_offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" It seems that this field has been renamed in later version of coreboot. Update it. Signed-off-by: Simon Glass --- fs/cbfs/cbfs.c | 4 ++-- include/cbfs.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c index 7b2513cb24b..af4d3c5e564 100644 --- a/fs/cbfs/cbfs.c +++ b/fs/cbfs/cbfs.c @@ -55,7 +55,7 @@ static void swap_file_header(struct cbfs_fileheader *dest, memcpy(&dest->magic, &src->magic, sizeof(dest->magic)); dest->len = be32_to_cpu(src->len); dest->type = be32_to_cpu(src->type); - dest->checksum = be32_to_cpu(src->checksum); + dest->attributes_offset = be32_to_cpu(src->attributes_offset); dest->offset = be32_to_cpu(src->offset); } @@ -108,7 +108,7 @@ static int file_cbfs_next_file(u8 *start, u32 size, u32 align, newNode->name = (char *)fileHeader + sizeof(struct cbfs_fileheader); newNode->name_length = name_len; - newNode->checksum = header.checksum; + newNode->attributes_offset = header.attributes_offset; step = header.len; if (step % align) diff --git a/include/cbfs.h b/include/cbfs.h index f2ede25f517..b8d1dabbf63 100644 --- a/include/cbfs.h +++ b/include/cbfs.h @@ -65,7 +65,8 @@ struct cbfs_fileheader { u8 magic[8]; u32 len; u32 type; - u32 checksum; + /* offset to struct cbfs_file_attribute or 0 */ + u32 attributes_offset; u32 offset; } __packed; @@ -76,7 +77,7 @@ struct cbfs_cachenode { u32 data_length; char *name; u32 name_length; - u32 checksum; + u32 attributes_offset; } __packed; extern enum cbfs_result file_cbfs_result;