From: Dmitry Safonov <dima@arista.com>
To: linux-kernel@vger.kernel.org
Cc: Dmitry Safonov <0x7f454c46@gmail.com>,
Dmitry Safonov <dima@arista.com>, Andrei Vagin <avagin@gmail.com>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
x86@kernel.org, Andrei Vagin <avagin@openvz.org>
Subject: [PATCH 1/3] x86/vdso2c: Correct err messages on file opening
Date: Mon, 20 Apr 2020 19:32:53 +0100 [thread overview]
Message-ID: <20200420183256.660371-2-dima@arista.com> (raw)
In-Reply-To: <20200420183256.660371-1-dima@arista.com>
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@openvz.org>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: Dmitry Safonov <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 3842873b3ae3..7380908045c7 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);
--
2.26.0
next prev parent reply other threads:[~2020-04-20 18:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 18:32 [PATCH 0/3] x86/vdso: Little clean-ups Dmitry Safonov
2020-04-20 18:32 ` Dmitry Safonov [this message]
2020-04-21 18:37 ` [tip: x86/vdso] x86/vdso/vdso2c: Correct error messages on file open tip-bot2 for Dmitry Safonov
2020-04-20 18:32 ` [PATCH 2/3] x86/vdso2c: Convert iterator to unsigned Dmitry Safonov
2020-04-20 18:35 ` Dmitry Safonov
2020-04-20 18:32 ` [PATCH 2/3] x86/vdso2c: Convert iterators " Dmitry Safonov
2020-04-21 18:37 ` [tip: x86/vdso] x86/vdso/vdso2c: " tip-bot2 for Dmitry Safonov
2020-04-20 18:32 ` [PATCH 3/3] x86/vdso/Makefile: Add vobjs32 Dmitry Safonov
2020-04-21 18:37 ` [tip: x86/vdso] " tip-bot2 for Dmitry Safonov
2020-04-21 17:14 ` [PATCH 0/3] x86/vdso: Little clean-ups Andy Lutomirski
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=20200420183256.660371-2-dima@arista.com \
--to=dima@arista.com \
--cc=0x7f454c46@gmail.com \
--cc=avagin@gmail.com \
--cc=avagin@openvz.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@arm.com \
--cc=x86@kernel.org \
/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
Powered by JetHome