From patchwork Thu Feb 21 09:59:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 222230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ECC052C0090 for ; Thu, 21 Feb 2013 20:59:47 +1100 (EST) Received: from localhost ([::1]:40543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8SwL-0003Iu-Hh for incoming@patchwork.ozlabs.org; Thu, 21 Feb 2013 04:59:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Svu-0003FF-RH for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Svs-0001uy-S2 for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Svs-0001uG-95 for qemu-devel@nongnu.org; Thu, 21 Feb 2013 04:59:16 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1L9xFDp011946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Feb 2013 04:59:15 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1L9xENk032607; Thu, 21 Feb 2013 04:59:14 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id B416340D0D; Thu, 21 Feb 2013 10:59:13 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 21 Feb 2013 10:59:01 +0100 Message-Id: <1361440753-13413-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1361440753-13413-1-git-send-email-kraxel@redhat.com> References: <1361440753-13413-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 02/14] fix scripts/make_device_config.sh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Make it handle multiple include statements in a file: (1) The printf needs a space so the include files will be separated. (2) Also $f can contain multiple failes, so redirection will not work and we have to use cat to process all files. Signed-off-by: Gerd Hoffmann --- scripts/make_device_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh index 0778fe2..81fe942 100644 --- a/scripts/make_device_config.sh +++ b/scripts/make_device_config.sh @@ -18,7 +18,7 @@ process_includes () { f=$src while [ -n "$f" ] ; do - f=`tr -d '\r' < $f | awk '/^include / {printf "'$src_dir'/%s", $2}'` + f=`cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}'` [ $? = 0 ] || exit 1 all_includes="$all_includes $f" done