From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dUW1P-0005w6-JY for barebox@lists.infradead.org; Mon, 10 Jul 2017 10:34:35 +0000 From: Steffen Trumtrar Date: Mon, 10 Jul 2017 12:33:49 +0200 Message-Id: <20170710103355.15652-3-s.trumtrar@pengutronix.de> In-Reply-To: <20170710103355.15652-1-s.trumtrar@pengutronix.de> References: <20170710103355.15652-1-s.trumtrar@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 3/9] fs: efi: return with correct error code in efifs_stat To: barebox@lists.infradead.org Cc: Steffen Trumtrar Instead of erroring out when a file is not present, just return ENOENT if the file does not exist and let the fs-layer handle the situation correctly. Signed-off-by: Steffen Trumtrar --- fs/efi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/efi.c b/fs/efi.c index 0c0f52e87c47..85ff914291ed 100644 --- a/fs/efi.c +++ b/fs/efi.c @@ -407,9 +407,7 @@ static int efifs_stat(struct device_d *dev, const char *filename, struct stat *s efiret = priv->root_dir->open(priv->root_dir, &entry, efi_path, EFI_FILE_MODE_READ, 0ULL); if (EFI_ERROR(efiret)) { - pr_err("%s: unable to Open %s: %s\n", __func__, filename, - efi_strerror(efiret)); - ret = -efi_errno(efiret); + ret = -ENOENT; goto out_free; } -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox