Patchwork [1/8] fix 'no such file' error from make_device_config.sh

login
register
mail settings
Submitter David S. Ahern
Date Jan. 13, 2011, 6:34 a.m.
Message ID <1294900477-23722-2-git-send-email-daahern@cisco.com>
Download mbox | patch
Permalink /patch/78672/
State New
Headers show

Comments

David S. Ahern - Jan. 13, 2011, 6:34 a.m.
make_device_config currently emits an error:

make config-all-devices.mak
  GEN   x86_64-softmmu/config-devices.mak
/home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21: /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or directory

/bin/sh does not like the file redirection for tr so change it to cat.

Signed-off-by: David Ahern <daahern@cisco.com>
---
 make_device_config.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Stefan Weil - Jan. 14, 2011, 7:57 p.m.
Am 13.01.2011 07:34, schrieb David Ahern:
> make_device_config currently emits an error:
>
> make config-all-devices.mak
>    GEN   x86_64-softmmu/config-devices.mak
> /home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21: /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or directory
>
> /bin/sh does not like the file redirection for tr so change it to cat.
>
> Signed-off-by: David Ahern<daahern@cisco.com>
> ---
>   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..1ce4088 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=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'`
>     [ $? = 0 ] || exit 1
>     all_includes="$all_includes $f"
>   done
>    

Hello Blue,

a patch from last year which fixes the same problem is still waiting
for being committed to qemu master. See
http://patchwork.ozlabs.org/patch/77021/

Thanks,
Stefan
Blue Swirl - Jan. 14, 2011, 10:01 p.m.
On Fri, Jan 14, 2011 at 7:57 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 13.01.2011 07:34, schrieb David Ahern:
>>
>> make_device_config currently emits an error:
>>
>> make config-all-devices.mak
>>   GEN   x86_64-softmmu/config-devices.mak
>> /home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21:
>> /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or
>> directory
>>
>> /bin/sh does not like the file redirection for tr so change it to cat.
>>
>> Signed-off-by: David Ahern<daahern@cisco.com>
>> ---
>>  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..1ce4088 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=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/"
>> $2}'`
>>    [ $? = 0 ] || exit 1
>>    all_includes="$all_includes $f"
>>  done
>>
>
> Hello Blue,
>
> a patch from last year which fixes the same problem is still waiting
> for being committed to qemu master. See
> http://patchwork.ozlabs.org/patch/77021/

Thanks, applied.

Patch

diff --git a/make_device_config.sh b/make_device_config.sh
index 596fc5b..1ce4088 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=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'`
   [ $? = 0 ] || exit 1
   all_includes="$all_includes $f"
 done