Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B660C19F2A for ; Sun, 7 Aug 2022 15:51:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5628F849A0; Sun, 7 Aug 2022 17:48:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ArojRQkV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E04084965; Sun, 7 Aug 2022 17:48:24 +0200 (CEST) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9C84184968 for ; Sun, 7 Aug 2022 17:48:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22c.google.com with SMTP id g187so6008772oia.2 for ; Sun, 07 Aug 2022 08:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=9RMXzHAm3LQvUH6r7xO/bgGBIbdYP7/5uA1BnsVngJQ=; b=ArojRQkVLAWpnQSTuZOIRELjCZpopeJ96aDMY1vVuGMOlsjDr19ozJYD1ybmCWAUZq jzionJeiWZAsxFEexWPsOXEV9mp5sTllTFMyh1uEr1/mdAPxpAxXvhtKakl0hsjBQBVv DHPYLA6NM1mjrWBkEubqoVWC0f4yUXASSjKuI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=9RMXzHAm3LQvUH6r7xO/bgGBIbdYP7/5uA1BnsVngJQ=; b=QYbqpXhCVtbRzZGi4x7ToJWVYteoqfX4ArkOg12vQIx5Apugvq2wG9cs4IhpXY59hY XXLvlxeR8LKZMlTHd78Usp1bkXsSl4MMZ3zihTzZtpQadn9GgQdk4JMazuv1iV3sc1yq 66KvRRhIETHRB7PoX0gmEDwl/RjH9LTyngj7snQeVWG6PqfgiRI7RYkmKd0Yi2/gEOf3 tgCetl0YsR+EuC4ACMe9Gdv3wZnJjAzpQDLlFb2eAlP06DjRAUSFY7SxNS0IMe3k4dqe fT+8DEdXO5PxVKoHsGPSttjlTMvBaEO3mMgGOCRKbs7+1HkNM1OMxW1lXmKHcWsn2+S6 ROrA== X-Gm-Message-State: ACgBeo3cG+xbzG38JdpzpOvXxtSsSgRDJD2svdMfkQxunxgY/oW2fV6l ZwhDdXfH1JlvrMrcb+4kplfSopiIysAMuw== X-Google-Smtp-Source: AA6agR7JhpVPzNlrUC0p58ti/7N2U+kiEFbGaaKG/m/PIeYbJ5gpru03gYc05/y5u4spzkXO6wIVqg== X-Received: by 2002:a05:6808:2013:b0:33a:921b:33e6 with SMTP id q19-20020a056808201300b0033a921b33e6mr6435702oiw.1.1659887286001; Sun, 07 Aug 2022 08:48:06 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id y18-20020a056808131200b0034290c4ed01sm1553412oiv.41.2022.08.07.08.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 08:48:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , Alexander Graf , Ilias Apalodimas Subject: [PATCH 20/23] efi: Correct assumption about if_type Date: Sun, 7 Aug 2022 09:47:05 -0600 Message-Id: <20220807154708.1418967-21-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog In-Reply-To: <20220807154708.1418967-1-sjg@chromium.org> References: <20220807154708.1418967-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean efi_set_blk_dev_to_system_partition() assumes that 0 is an invalid if_type. This is true now but is about to be false. Fix this bug to avoid a test failure. Signed-off-by: Simon Glass --- lib/efi_loader/efi_var_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index 76a2ff9e412..994e66392fb 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -38,7 +38,7 @@ static efi_status_t __maybe_unused efi_set_blk_dev_to_system_partition(void) char part_str[PART_STR_LEN]; int r; - if (!efi_system_partition.if_type) { + if (efi_system_partition.if_type == UCLASS_INVALID) { log_err("No EFI system partition\n"); return EFI_DEVICE_ERROR; } -- 2.37.1.559.g78731f0fdb-goog