From: Matt Helsley Subject: [PATCH 3/4] cr_tests: Fully quote paths in rewrite-cr-header.sh Date: Tue, 4 Aug 2009 21:42:29 -0700 Message-ID: <1249447347-26415-3-git-send-email-matthltc@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: Linux Containers List-Id: containers.vger.kernel.org Fully quote paths derived from KERNELSRC in rewrite-cr-header.sh Signed-off-by: Matt Helsley Cc: Linux Containers --- 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