Skip to content

Commit 089ef55

Browse files
0x7f454c46KAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Andrei Vagin <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent ae83d0b commit 089ef55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/entry/vdso/vdso2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static void map_input(const char *name, void **addr, size_t *len, int prot)
187187

188188
int fd = open(name, O_RDONLY);
189189
if (fd == -1)
190-
err(1, "%s", name);
190+
err(1, "open(%s)", name);
191191

192192
tmp_len = lseek(fd, 0, SEEK_END);
193193
if (tmp_len == (off_t)-1)
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
240240
outfilename = argv[3];
241241
outfile = fopen(outfilename, "w");
242242
if (!outfile)
243-
err(1, "%s", argv[2]);
243+
err(1, "fopen(%s)", outfilename);
244244

245245
go(raw_addr, raw_len, stripped_addr, stripped_len, outfile, name);
246246

0 commit comments

Comments
 (0)