From patchwork Sun May 27 15:49:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 921165 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40v4Dj14GFz9s1d for ; Mon, 28 May 2018 01:49:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D4FD4C21E0F; Sun, 27 May 2018 15:49:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A7755C21C2F; Sun, 27 May 2018 15:49:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 808A9C21C27; Sun, 27 May 2018 15:49:32 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id D6B53C21BE5 for ; Sun, 27 May 2018 15:49:31 +0000 (UTC) Received: from LPT2.fritz.box ([95.223.128.184]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LrrRi-1gKkaP0IyU-013eUo; Sun, 27 May 2018 17:49:27 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Sun, 27 May 2018 17:49:17 +0200 Message-Id: <20180527154920.10959-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.17.0 X-Prov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7xs= Cc: Heinrich Schuchardt , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 0/3] efi_loader: allow writing to FAT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Running the UEFI Self-Certifcation Test (SCT) will require to support writing to a FAT file system. Writing to the FAT root directory from EFI fails because the leading slash of the file path is interpreted as part of the filename. With the 1st patch we can write to the root directory. A unit test for writing a new file to the FAT root directory is supplied. v2 Avoid use after free due to calline root->close(root) too often. Use ISDIRDELIM() to identify (back-)slashes. Heinrich Schuchardt (3): fs: fat: cannot write to subdirectories efi_selftest: imply FAT, FAT_WRITE efi_selftest: test writing to file fs/fat/fat_write.c | 16 ++++- lib/efi_selftest/Kconfig | 2 + lib/efi_selftest/efi_selftest_block_device.c | 66 ++++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-)