From patchwork Wed Jul 27 13:17:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Scheel X-Patchwork-Id: 653307 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rzwXp627Wz9t29 for ; Wed, 27 Jul 2016 23:18:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E236DA7762; Wed, 27 Jul 2016 15:18:12 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2c3GLKrTj2zp; Wed, 27 Jul 2016 15:18:12 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 43AE1A76BA; Wed, 27 Jul 2016 15:18:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4AE78A752D for ; Wed, 27 Jul 2016 15:18:01 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LC1zTm67BWLB for ; Wed, 27 Jul 2016 15:18:01 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from web01.jusst.de (jusst.de [188.40.114.84]) by theia.denx.de (Postfix) with ESMTPS id 1FE62A7613 for ; Wed, 27 Jul 2016 15:17:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by web01.jusst.de (Postfix) with ESMTP id CB09A1B0228A; Wed, 27 Jul 2016 15:17:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at web01.jusst.de Received: from web01.jusst.de ([127.0.0.1]) by localhost (web01.jusst.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BVkfyP2Z6lvp; Wed, 27 Jul 2016 15:17:56 +0200 (CEST) Received: from avionic-0108.net.jusst.de (unknown [87.138.236.184]) (Authenticated sender: julian@jusst.de) by web01.jusst.de (Postfix) with ESMTPSA id 34C111B02289; Wed, 27 Jul 2016 15:17:56 +0200 (CEST) From: Julian Scheel To: u-boot@lists.denx.de, michael@amarulasolutions.com, kever.yang@rock-chips.com, sjg@chromium.org, trini@konsulko.com Date: Wed, 27 Jul 2016 15:17:51 +0200 Message-Id: <20160727131751.4608-3-julian@jusst.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160727131751.4608-1-julian@jusst.de> References: <20160727131751.4608-1-julian@jusst.de> Subject: [U-Boot] [PATCH 2/2] disk: part_efi: Omit size on verify for partitions without size X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If a partition was specified to fill the available space using size "-" a verification is not possible as there is no sane reference value to compare against. In this case simply skip the check to avoid printing a meaningless error. Signed-off-by: Julian Scheel --- disk/part_efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index 0af1e92..bb23c2a 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -654,7 +654,8 @@ int gpt_verify_partitions(struct blk_desc *dev_desc, (unsigned long long)gpt_part_size, (unsigned long long)partitions[i].size); - if (le64_to_cpu(gpt_part_size) != partitions[i].size) { + if (partitions[i].size && + le64_to_cpu(gpt_part_size) != partitions[i].size) { error("Partition %s size: %llu does not match %llu!\n", efi_str, (unsigned long long)gpt_part_size, (unsigned long long)partitions[i].size);