Avoid bashisms
PATCH 1/1 Avoid bashisms
Quoted 2 lines
From
300a98f895dc7e2167cf379408322a9607907761Mon Sep 17 00:00:00 2001
From: malc <[email protected]>
Date: Mon, 4 Aug 2014 23:28:05 +0400
Subject: [PATCH] Avoid bashisms
--- arch/powerpc/kernel/prom_init_check.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/kernel/prom_init_check.sh +6 -6
@@ -50,22 +50,22 @@ do done # ignore register save/restore funcitons - if [ "${UNDEF:0:9}" = "_restgpr_" ]; then + if [ "$(printf %.9s $UNDEF)" = "_restgpr_" ]; then OK=1 fi - if [ "${UNDEF:0:10}" = "_restgpr0_" ]; then + if [ "$(printf %.10s $UNDEF)" = "_restgpr0_" ]; then OK=1 fi - if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then + if [ "$(printf %.11s $UNDEF)" = "_rest32gpr_" ]; then OK=1 fi - if [ "${UNDEF:0:9}" = "_savegpr_" ]; then + if [ "$(printf %.9s $UNDEF)" = "_savegpr_" ]; then OK=1 fi - if [ "${UNDEF:0:10}" = "_savegpr0_" ]; then + if [ "$(printf %.10s $UNDEF)" = "_savegpr0_" ]; then OK=1 fi - if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then + if [ "$(printf %.11s $UNDEF)" = "_save32gpr_" ]; then OK=1 fi
Signature · 5 lines
2.0.0.GIT -- mailto:[email protected]
Michael Ellerman
reviewerQuoted 4 lines · On Mon, 2014-08-04 at 23:36 +0400, [email protected] wrote:
From
300a98f895dc7e2167cf379408322a9607907761Mon Sep 17 00:00:00 2001
From: malc <[email protected]>
Date: Mon, 4 Aug 2014 23:28:05 +0400
Subject: [PATCH] Avoid bashisms
Hi malc,
If you want us to take your patch, please resend with:
- a better subject, eg:
powerpc: Avoid bashisms in prom_init_check.sh
- a Signed-off-by line.
cheers
powerpc: Avoid bashisms in prom_init_check.sh
Quoted 1 line
From
300a98f895dc7e2167cf379408322a9607907761Mon Sep 17 00:00:00 2001
From: malc <av1474 at comtv.ru>
Date: Mon, 4 Aug 2014 23:28:05 +0400
Subject: [PATCH] powerpc: Avoid bashisms in prom_init_check.sh
--- arch/powerpc/kernel/prom_init_check.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/kernel/prom_init_check.sh +6 -6
@@ -50,22 +50,22 @@ do done # ignore register save/restore funcitons - if [ "${UNDEF:0:9}" = "_restgpr_" ]; then + if [ "$(printf %.9s $UNDEF)" = "_restgpr_" ]; then OK=1 fi - if [ "${UNDEF:0:10}" = "_restgpr0_" ]; then + if [ "$(printf %.10s $UNDEF)" = "_restgpr0_" ]; then OK=1 fi - if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then + if [ "$(printf %.11s $UNDEF)" = "_rest32gpr_" ]; then OK=1 fi - if [ "${UNDEF:0:9}" = "_savegpr_" ]; then + if [ "$(printf %.9s $UNDEF)" = "_savegpr_" ]; then OK=1 fi - if [ "${UNDEF:0:10}" = "_savegpr0_" ]; then + if [ "$(printf %.10s $UNDEF)" = "_savegpr0_" ]; then OK=1 fi - if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then + if [ "$(printf %.11s $UNDEF)" = "_save32gpr_" ]; then OK=1 fi
Signature · 1 line
2.0.0.GIT
Quoted 6 lines · On Mon, 2014-08-04 at 23:36 +0400, [email protected] wrote:
Quoted 4 lines
From
300a98f895dc7e2167cf379408322a9607907761Mon Sep 17 00:00:00 2001
From: malc <[email protected]>
Date: Mon, 4 Aug 2014 23:28:05 +0400
Subject: [PATCH] Avoid bashisms
Quoted 8 lines
Hi malc,
If you want us to take your patch, please resend with:
- a better subject, eg:
powerpc: Avoid bashisms inprom_init_check.sh
- a Signed-off-by line.cheers
Thanks for suggestions,
Signature · 1 line
mailto:[email protected]
PATCH 1/1 Simplify symbol check in prom_init_check.sh
In reply to a message not in the archive--- arch/powerpc/kernel/prom_init_check.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-)
arch/powerpc/kernel/prom_init_check.sh +6 -16
@@ -50,24 +50,14 @@ do done # ignore register save/restore funcitons - if [ "${UNDEF:0:9}" = "_restgpr_" ]; then + case $UNDEF in + _restgpr_*|_restgpr0_*|_rest32gpr_*) OK=1 - fi - if [ "${UNDEF:0:10}" = "_restgpr0_" ]; then - OK=1 - fi - if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then - OK=1 - fi - if [ "${UNDEF:0:9}" = "_savegpr_" ]; then + ;; + _savegpr_*|_savegpr0_*|_save32gpr_*) OK=1 - fi - if [ "${UNDEF:0:10}" = "_savegpr0_" ]; then - OK=1 - fi - if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then - OK=1 - fi + ;; + esac if [ $OK -eq 0 ]; then ERROR=1
Signature · 6 lines
2.1.0 -- Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."