Commit 089ef557 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Thomas Gleixner

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: default avatarAndrei Vagin <avagin@openvz.org>
Signed-off-by: default avatarAndrei Vagin <avagin@openvz.org>
Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarAndy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20200420183256.660371-2-dima@arista.com
parent ae83d0b4
...@@ -187,7 +187,7 @@ static void map_input(const char *name, void **addr, size_t *len, int prot) ...@@ -187,7 +187,7 @@ static void map_input(const char *name, void **addr, size_t *len, int prot)
int fd = open(name, O_RDONLY); int fd = open(name, O_RDONLY);
if (fd == -1) if (fd == -1)
err(1, "%s", name); err(1, "open(%s)", name);
tmp_len = lseek(fd, 0, SEEK_END); tmp_len = lseek(fd, 0, SEEK_END);
if (tmp_len == (off_t)-1) if (tmp_len == (off_t)-1)
...@@ -240,7 +240,7 @@ int main(int argc, char **argv) ...@@ -240,7 +240,7 @@ int main(int argc, char **argv)
outfilename = argv[3]; outfilename = argv[3];
outfile = fopen(outfilename, "w"); outfile = fopen(outfilename, "w");
if (!outfile) if (!outfile)
err(1, "%s", argv[2]); err(1, "fopen(%s)", outfilename);
go(raw_addr, raw_len, stripped_addr, stripped_len, outfile, name); go(raw_addr, raw_len, stripped_addr, stripped_len, outfile, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment