scripts/decode_stacktrace.sh: remove trailing space
PATCH v2 1/1 scripts/decode_stacktrace.sh: remove trailing space
decode_stacktrace.sh adds a trailing space at the end of the decoded stack if the module is not set (in most of the lines), which makes the some lines of the stack having trailing space and some others not.
Do not add an extra space at the end of the line if module is not set, adding consistency in output formatting.
Signed-off-by Breno Leitao <[email protected]>
Reviewed-by Elliot Berman <[email protected]>
Reviewed-by Carlos Llamas <[email protected]>
Reviewed-by Stephen Boyd <[email protected]>
---
Changelog:
v2:
* Add double squared brackets instead of a single one (Carlos)
scripts/decode_stacktrace.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
scripts/decode_stacktrace.sh +6 -1
@@ -311,7 +311,12 @@ handle_line() { parse_symbol # modifies $symbol # Add up the line number to the symbol - echo "${words[@]}" "$symbol $module" + if [[ -z ${module} ]] + then + echo "${words[@]}" "$symbol" + else + echo "${words[@]}" "$symbol $module" + fi } while read line; do
Signature · 1 line
2.43.5