Skip to contentSkip to conversation

scripts: Getting rid of -h option, when empty, the usage will be shown

PATCH In review Bhaskar Chowdhury 3 participants 4 messages Jun 7 – Jun 17 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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
index 39d60d477bf3..fa084f128802 100755
@@ -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

#1 lore raw

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.

---
 scripts/decode_stacktrace.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/decode_stacktrace.sh +0 -0
index 39d60d477bf3..fa084f128802 100755

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]

#3 lore raw

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
index 39d60d477bf3..fa084f128802 100755
@@ -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

#4 lore raw
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