All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] cr_tests: Use stdout for rewrite-cr-header.sh output
@ 2009-08-05  4:42 Matt Helsley
       [not found] ` <1249447347-26415-4-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Helsley @ 2009-08-05  4:42 UTC (permalink / raw)
  To: Serge E. Hallyn; +Cc: Linux Containers

Instead of overwriting cr.h in the current directory write the output
of rewrite-cr-header.sh to stdout and let whoever invokes the script
decide what to do with the output. This should make it slightly
easier to test and make the script more widely usable (e.g. in user-cr).

Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
---
 rewrite-cr-header.sh |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/rewrite-cr-header.sh b/rewrite-cr-header.sh
index ffc6f62..97f39fc 100755
--- a/rewrite-cr-header.sh
+++ b/rewrite-cr-header.sh
@@ -40,9 +40,6 @@ fi
 
 ################################################################################
 
-mv cr.h cr.h.bak || exit -1
-
-(
 COND='#if'
 set -e
 echo '/* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */'
@@ -88,9 +85,3 @@ while read UNISTDH ; do
 	COND='#elif'
 done
 echo -e '#else\n#error "Architecture does not have definitons for __NR_(checkpoint|restart)"\n#endif'
-) > cr.h || {
-	mv -f cr.h.bak cr.h
-	exit -1
-}
-
-rm -f cr.h.bak
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-05 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05  4:42 [PATCH 4/4] cr_tests: Use stdout for rewrite-cr-header.sh output Matt Helsley
     [not found] ` <1249447347-26415-4-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-08-05 14:02   ` Serge E. Hallyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.