From: Maninder Singh <maninder1.s@samsung.com>
To: ard.biesheuvel@linaro.org, catalin.marinas@arm.com, bp@suse.de,
deller@gmx.de, will.deacon@arm.com, tony.luck@intel.com
Cc: linux-kernel@vger.kernel.org, ajeet.y@samsung.com,
pankaj.m@samsung.com, Maninder Singh <maninder1.s@samsung.com>,
Vaneet Narang <v.narang@samsung.com>
Subject: [PATCH 2/2] scripts/sortextable: set the variable mmap_failure
Date: Thu, 11 Aug 2016 09:52:55 +0530 [thread overview]
Message-ID: <1470889375-15079-1-git-send-email-maninder1.s@samsung.com> (raw)
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
next reply other threads:[~2016-08-11 4:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 4:22 Maninder Singh [this message]
2016-08-11 7:08 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470889375-15079-1-git-send-email-maninder1.s@samsung.com \
--to=maninder1.s@samsung.com \
--cc=ajeet.y@samsung.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bp@suse.de \
--cc=catalin.marinas@arm.com \
--cc=deller@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.m@samsung.com \
--cc=tony.luck@intel.com \
--cc=v.narang@samsung.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®