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 EBE91C433F5 for ; Fri, 22 Apr 2022 15:47:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0C25183D86; Fri, 22 Apr 2022 17:47:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.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=softathome1.onmicrosoft.com header.i=@softathome1.onmicrosoft.com header.b="PjsJjZzx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B719182A3A; Fri, 22 Apr 2022 17:46:57 +0200 (CEST) Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-mr2fra01on0626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e19::626]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 21AC183C54 for ; Fri, 22 Apr 2022 17:46:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=philippe.reynes@softathome.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWrS8hLUZWL7tBDcRG+h654hMzYRzPKVrRcYeNZeZR+nG94JbtKWAjDp3usFT9mGW3WM7ilvR9xXTUpPzfqNxgagHHJmg1rt2BvTb5oHxB0YYcFmuAlSo+KEAUsnXWUp5A6/cPWUMPrtYsljrRVdXJLdDGVcnCDROHhX48q0wylyG5POu1Q5i4aKQVaZSgaTCKAXTMFBC7T2m9xVVBC8mZQNZzms/ibR3Aom3GVWx9Jj1bTFtKnCmTFIYf0fLxwvBVi/fWb1VE1y1zhikBQhx5yJj6gfZn9g1kQ3NWeTgSlfpc6VaMvTQERKjxYsfqHGbk1gmmhJK+eYnjCF2JSR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a2FxGEsW7aFAb4W4tAKPAa+TO/zlZsiWisBFL0TFyHU=; b=Tj+pSyUpzl4R2Nx0Jew5iXS/AG0bs7PaSTIo2Ce3EmNbwC5aNXacRBT+1g7N5yLtYaHq7LHJAAauDbwAZ5UaHwm0furjLgqqhGqW7H/fQTEnzRNTDTsRHnK6V/9VCn4m6+sSzP9OhXkYnA/S5ryBdep+T5yRgxp35CvpRnBj+D+gKf8K/kOCPXM3qa66bpha7aIBf4BgRHs6gtPrAteBmUN/j82Tc1qLoOx+tGlTSKobL3M0vX08qjvKNIh55e/RrtPayPfou2Prjr9UhMHOoTvU4xg0OFNjOLGdjNPxxPy8S+IZQMAhvMYN/A3G7hE6xhoYKoGywxUz1hoDsvx5Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.6.166.170) smtp.rcpttodomain=chromium.org smtp.mailfrom=softathome.com; dmarc=bestguesspass action=none header.from=softathome.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softathome1.onmicrosoft.com; s=selector1-softathome1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a2FxGEsW7aFAb4W4tAKPAa+TO/zlZsiWisBFL0TFyHU=; b=PjsJjZzxkgsWib/ZQhlbQDqcvvQe3ebhjqEBUYDdEWyg77DhRHsZRy5m4I67by5j7fM+t1P0bepOBd47BRRJuqB47RPFO20Oab471Ba9yHjNJJ+cXp1OyHESNGaxJw5Maj0GTZO5Z7BtBRJb/wduqmxrsWjQ3EzAwC8nK0j7h2+TXNbR9NYQmyE0YWlvoVzoJ+scB2On0aT7tv4u9EMqrvcVvJEOxM+W9MCNoeXCwdwAzCWQn3TlHWBdPq/LhJtrqTS2ks+BKpybEY7KZ1oSJ6otpBC4I7VVbbmriISv2TWxL+RmQGqoAHmWpAyiXSRNqLTw9sUnHTU6bVgHkSmZAg== Received: from MR1P264CA0022.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:2f::9) by MR1P264MB1698.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Fri, 22 Apr 2022 15:46:53 +0000 Received: from MR2FRA01FT012.eop-fra01.prod.protection.outlook.com (2603:10a6:501:2f:cafe::b9) by MR1P264CA0022.outlook.office365.com (2603:10a6:501:2f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15 via Frontend Transport; Fri, 22 Apr 2022 15:46:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.6.166.170) smtp.mailfrom=softathome.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=softathome.com; Received-SPF: Pass (protection.outlook.com: domain of softathome.com designates 149.6.166.170 as permitted sender) receiver=protection.outlook.com; client-ip=149.6.166.170; helo=proxy.softathome.com; Received: from proxy.softathome.com (149.6.166.170) by MR2FRA01FT012.mail.protection.outlook.com (10.152.50.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 15:46:53 +0000 Received: from sah1lpt571.softathome.com (unknown [192.168.72.32]) by proxy.softathome.com (Postfix) with ESMTPSA id C865320078; Fri, 22 Apr 2022 17:46:52 +0200 (CEST) From: Philippe Reynes To: sjg@chromium.org Cc: u-boot@lists.denx.de, Philippe Reynes Subject: [PATCH 0/3] gpt: add support to repair gpt Date: Fri, 22 Apr 2022 17:46:47 +0200 Message-Id: <20220422154650.160435-1-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6840783c-6e56-4dd6-e749-08da247752a2 X-MS-TrafficTypeDiagnostic: MR1P264MB1698:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 97zYrboV2iKxN0UkmBz4Z6vWB/ZXW/xFgAOf+sXDQ+R90yvGGN+HalunnehORMSaDFqUFeDdV6UF8XuBzS4ejyUqDoSC+XMF4vclbHxNq5tTrjla43bf/472SXDoElJ3uoWiIQ//QTbsLMZVlzAtbJUju6W16BhUgyukjfp337X08d1LcUC6w5iD1StlIRQcpYF86XXY6l6NW+SSmEqVQZ8lIufeejz5b6ZcZ0GFg/LQTIt2tzCoVW3/byGih5vqdOvR025U7/pgCD5PTheXZOVhK09peZAaLYgRVga4TBurEvqLFT95Ck+r40Kv9rs5pUcaSPNYZZhrcMHJdatPa1c0thNvsNDgWQXUO1LWo8uCO3mANOcou/JlOlaBrgg/Ip96nR2Ap7C8U4mElduEF0T4KfTqXyYtAfCTPTo/M6N0EE306ezNas3se7UYO9/uq5pZsuiIWAuRtuE3vLORAzowsuMgFUiyTdjJFJ8oYxwsHipa6e6ZNe48VHEi+oMpWeigQQwYkuxDEJBcKeaXihBhxa8GWBD3oM0gn8FtO6+vuhRV1pvKGhRaxzUhS88MZc7yKiTpN5ZRmXi03ujJSM3OjSKECdcYzBvlku6k0U1JugpjcTXTXgPxBLnMwqEnA5gHiIIraaVlbuBVmbubHlw6F6Z4GR+zjBR6XxfqphO23mVysbLypII+vueyNpDCXRDd973Oefqhs+FASXelYw== X-Forefront-Antispam-Report: CIP:149.6.166.170; CTRY:FR; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:proxy.softathome.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(186003)(356005)(47076005)(82960400001)(6916009)(6266002)(107886003)(1076003)(70586007)(70206006)(8676002)(426003)(26005)(2616005)(4326008)(8936002)(86362001)(82310400005)(44832011)(4744005)(40460700003)(336012)(5660300002)(83380400001)(81166007)(36860700001)(6966003)(7696005)(36756003)(316002)(6666004)(508600001)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: softathome.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 15:46:53.1681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6840783c-6e56-4dd6-e749-08da247752a2 X-MS-Exchange-CrossTenant-Id: aa10e044-e405-4c10-8353-36b4d0cce511 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=aa10e044-e405-4c10-8353-36b4d0cce511; Ip=[149.6.166.170]; Helo=[proxy.softathome.com] X-MS-Exchange-CrossTenant-AuthSource: MR2FRA01FT012.eop-fra01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB1698 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.5 at phobos.denx.de X-Virus-Status: Clean This serie adds a sub-command repair to command gpt to repair a gpt. It only writes the gpt that is corrupted, and not both gpt. So a powercut in the middle of the sub-command repair should not corrupt the last valid gpt. Philippe Reynes (3): disk: part_efi: add support to repair gpt table cmd: gpt: add subcommand repair test: py: tests: test_gpt.py: add a simple test for the command gpt repair cmd/gpt.c | 16 +++++++- disk/part_efi.c | 86 +++++++++++++++++++++++++++++++++++++++ include/part.h | 10 +++++ test/py/tests/test_gpt.py | 10 +++++ 4 files changed, 121 insertions(+), 1 deletion(-) -- 2.25.1