[PATCH] virt-host-validate-bhyve.c: Reintroduce @ret to virHostValidateBhyve()

Michal Privoznik posted 1 patch 3 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/8366030afcbf7d954f384c23630f3ef7c51c4f37.1588682331.git.mprivozn@redhat.com
tools/virt-host-validate-bhyve.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] virt-host-validate-bhyve.c: Reintroduce @ret to virHostValidateBhyve()
Posted by Michal Privoznik 3 years, 10 months ago
This partially reverts fe65e9c8b50c9029cba0e8c386162d293cd443d2.

In the referenced commit I removed @ret from
virHostValidateBhyve() thinking it wasn't used when in fact it is
- it's usage is hidden under MODULE_STATUS_WARN(). Reintroduce
the variable back.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tools/virt-host-validate-bhyve.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bhyve.c
index 3e8cc59a38..2f0ec1e36c 100644
--- a/tools/virt-host-validate-bhyve.c
+++ b/tools/virt-host-validate-bhyve.c
@@ -47,6 +47,7 @@
 
 int virHostValidateBhyve(void)
 {
+    int ret = 0;
     int fileid = 0;
     struct kld_file_stat stat;
     bool vmm_loaded = false, if_tap_loaded = false;
@@ -72,5 +73,5 @@ int virHostValidateBhyve(void)
     MODULE_STATUS_WARN(if_bridge, "bridged networking will not work");
     MODULE_STATUS_WARN(nmdm, "nmdm console will not work");
 
-    return 0;
+    return ret;
 }
-- 
2.26.2

Re: [PATCH] virt-host-validate-bhyve.c: Reintroduce @ret to virHostValidateBhyve()
Posted by Daniel P. Berrangé 3 years, 10 months ago
On Tue, May 05, 2020 at 02:39:00PM +0200, Michal Privoznik wrote:
> This partially reverts fe65e9c8b50c9029cba0e8c386162d293cd443d2.
> 
> In the referenced commit I removed @ret from
> virHostValidateBhyve() thinking it wasn't used when in fact it is
> - it's usage is hidden under MODULE_STATUS_WARN(). Reintroduce
> the variable back.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  tools/virt-host-validate-bhyve.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|