[PATCH 3/4] cr_tests: Fully quote paths in rewrite-cr-header.sh

Matt Helsley matthltc at us.ibm.com
Tue Aug 4 21:42:29 PDT 2009


Fully quote paths derived from KERNELSRC in rewrite-cr-header.sh

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
Cc: Linux Containers <containers at lists.linux-foundation.org>
---
 rewrite-cr-header.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rewrite-cr-header.sh b/rewrite-cr-header.sh
index bb334b8..ffc6f62 100755
--- a/rewrite-cr-header.sh
+++ b/rewrite-cr-header.sh
@@ -55,9 +55,9 @@ echo '/* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */'
 # we don't want. Would it be better to throw everything away until we see
 # "#define _LINUX_CHECKPOINT_H_" ??
 #
-cpp -CC -P -U__KERNEL__ -undef -nostdinc -fdirectives-only ${KERNELSRC}/include/linux/checkpoint.h | tail -n '+6'
+cpp -CC -P -U__KERNEL__ -undef -nostdinc -fdirectives-only "${KERNELSRC}/include/linux/checkpoint.h" | tail -n '+6'
 
-find ${KERNELSRC}/arch -name 'unistd*.h' -print | sort | \
+find "${KERNELSRC}/arch" -name 'unistd*.h' -print | sort | \
 while read UNISTDH ; do
 	REGEX='[[:space:]]*#[[:space:]]*define[[:space:]]+__NR_(checkpoint|restart)[[:space:]]+[[:digit:]]+'
 
@@ -77,13 +77,13 @@ while read UNISTDH ; do
 	*)	CPPARCH="${KARCH}" ;;
 	esac
 
-	grep -q -E "${REGEX}" ${UNISTDH} || {
+	grep -q -E "${REGEX}" "${UNISTDH}" || {
 		echo '/* '"${CPPARCH}"' unsupported. */'
 		continue
 	}
 
 	echo -e "${COND} __${CPPARCH}__\\n"
-	grep -E "${REGEX}" ${UNISTDH} | \
+	grep -E "${REGEX}" "${UNISTDH}" | \
 	sed -e 's/^[[:space:]]*#define[[:space:]]\+__NR_\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\).*$/#ifndef __NR_\1\n#define __NR_\1 \2\n#endif\n/'
 	COND='#elif'
 done
-- 
1.5.6.3




More information about the Containers mailing list