Re: [PATCH] objtool: Print top level commands on incorrect usage

From: Kamalesh Babulal
Date: Sat Oct 14 2017 - 10:38:39 EST


On Friday 13 October 2017 10:08 PM, Josh Poimboeuf wrote:
[...]
Signed-off-by: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>
---
tools/objtool/objtool.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c
index 31e0f91..07f3299 100644
--- a/tools/objtool/objtool.c
+++ b/tools/objtool/objtool.c
@@ -70,7 +70,7 @@ static void cmd_usage(void)

printf("\n");

- exit(1);
+ exit(129);

For consistency with the rest of the code, this should be -1 instead of
129 (though the end result is the same).


Thanks for the review. exit(129) is returned by command line parser
when the usage is incorrect, except for cmd_usage(), where the exit
code 1. I will re-send the patch with the better commit message.


--
cheers,
Kamalesh.