objtool: Improve error message for bad file argument
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 15 Jan 2018 14:17:08 +0000 (08:17 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jan 2018 18:58:13 +0000 (19:58 +0100)
commitf45bbd95be060a7eb67ce2f1a1404a82be93d0e3
treedf307e239f20ac75505b1373810e51524140c815
parent956ec9e7b59a1fb3fd4c9bc8a13a7f7700e9d7d2
objtool: Improve error message for bad file argument

commit 385d11b152c4eb638eeb769edcb3249533bb9a00 upstream.

If a nonexistent file is supplied to objtool, it complains with a
non-helpful error:

  open: No such file or directory

Improve it to:

  objtool: Can't open 'foo': No such file or directory

Reported-by: Markus <M4rkusXXL@web.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/406a3d00a21225eee2819844048e17f68523ccf6.1516025651.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/objtool/elf.c