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

Chen Hanxiao posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1490097507-2063-1-git-send-email-chen_han_xiao@126.com
src/qemu/qemu_driver.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[libvirt] [PATCH v2] cleanup: qemu_capabilities: remove redundant error messages
Posted by Chen Hanxiao 7 years, 1 month ago
From: Chen Hanxiao <chenhanxiao@gmail.com>

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

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
---
v2:
   remove extra error message in qemuConnectGetDomainCapabilities
   instead of virQEMUCapsCacheLookupByArch.

 src/qemu/qemu_driver.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dcd823f..0e06508 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18713,12 +18713,8 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
     } else {
         if (!(qemuCaps = virQEMUCapsCacheLookupByArch(caps,
                                                       driver->qemuCapsCache,
-                                                      arch))) {
-            virReportError(VIR_ERR_INVALID_ARG,
-                           _("unable to find any emulator to serve '%s' "
-                             "architecture"), virArchToString(arch));
+                                                      arch)))
             goto cleanup;
-        }
 
         emulatorbin = virQEMUCapsGetBinary(qemuCaps);
     }
-- 
2.7.4


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] cleanup: qemu_capabilities: remove redundant error messages
Posted by Michal Privoznik 7 years, 1 month ago
On 03/21/2017 12:58 PM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao@gmail.com>
>
> We reported error in caller virQEMUCapsCacheLookupByArch.
> So the same error messages in qemuConnectGetDomainCapabilities
> is useless.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
> ---
> v2:
>    remove extra error message in qemuConnectGetDomainCapabilities
>    instead of virQEMUCapsCacheLookupByArch.
>
>  src/qemu/qemu_driver.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

ACKed and pushed.

Michal

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