Message ID | 20180911065922.19141-21-takahiro.akashi@linaro.org |
---|---|
State | Accepted |
Commit | d39f6a617ca201517e320b38d609017f1183c572 |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VGziMP1c"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 428bh70JtFz9s55 for <incoming@patchwork.ozlabs.org>; Tue, 11 Sep 2018 17:12:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 819D7C21E50; Tue, 11 Sep 2018 07:09:09 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 0D2ACC21F07; Tue, 11 Sep 2018 07:01:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3535FC21F29; Tue, 11 Sep 2018 07:00:24 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by lists.denx.de (Postfix) with ESMTPS id BBEA2C21F04 for <u-boot@lists.denx.de>; Tue, 11 Sep 2018 07:00:19 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id i26-v6so11729451pfo.12 for <u-boot@lists.denx.de>; Tue, 11 Sep 2018 00:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nkHlKBHNcO4mG7XfvMpL+bqf1m84GCvR1iwc8zgfMcs=; b=VGziMP1cnVGcOlvzgUYqVHPV0hI+Hmbc1G4VkbrxTIuCWXm7tpSt+woSVq25CxqpEG l1u9S/5pFBRvCvXywlK0VFmkQpcLMsDb6CzgVsr4uxlm8e+Jsmjgc7ebYoVDNZu5flnt h4pE/rAyJqoHKJzf6dMW0ug2Zl2MILhMHY4fM= 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:in-reply-to :references; bh=nkHlKBHNcO4mG7XfvMpL+bqf1m84GCvR1iwc8zgfMcs=; b=Zpxn4UNzR1bwp2qgeQ+QwR1/zuA+cGkpVsGJA2sdMqlRbbRx1ltlO4P4AQlQ5+0wcz BmbII8xAEET7Q3LpGub6nEaF3nzeJUUfZgY93TXhPces0p9ivOdpOepdxJI3hZTRzLYv qaQK8acbg8QDVGZspcAfk0OyQk0EcGgiFu+bFdKS2Ciu25AKKEcoy3yToVY7hrFI3SNe XSo524XBWwtq2i3Pw2ZVwvGFU3qGDrA36hXwDf0/DP6vrE4l/H8/tcS9me4+TIdtwLtn XA2SoPz0587JydmsaV0f2btgzArVjF4OwyOWL+QEii9qx+m8DAlQpdCC+fQDCB89YQWi mqdg== X-Gm-Message-State: APzg51AQJ5XhnVdtAfveOb+VQ12RFUrEIXkUx3uefBLCUICfY3gKxUyi RirJ4YHnSj2EwWvefSn1Aq2lnw== X-Google-Smtp-Source: ANB0Vda7YmHjSq7dVc0K+xzjI92TsajSpwqVm1SU3TfLqf94MhTaZ0Zo3Alyy5olEiwfmNehkY+M9w== X-Received: by 2002:a63:4425:: with SMTP id r37-v6mr26535263pga.391.1536649218429; Tue, 11 Sep 2018 00:00:18 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id m27-v6sm24363668pff.152.2018.09.11.00.00.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 00:00:17 -0700 (PDT) From: "Akashi, Takahiro" <takahiro.akashi@linaro.org> To: trini@konsulko.com Date: Tue, 11 Sep 2018 15:59:16 +0900 Message-Id: <20180911065922.19141-21-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180911065922.19141-1-takahiro.akashi@linaro.org> References: <20180911065922.19141-1-takahiro.akashi@linaro.org> Cc: u-boot@lists.denx.de, xypron.glpk@gmx.de, agraf@suse.de Subject: [U-Boot] [PATCH v3 20/26] efi_loader: implement a file delete X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
subject: fs: fat: extend FAT write operations
|
expand
|
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 6ec98c80227e..e726bb0eb2d2 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -229,9 +229,21 @@ static efi_status_t EFIAPI efi_file_close(struct efi_file_handle *file) static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file) { struct file_handle *fh = to_fh(file); + efi_status_t ret = EFI_SUCCESS; + EFI_ENTRY("%p", file); + + if (set_blk_dev(fh)) { + ret = EFI_DEVICE_ERROR; + goto error; + } + + if (fs_unlink(fh->path)) + ret = EFI_DEVICE_ERROR; file_close(fh); - return EFI_EXIT(EFI_WARN_DELETE_FAILURE); + +error: + return EFI_EXIT(ret); } static efi_status_t file_read(struct file_handle *fh, u64 *buffer_size,