[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <158749424225.28353.14361954844386828181.tip-bot2@tip-bot2>
Date: Tue, 21 Apr 2020 18:37:22 -0000
From: "tip-bot2 for Dmitry Safonov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Andrei Vagin <avagin@...nvz.org>, Dmitry Safonov <dima@...sta.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: x86/vdso] x86/vdso/vdso2c: Correct error messages on file open
The following commit has been merged into the x86/vdso branch of tip:
Commit-ID: 089ef5579fc1b0b748bfb1600b4392f42db6fd5f
Gitweb: https://git.kernel.org/tip/089ef5579fc1b0b748bfb1600b4392f42db6fd5f
Author: Dmitry Safonov <dima@...sta.com>
AuthorDate: Mon, 20 Apr 2020 19:32:53 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 21 Apr 2020 20:33:16 +02:00
x86/vdso/vdso2c: Correct error messages on file open
err() message in main() is misleading: it should print `outfilename`,
which is argv[3], not argv[2].
Correct error messages to be more precise about what failed and for
which file.
Co-developed-by: Andrei Vagin <avagin@...nvz.org>
Signed-off-by: Andrei Vagin <avagin@...nvz.org>
Signed-off-by: Dmitry Safonov <dima@...sta.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Andy Lutomirski <luto@...nel.org>
Link: https://lkml.kernel.org/r/20200420183256.660371-2-dima@arista.com
---
arch/x86/entry/vdso/vdso2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.c b/arch/x86/entry/vdso/vdso2c.c
index 3842873..7380908 100644
--- a/arch/x86/entry/vdso/vdso2c.c
+++ b/arch/x86/entry/vdso/vdso2c.c
@@ -187,7 +187,7 @@ static void map_input(const char *name, void **addr, size_t *len, int prot)
int fd = open(name, O_RDONLY);
if (fd == -1)
- err(1, "%s", name);
+ err(1, "open(%s)", name);
tmp_len = lseek(fd, 0, SEEK_END);
if (tmp_len == (off_t)-1)
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
outfilename = argv[3];
outfile = fopen(outfilename, "w");
if (!outfile)
- err(1, "%s", argv[2]);
+ err(1, "fopen(%s)", outfilename);
go(raw_addr, raw_len, stripped_addr, stripped_len, outfile, name);
Powered by blists - more mailing lists