From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53551 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYQcV-0002QN-DH for qemu-devel@nongnu.org; Thu, 30 Dec 2010 17:05:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PYQcT-0003N9-Uf for qemu-devel@nongnu.org; Thu, 30 Dec 2010 17:05:15 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:53488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PYQcT-0003Lx-Fx for qemu-devel@nongnu.org; Thu, 30 Dec 2010 17:05:13 -0500 From: Stefan Weil Date: Thu, 30 Dec 2010 23:04:57 +0100 Message-Id: <1293746697-6857-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <38D0EC2C-7E91-4A4D-83A3-3B37A3126EBC@web.de> References: <38D0EC2C-7E91-4A4D-83A3-3B37A3126EBC@web.de> Subject: [Qemu-devel] [PATCH] make_device_config: Fix non-fatal error message with dash and other shells List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Blue Swirl , andreas.faerber@web.de 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 5d6b423c5cd6f9dfac30959ff1d5c088996719c3. 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 Signed-off-by: Stefan Weil --- 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..5d14885 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 / {printf "'$src_dir'/%s", $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done -- 1.7.2.3