[PATCH v2 3/9] fs: efi: return with correct error code in efifs_stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <s.trumtrar@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux