From patchwork Thu Jan 13 13:43:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/8] fix 'no such file' error from make_device_config.sh X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 78759 Message-Id: To: David Ahern Cc: qemu-devel@nongnu.org Date: Thu, 13 Jan 2011 14:43:46 +0100 From: Markus Armbruster List-Id: qemu-devel.nongnu.org David Ahern writes: > make_device_config currently emits an error: > > make config-all-devices.mak > GEN x86_64-softmmu/config-devices.mak > /home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21: /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or directory > > /bin/sh does not like the file redirection for tr so change it to cat. > > Signed-off-by: David Ahern > --- > make_device_config.sh | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/make_device_config.sh b/make_device_config.sh > index 596fc5b..1ce4088 100644 > --- a/make_device_config.sh > +++ b/make_device_config.sh > @@ -18,7 +18,7 @@ process_includes () { > > f=$src > while [ -n "$f" ] ; do > - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` > + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` > [ $? = 0 ] || exit 1 > all_includes="$all_includes $f" > done This sweeps the real error under the carpet: $f has a trailing space. What about: diff --git a/make_device_config.sh b/make_device_config.sh index 596fc5b..711829c 100644 --- a/make_device_config.sh +++ b/make_device_config.sh @@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done