[libvirt] [PATCH] cleanup: qemu_capabilities: remove redundant error messages

Chen Hanxiao posted 1 patch 114 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1488946457-14556-1-git-send-email-chen_han_xiao@126.com
src/qemu/qemu_capabilities.c | 4 ----
1 file changed, 4 deletions(-)

[libvirt] [PATCH] cleanup: qemu_capabilities: remove redundant error messages

Posted by Chen Hanxiao 114 weeks ago
From: Chen Hanxiao <chenhanxiao@gmail.com>

We reported error in caller qemuConnectGetDomainCapabilities.
So the same error messages in virQEMUCapsCacheLookupByArch
are useless.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
---
 src/qemu/qemu_capabilities.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5a3b4ac..eca46e7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5192,10 +5192,6 @@ virQEMUCapsCacheLookupByArch(virCapsPtr caps,
             virQEMUCapsCacheValidate(cache, binary, caps, &ret);
             VIR_FREE(binary);
         }
-    } else {
-        virReportError(VIR_ERR_INVALID_ARG,
-                       _("unable to find any emulator to serve '%s' "
-                         "architecture"), virArchToString(arch));
     }
 
     virObjectRef(ret);
-- 
2.7.4


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] cleanup: qemu_capabilities: remove redundant error messages

Posted by Chen Hanxiao 113 weeks ago
At 2017-03-08 12:14:17, "Chen Hanxiao" <chen_han_xiao@126.com> wrote:
>From: Chen Hanxiao <chenhanxiao@gmail.com>
>
>We reported error in caller qemuConnectGetDomainCapabilities.
>So the same error messages in virQEMUCapsCacheLookupByArch
>are useless.
>
>Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
>---
> src/qemu/qemu_capabilities.c | 4 ----
> 1 file changed, 4 deletions(-)
>

ping

Regards,
- Chen

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] cleanup: qemu_capabilities: remove redundant error messages

Posted by Jiri Denemark 112 weeks ago
On Wed, Mar 08, 2017 at 12:14:17 +0800, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao@gmail.com>
> 
> We reported error in caller qemuConnectGetDomainCapabilities.
> So the same error messages in virQEMUCapsCacheLookupByArch
> are useless.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
> ---
>  src/qemu/qemu_capabilities.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 5a3b4ac..eca46e7 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -5192,10 +5192,6 @@ virQEMUCapsCacheLookupByArch(virCapsPtr caps,
>              virQEMUCapsCacheValidate(cache, binary, caps, &ret);
>              VIR_FREE(binary);
>          }
> -    } else {
> -        virReportError(VIR_ERR_INVALID_ARG,
> -                       _("unable to find any emulator to serve '%s' "
> -                         "architecture"), virArchToString(arch));
>      }
>  
>      virObjectRef(ret);

This fix is incorrect. It's the extra error message in
qemuConnectGetDomainCapabilities which should be removed.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] cleanup: qemu_capabilities: remove redundant error messages

Posted by Chen Hanxiao 112 weeks ago

At 2017-03-21 17:09:22, "Jiri Denemark" <jdenemar@redhat.com> wrote:
>On Wed, Mar 08, 2017 at 12:14:17 +0800, Chen Hanxiao wrote:
>> From: Chen Hanxiao <chenhanxiao@gmail.com>
>> 
>> We reported error in caller qemuConnectGetDomainCapabilities.
>> So the same error messages in virQEMUCapsCacheLookupByArch
>> are useless.
>> 
>> Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
>> ---
>>  src/qemu/qemu_capabilities.c | 4 ----
>>  1 file changed, 4 deletions(-)
>> 
>> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
>> index 5a3b4ac..eca46e7 100644
>> --- a/src/qemu/qemu_capabilities.c
>> +++ b/src/qemu/qemu_capabilities.c
>> @@ -5192,10 +5192,6 @@ virQEMUCapsCacheLookupByArch(virCapsPtr caps,
>>              virQEMUCapsCacheValidate(cache, binary, caps, &ret);
>>              VIR_FREE(binary);
>>          }
>> -    } else {
>> -        virReportError(VIR_ERR_INVALID_ARG,
>> -                       _("unable to find any emulator to serve '%s' "
>> -                         "architecture"), virArchToString(arch));
>>      }
>>  
>>      virObjectRef(ret);
>
>This fix is incorrect. It's the extra error message in
>qemuConnectGetDomainCapabilities which should be removed.
>

Thanks for the review.
v2 will come soon.

Regards,
- Chen

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list