From patchwork Wed Jan 27 20:19:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 1432335 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=boundarydevices.com header.i=@boundarydevices.com header.a=rsa-sha256 header.s=google header.b=EIo0udxd; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DQw266zNbz9sCD for ; Thu, 28 Jan 2021 07:19:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1201782760; Wed, 27 Jan 2021 21:19:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com 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=boundarydevices.com header.i=@boundarydevices.com header.b="EIo0udxd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 772EC82748; Wed, 27 Jan 2021 21:19:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 2198C82748 for ; Wed, 27 Jan 2021 21:19:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=gary.bisson@boundarydevices.com Received: by mail-wm1-x332.google.com with SMTP id o10so3986225wmc.1 for ; Wed, 27 Jan 2021 12:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CWz0QRVDZ5YvBwZId27IjMh7pRmB3/8ZBDXqWuCEqTI=; b=EIo0udxdvLxxyrB7EHX4tkVO8FpXgjOLumdEmLB7ynff6xlRFVc8Iwt2h3wCtM2MT1 muIKnnVVGqlDinJp2Zf/WMHRtn4BXwslpIF1iWOQhXMX+xGzItNFUYherznfrIs5Y6+o 9EotgQ0c8ONC5rdjpqjZZvyTy3KSXRpdPngDs= 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:mime-version :content-transfer-encoding; bh=CWz0QRVDZ5YvBwZId27IjMh7pRmB3/8ZBDXqWuCEqTI=; b=XlCnXnAPuEKFap3Fw3SNj0rltffsnb5VpqUTjyS00fEHyhKJChXguGisL6BJb2eFRl E8MPAwiubZTyNt03bn5Yz81Nn/ervWQy+VsnfWagvLeXJaAdz9CDXhOym8PzDf1mnrSz 0sXF4xbnJDuXC86hzeFD8YIR+XPfPy2ChW2RoV+2b7cQvJutYj+t+bbSTktwggyLMzoC YWRLT4vLV3xewyudcr7YoJhJ2r/Akv2rJ0Y2HJh4uy2/f4VF3TWuK41WAodlci6N4j2+ ZFgPdAGGKL1vhWXbX34vKz2c3a+sm/0CfojZEivKL36780CNRuFRgQMoZwbuca+FljXF QABA== X-Gm-Message-State: AOAM533UOWxbg1Vt4qgFQcZxts8sRmEAMMWgQNY/pcuTGqcUEtagzcBX OZxgC/W2hvbfh+oYWMkS9iK2+RHuL1ghSes7 X-Google-Smtp-Source: ABdhPJwIoLbuI2jHDZeaoKxl2563qUC0oAM3lOhmb3OJlTb0UL6tsrBAstcryrQ306vZ9eIVYmruvQ== X-Received: by 2002:a1c:df88:: with SMTP id w130mr5635787wmg.164.1611778787258; Wed, 27 Jan 2021 12:19:47 -0800 (PST) Received: from t450s.home (2a01cb000f9f0e00de001a392b70d6bd.ipv6.abo.wanadoo.fr. [2a01:cb00:f9f:e00:de00:1a39:2b70:d6bd]) by smtp.gmail.com with ESMTPSA id q16sm9911530wme.1.2021.01.27.12.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 12:19:46 -0800 (PST) From: Gary Bisson To: u-boot@lists.denx.de Cc: xypron.glpk@gmx.de, sjg@chromium.org, m.szyprowski@samsung.com, Gary Bisson Subject: [PATCH] disk: part_dos: update partition table entries after write Date: Wed, 27 Jan 2021 21:19:44 +0100 Message-Id: <20210127201944.9098-1-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Fixes issues when switching from GPT to MBR partition tables. Signed-off-by: Gary Bisson --- Hi, Sending this patch as a follow-up to the other one [1] doing the same thing for GPT write. Let me know if you have any questions. Regards, Gary [1] https://lists.denx.de/pipermail/u-boot/2021-January/438764.html --- disk/part_dos.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/disk/part_dos.c b/disk/part_dos.c index f431925745..470886f4bb 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -499,6 +499,9 @@ int write_mbr_sector(struct blk_desc *dev_desc, void *buf) return 1; } + /* Update the partition table entries*/ + part_init(dev_desc); + return 0; }