[PATCH 2/6] efi: fs: fix determination of read-only files
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Aug 14 02:24:20 PDT 2024
The negation was erroneously applied to only the left-hand argument
falsifying the result. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
fs/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/efi.c b/fs/efi.c
index 11073e9961c4..cb0eb40da4c2 100644
--- a/fs/efi.c
+++ b/fs/efi.c
@@ -360,7 +360,7 @@ static int efifs_stat(struct device *dev, const char *filename,
s->st_size = info->FileSize;
s->st_mode = 00555;
- if (!info->Attribute & EFI_FILE_READ_ONLY)
+ if (!(info->Attribute & EFI_FILE_READ_ONLY))
s->st_mode |= 00222;
if (info->Attribute & EFI_FILE_DIRECTORY)
--
2.39.2
More information about the barebox
mailing list