[PATCH] Avoid bashisms
av1474 at comtv.ru
av1474 at comtv.ru
Tue Aug 5 05:36:17 EST 2014
>From 300a98f895dc7e2167cf379408322a9607907761 Mon Sep 17 00:00:00 2001
From: malc <av1474 at 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 at comtv.ru
More information about the Linuxppc-dev
mailing list