From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] [RFC] Add support for a USB audio device model Date: Mon, 13 Sep 2010 14:07:43 -0700 Message-ID: <4C8E929F.9000002@linux.intel.com> References: <1284155276-14959-1-git-send-email-hpa@linux.intel.com> <20100913205338.GA2607@z> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, av1474@comtv.ru, kvm@vger.kernel.org, "H. Peter Anvin" To: Amos Kong Return-path: Received: from mga09.intel.com ([134.134.136.24]:44253 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754578Ab0IMVHr (ORCPT ); Mon, 13 Sep 2010 17:07:47 -0400 In-Reply-To: <20100913205338.GA2607@z> Sender: kvm-owner@vger.kernel.org List-ID: On 09/13/2010 01:53 PM, Amos Kong wrote: > > # patch -p1 < /tmp/usb-audio.patch > # ./configure > ... > ... > preadv support yes > fdatasync yes > uuid support no > vhost-net support no > Trace backend nop > Trace output file trace- > ./configure: 2276: Bad substitution > > >> diff --git a/create_config b/create_config >> index 0098e68..1caa25b 100755 >> --- a/create_config >> +++ b/create_config >> @@ -25,7 +25,7 @@ case $line in >> CONFIG_AUDIO_DRIVERS=*) >> drivers=${line#*=} >> echo "#define CONFIG_AUDIO_DRIVERS \\" >> - for drv in $drivers; do >> + for drv in ${drivers//-/_}; do >> echo " &${drv}_audio_driver,\\" >> done >> echo "" >> @@ -39,10 +39,12 @@ case $line in >> ;; >> CONFIG_*=y) # configuration >> name=${line%=*} >> + name=${name//-/_} >> echo "#define $name 1" >> ;; >> CONFIG_*=*) # configuration >> name=${line%=*} >> + name=${name//-/_} >> value=${line#*=} >> echo "#define $name $value" >> ;; Looks like ${.../...} is a bashism. One can replace it with: name=`echo "$name" | tr '-' '_'` and for drv in `echo "$drivers" | tr '-' '_'`; do -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46337 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvGFk-0005wZ-7R for qemu-devel@nongnu.org; Mon, 13 Sep 2010 17:07:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvGFf-0005It-PE for qemu-devel@nongnu.org; Mon, 13 Sep 2010 17:07:51 -0400 Received: from mga09.intel.com ([134.134.136.24]:48152) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvGFf-0005Ij-Kr for qemu-devel@nongnu.org; Mon, 13 Sep 2010 17:07:47 -0400 Message-ID: <4C8E929F.9000002@linux.intel.com> Date: Mon, 13 Sep 2010 14:07:43 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 References: <1284155276-14959-1-git-send-email-hpa@linux.intel.com> <20100913205338.GA2607@z> In-Reply-To: <20100913205338.GA2607@z> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] [RFC] Add support for a USB audio device model List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, "H. Peter Anvin" On 09/13/2010 01:53 PM, Amos Kong wrote: > > # patch -p1 < /tmp/usb-audio.patch > # ./configure > ... > ... > preadv support yes > fdatasync yes > uuid support no > vhost-net support no > Trace backend nop > Trace output file trace- > ./configure: 2276: Bad substitution > > >> diff --git a/create_config b/create_config >> index 0098e68..1caa25b 100755 >> --- a/create_config >> +++ b/create_config >> @@ -25,7 +25,7 @@ case $line in >> CONFIG_AUDIO_DRIVERS=*) >> drivers=${line#*=} >> echo "#define CONFIG_AUDIO_DRIVERS \\" >> - for drv in $drivers; do >> + for drv in ${drivers//-/_}; do >> echo " &${drv}_audio_driver,\\" >> done >> echo "" >> @@ -39,10 +39,12 @@ case $line in >> ;; >> CONFIG_*=y) # configuration >> name=${line%=*} >> + name=${name//-/_} >> echo "#define $name 1" >> ;; >> CONFIG_*=*) # configuration >> name=${line%=*} >> + name=${name//-/_} >> value=${line#*=} >> echo "#define $name $value" >> ;; Looks like ${.../...} is a bashism. One can replace it with: name=`echo "$name" | tr '-' '_'` and for drv in `echo "$drivers" | tr '-' '_'`; do -hpa