[PATCH 2/6] efi: fs: fix determination of read-only files

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

 



The negation was erroneously applied to only the left-hand argument
falsifying the result. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 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





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

  Powered by Linux