ia64/xen-unstable

view tools/misc/fakei386xen @ 7238:971e7c7411b3

Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception. Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Thu Oct 06 10:13:11 2005 +0100 (2005-10-06)
parents fc1bb7d45e8c
children
line source
1 #!/bin/bash
3 cln () {
4 while [ $# -gt 0 ]; do
5 (
6 test -f "$1" || { echo "$1: No such file or directory" 1>&2; exit 1; }
7 { cp $1 cln$$ && rm $1 && mv cln$$ $1; } || { rm -f cln$$; exit 1; }
8 )
9 shift
10 done
11 }
14 for i in `find include/asm-xen arch/xen -type l | xargs ls -l | egrep '../(asm-)?i386/' | awk '{print $9}'`
15 do
16 echo $i
17 cln $i
18 done
20 mv include/asm-i386 include/asm-Xi386
21 mv include/asm-xen include/asm-i386
22 ln -s asm-i386 include/asm-xen
23 rm include/asm
24 ln -s asm-i386 include/asm
25 mv arch/i386 arch/Xi386
26 mv arch/xen arch/i386
27 ln -s i386 arch/xen
29 mv Makefile XMakefile
30 #sed -e 's/^EXTRAVERSION =.*/EXTRAVERSION = -xen/' <XMakefile >Makefile
31 echo ARCH=i386 >Makefile ; cat XMakefile >>Makefile