linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Avoid bashisms
@ 2014-08-04 19:36 av1474
  2014-09-12  8:25 ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: av1474 @ 2014-08-04 19:36 UTC (permalink / raw)
  To: linuxppc-dev


>From 300a98f895dc7e2167cf379408322a9607907761 Mon Sep 17 00:00:00 2001
From: malc <av1474@comtv.ru>
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(-)

diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index fe8e54b..413f792 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -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
 
-- 
2.0.0.GIT


-- 
mailto:av1474@comtv.ru

^ permalink raw reply related	[flat|nested] 5+ messages in thread
[parent not found: <87zjfkvyha.fsf__21215.9315743067$1407184642$gmane$org@comtv.ru>]

end of thread, other threads:[~2014-09-13  8:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 19:36 [PATCH] Avoid bashisms av1474
2014-09-12  8:25 ` Michael Ellerman
2014-09-12 18:55   ` powerpc: Avoid bashisms in prom_init_check.sh av1474
     [not found]   ` <87r3zgd5xx.fsf_-___23348.7322264866$1410551821$gmane$org@comtv.ru>
2014-09-13  8:20     ` [PATCH] Simplify symbol check " Andreas Schwab
     [not found] <87zjfkvyha.fsf__21215.9315743067$1407184642$gmane$org@comtv.ru>
2014-08-04 21:14 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).