scripts: Getting rid of -h option, when empty, the usage will be shown
PATCH 1/1 scripts: Getting rid of -h option, when empty, the usage will be shown
Make thing simple to show the help/usage info, when no argument given.
--- scripts/decode_stacktrace.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/decode_stacktrace.sh +1 -2
@@ -7,7 +7,6 @@ usage() { echo "Usage:" echo " $0 [-R] -r <release>" echo " $0 [-R] [<vmlinux> [<base_path>|auto [<modules_path>]]]" - echo " $0 -h" echo "Options:" echo " -R: decode return address instead of caller address." }
@@ -37,7 +36,7 @@ ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} NM=${UTIL_PREFIX}nm${UTIL_SUFFIX} decode_retaddr=false -if [[ $1 == "-h" ]] ; then +if [[ $1 == "" ]] ; then usage exit 0 elif [[ $1 == "-R" ]] ; then
--
2.53.0
Hi Bhaskar,
Quoted 1 line · Bhaskar Chowdhury
Sasha was not in Cc. You need you write "Cc: ..." instead for git-send-email to add someone in Cc
Quoted 12 lines
Make thing simple to show the help/usage info, when no argument given.
Signed-off-by Bhaskar Chowdhury <[email protected]>--- scripts/decode_stacktrace.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)scripts/decode_stacktrace.sh +0
-0
scripts/decode_stacktrace.sh usage() { · line 9
Quoted 3 lines
scripts/decode_stacktrace.sh +0
-0@@ -7,7 +7,6 @@ usage() { echo "Usage:" echo " $0 [-R] -r <release>" echo " $0 [-R] [<vmlinux> [<base_path>|auto [<modules_path>]]]"
As mentioned on this line above, this script can be called without any argument.
So, if I'm not mistaken, the modification you are suggesting here cannot be accepted.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 scripts: Getting rid of -h option, when empty, the usage will be shown
Make thing simple to show the help/usage info, when no argument given.
--- scripts/decode_stacktrace.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/decode_stacktrace.sh +1 -2
@@ -7,7 +7,6 @@ usage() { echo "Usage:" echo " $0 [-R] -r <release>" echo " $0 [-R] [<vmlinux> [<base_path>|auto [<modules_path>]]]" - echo " $0 -h" echo "Options:" echo " -R: decode return address instead of caller address." }
@@ -37,7 +36,7 @@ ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} NM=${UTIL_PREFIX}nm${UTIL_SUFFIX} decode_retaddr=false -if [[ $1 == "-h" ]] ; then +if [[ $1 == "" ]] ; then usage exit 0 elif [[ $1 == "-R" ]] ; then
--
2.53.0
Quoted 3 lines · Bhaskar Chowdhury
Make thing simple to show the help/usage info, when no argument given.
But passing no arguments is a valid thing to do for this script...
Signature · 2 lines
Thanks, Sasha