sim-card
/
qemu
Archived
10
0
Fork 0

make_device_config: Fix non-fatal error message with dash and other shells

ORS=" " adds a blank to the name of the include file.
Some shells (e.g. dash) don't accept input redirection
(tr -d '\r' < $f) when $f ends with a blank, so they
print an error message instead of reading pci.mak.
This is a non-fatal error because pci.mak does not
contain an include line. It was introduced by commit
5d6b423c5c.

Using printf avoids adding a blank and is also supported
by older awk versions (this solution was suggested by
Paolo Bonzini, thank you).

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Tested-by: Andreas Färber <andreas.faerber@web.de>
This commit is contained in:
Stefan Weil 2010-12-30 12:04:57 +00:00 committed by Blue Swirl
parent 42f5a7e936
commit 0601740a5d
1 changed files with 1 additions and 1 deletions

View File

@ -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 / {printf "'$src_dir'/%s", $2}'`
[ $? = 0 ] || exit 1
all_includes="$all_includes $f"
done