From mboxrd@z Thu Jan 1 00:00:00 1970 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 373AEEB64DC for ; Mon, 3 Jul 2023 13:41:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A77186769; Mon, 3 Jul 2023 15:40:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="n+uW8Zzd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65FEA86774; Mon, 3 Jul 2023 15:40:27 +0200 (CEST) Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 E3F18866DA for ; Mon, 3 Jul 2023 15:40:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jpewhacker@gmail.com Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6b71eef1bc0so3433894a34.2 for ; Mon, 03 Jul 2023 06:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688391623; x=1690983623; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gqfKpu2+Gxb2LkwooVes4uAnsxiTiqlZf/wFv2h46s4=; b=n+uW8ZzdIinVV7iLi9L6PD+k4vIFqWEOewx+YYzAmLnj80RpuV/pNFd8gLwLcP8WgP c53r98YSfIbAWIc8iNL3j+Z+Lgt+vPK6xSROW+IkQHUr1AAwIpXd0dTmQM7ElSBpuZjl Ln5rECzfsrYykBYaEiYmuu8jLucX0XRbWsffuJ95Y0DlQBlh1htSBKU0lMpe66InJAVB 7USuJyJjX34uM7qohHchtHdaF4kqLwqi37ehqV2YaeMLA5un4CK6kJVfVeXzaGdw4mje VLNX4Jl4ppOXehUQPwxLV0Pyhq/TGw2FvKqVmk1CqWnRJleok885SS9oU+XCbGM7BFqT eVZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688391623; x=1690983623; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gqfKpu2+Gxb2LkwooVes4uAnsxiTiqlZf/wFv2h46s4=; b=DjZrYPbpdkF6S0F+p86+DX5pUsjE7u0SLGd3sMFuvvXMuTJJUVvLWKgvqOPE2HoIwF fVFqowWHXjoN7ns3L9QJa+uOn7Ok2TpsPRZJcb6heXYhLMPP47dTvtBrZTZp66/IbFfi l5qxZmXQ9aWd4v0ratZqNbFWSkOFaeV0iAPz6dwQvAZ0itURkb8ZE6U5HjDWGSLoKwwM 56xpEhj6gIIw48q3y0PVe46lU/VFAjyQEDzBi38bHmRjSy8aHOJjI4qEICwTyAmIrtqy 3URRJmOx5FXfMYwjQ0GtxkKMSXlaRSJoPXYHmfXwyMD0+/wqusuO4xyhLdaaeRJpBWAr 4CHQ== X-Gm-Message-State: AC+VfDxWsc+Lf75vBlGDPVVkR6QQNm0mUBltWsIEjoWJMBEFG6/ptv2i xTKNnJ79rnwDzPxAf05u7Z0bGCMhuIk= X-Google-Smtp-Source: ACHHUZ76Zw6PVJgSbid3nKkJr9B7cqnPdaSb/h3/yWFkziZRHUcWyxuG2Zqb2mzxHKsKYzYHp0lGdg== X-Received: by 2002:a9d:4d13:0:b0:6b3:d369:9c0a with SMTP id n19-20020a9d4d13000000b006b3d3699c0amr9030470otf.19.1688391622917; Mon, 03 Jul 2023 06:40:22 -0700 (PDT) Received: from localhost.localdomain ([204.77.163.107]) by smtp.gmail.com with ESMTPSA id j2-20020a9d7382000000b006b8cf55a997sm535720otk.28.2023.07.03.06.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 06:40:22 -0700 (PDT) From: Joshua Watt X-Google-Original-From: Joshua Watt To: u-boot@lists.denx.de Cc: Joshua Watt Subject: [PATCH v2 5/5] cmd: mbr: Force DOS driver to be used for verify Date: Mon, 3 Jul 2023 08:39:56 -0500 Message-Id: <20230703133959.3880305-6-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230703133959.3880305-1-JPEWhacker@gmail.com> References: <20230623200031.2689749-1-JPEWhacker@gmail.com> <20230703133959.3880305-1-JPEWhacker@gmail.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Forces the DOS partition type driver to be used when verifying the MBR. This is particularly useful when using a hybrid MBR & GPT layout as otherwise MBR verification would mostly likely fail since the GPT partitions will be returned, even if the MBR is actually valid. Signed-off-by: Joshua Watt --- cmd/mbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mbr.c b/cmd/mbr.c index c269833eb8..ec99b66283 100644 --- a/cmd/mbr.c +++ b/cmd/mbr.c @@ -244,7 +244,7 @@ static int do_verify_mbr(struct blk_desc *dev, const char *str) for (i = 0; i < count; i++) { struct disk_partition p; - if (part_get_info(dev, i + 1, &p)) + if (part_get_info_by_type(dev, i + 1, PART_TYPE_DOS, &p)) goto fail; if ((partitions[i].size && p.size != partitions[i].size) || -- 2.33.0