]> asedeno.scripts.mit.edu Git - linux.git/commit
objtool: Print top level commands on incorrect usage
authorKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Sat, 14 Oct 2017 14:47:54 +0000 (20:17 +0530)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Oct 2017 13:22:26 +0000 (15:22 +0200)
commit6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e
tree3f7e6083e7c86c3a1142ed16c4e99f5d660c22d0
parent2704fbb672d0d9a19414907fda7949283dcef6a1
objtool: Print top level commands on incorrect usage

Print top-level objtool commands, along with the error on incorrect
command line usage. Objtool command line parser exit's with code 129,
for incorrect usage. Convert the cmd_usage() exit code also, to maintain
consistency across objtool.

After the patch:

  $ ./objtool -j

  Unknown option: -j

  usage: objtool COMMAND [ARGS]

  Commands:
     check   Perform stack metadata validation on an object file
     orc     Generate in-place ORC unwind tables for an object file

  $ echo $?
  129

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-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/1507992474-16142-1-git-send-email-kamalesh@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/objtool/objtool.c