qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Cc: Blue Swirl <blauwirbel@gmail.com>, andreas.faerber@web.de
Subject: [Qemu-devel] [PATCH] make_device_config: Fix non-fatal error message with dash and other shells
Date: Thu, 30 Dec 2010 23:04:57 +0100	[thread overview]
Message-ID: <1293746697-6857-1-git-send-email-weil@mail.berlios.de> (raw)
In-Reply-To: <38D0EC2C-7E91-4A4D-83A3-3B37A3126EBC@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 <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 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

  reply	other threads:[~2010-12-30 22:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 21:52 [Qemu-devel] [PATCH] win32: Fix CRLF problem in make_device_config.sh Stefan Weil
2010-12-16 22:42 ` [Qemu-devel] " Paolo Bonzini
2010-12-17 13:34   ` Andreas Färber
2010-12-17 13:44     ` Paolo Bonzini
2010-12-17 19:01       ` Stefan Weil
2010-12-17 19:33         ` Andreas Färber
2010-12-17 19:54           ` Stefan Weil
2010-12-17 21:00             ` Andreas Färber
2010-12-17 21:25               ` Paolo Bonzini
2010-12-17 22:17                 ` Andreas Färber
2010-12-17 23:24                   ` Paolo Bonzini
2010-12-18 10:19                     ` Stefan Weil
2010-12-18 12:02                       ` Andreas Färber
2010-12-18 14:20                         ` Stefan Weil
2010-12-17 20:08         ` Paolo Bonzini
2010-12-18 16:34 ` [Qemu-devel] [PATCH v2] " Stefan Weil
2010-12-18 17:09   ` Andreas Färber
2010-12-18 18:59     ` Blue Swirl
2010-12-19 15:42       ` Stefan Weil
2010-12-19 16:06         ` Andreas Färber
2010-12-20 10:37           ` Paolo Bonzini
2010-12-30 21:53           ` Andreas Färber
2010-12-30 22:04             ` Stefan Weil [this message]
2010-12-30 23:08               ` [Qemu-devel] [PATCH] make_device_config: Fix non-fatal error message with dash and other shells Andreas Färber
2010-12-19 16:21         ` [Qemu-devel] [PATCH v2] win32: Fix CRLF problem in make_device_config.sh Blue Swirl
2010-12-19 16:43           ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293746697-6857-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=andreas.faerber@web.de \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).