Skip to contentSkip to conversation

cr_tests: Fully quote paths in rewrite-cr-header.sh

PATCH In review Matt Helsley 1 participant 1 message Aug 5, 2009

lore
Share & tools
lore
#0 lore raw

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

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

Cc Linux Containers <containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
---
 rewrite-cr-header.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
rewrite-cr-header.sh +4 -4
index bb334b8..ffc6f62 100755
@@ -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
Signature · 1 line
1.5.6.3