mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] scripts/sortextable: set the variable mmap_failure
@ 2016-08-11  4:22 Maninder Singh
  2016-08-11  7:08 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2016-08-11  4:22 UTC (permalink / raw)
  To: ard.biesheuvel, catalin.marinas, bp, deller, will.deacon, tony.luck
  Cc: linux-kernel, ajeet.y, pankaj.m, Maninder Singh, Vaneet Narang

Currently mmap_failed variable is 1 for every case, so make it 0
if mmap is success.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Vaneet Narang <v.narang@samsung.com>
---
 scripts/sortextable.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 30b4e7c..0b6a31b 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -106,6 +106,7 @@ static void *mmap_file(char const *fname)
 	}
 	addr = mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_SHARED,
 		    fd_map, 0);
+	mmap_failed = 0;
 	if (addr == MAP_FAILED) {
 		mmap_failed = 1;
 		fprintf(stderr, "Could not mmap file: %s\n", fname);
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-11  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11  4:22 [PATCH 2/2] scripts/sortextable: set the variable mmap_failure Maninder Singh
2016-08-11  7:08 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®