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 69A7CEB64DC for ; Sat, 24 Jun 2023 22:03:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8EB5B85DB6; Sun, 25 Jun 2023 00:03:08 +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="lg56faUm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B2A1285DEA; Sun, 25 Jun 2023 00:03:06 +0200 (CEST) Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) (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 9A06385C5A for ; Sun, 25 Jun 2023 00:03:02 +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-oa1-x31.google.com with SMTP id 586e51a60fabf-1ad4d784100so1879218fac.0 for ; Sat, 24 Jun 2023 15:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687644181; x=1690236181; 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=lg56faUmaGQcTxIwqSgx0d2dIUVHwPjd9lOgovT9sQ1qafzyq1uXJY9QCHSyykdIft J5xWnlqkG69fRbQm5TPvRGUgL7sdGcK5df6gt8lFRoM9DEmNT/F1uhycHIqdoDm8URsw hdCwgCFZfMe8GQbGwHQW/7F5tNxTLQltoXTqnF3rOQKvK7Jyzv1TwRRigKH5lyfig+mu 4NGf+D/eXvVTArF/GcbIHqMiFAK6DKHQ6ZzyJompgUh1ddqTvNefucPbPCycaF5LPw5x MQDMwDBuQdll4SKCkHEXNJ0nkTnnRREYMfcAx/sEVBkav6e4054oAoDEXRIWBFD3F7Ni tw9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687644181; x=1690236181; 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=TRHjzn072Am9Xw6q36AaPAiPGmhf8y05RCEhWcYueHCs9qPS6OXp+SR0LlK4ZAioee jEfir9SMQdp7qAggU9O32z6YXLyLyERDOrZLkSYe70YRrupEJxggbPU6RyX3f509AmdL 56QenqwFJpr1x1BMqIQRQgLR1kh0WN3KH9U7kTPMPTqUhwczYdBUB6C8Bw5kH0lXvldH h9qQKdKqx9lpeeorySiz1YaemuNPxzoQ4lmh3R7xCm4fewJN3jJ6MS1JIRyu/exKBogP 5lLHBdULX9wj+9BKPPmTlbxKfL+OVAWBuAN/mSIYdZds/TRP6rd6PcY7vJCeHQ0txHwI pixQ== X-Gm-Message-State: AC+VfDy7X5VN81C2YVrBgcrjKQWWlVVm+qSunX3DFezDFqgsLAzEE0ws SHLp7PPTmc/yTuUGOWMHMzlBCXFA174= X-Google-Smtp-Source: ACHHUZ4MO6WEJcX309t65BHL9f95pwucg8Tb/dr6xZgBpaBAeyLyvF/IzTRwAU3cgQBMLKthT5DmZQ== X-Received: by 2002:a9d:7490:0:b0:6b5:8aaf:1347 with SMTP id t16-20020a9d7490000000b006b58aaf1347mr16729127otk.23.1687550471528; Fri, 23 Jun 2023 13:01:11 -0700 (PDT) Received: from localhost.localdomain ([204.77.163.107]) by smtp.gmail.com with ESMTPSA id c13-20020a9d6c8d000000b006b5d7fd66f7sm146132otr.26.2023.06.23.13.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 13:01:10 -0700 (PDT) From: Joshua Watt X-Google-Original-From: Joshua Watt To: u-boot@lists.denx.de Cc: Joshua Watt Subject: [PATCH 2/2] cmd: mbr: Force DOS driver to be used for verify Date: Fri, 23 Jun 2023 15:00:00 -0500 Message-Id: <20230623200031.2689749-3-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230623200031.2689749-1-JPEWhacker@gmail.com> References: <20230623200031.2689749-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