Commit graph

4 commits

Author SHA1 Message Date
Stefan Weil 0601740a5d 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>
2011-01-14 22:00:07 +00:00
Stefan Weil 5d6b423c5c win32: Fix CRLF problem in make_device_config.sh
QEMU source code with CRLF line endings
which is quite common on windows hosts
fails with current make_device_config.sh.

The awk script gets the name of the included
file with \r, so instead of pci.mak it will
search for pci.mak\r which of course does
not work.

Fix this by removing any \r.

v2:
    Avoid using sub() and \r with awk because they are unsupported
    on some platforms. Use tr to remove \r. This new solution
    improves portability and was suggested by Paolo Bonzini.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-12-18 18:58:25 +00:00
Paul Brook cf66924f81 Detect missing config includes
Terminate make_device_config.sh if the awk command fails.
Typically this means a missing file.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-11-27 00:58:07 +00:00
Paul Brook bd9141bb2e Include directives in default configs
Allow default configs to be split into several files.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-11-26 18:47:45 +00:00