[libvirt] [PATCH] virmodule: Fix virModuleLoad stub

Michal Privoznik posted 1 patch 5 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/19e9d92b27abe210d54e617069fc80caa2af013e.1531649529.git.mprivozn@redhat.com
Test syntax-check failed
src/util/virmodule.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] virmodule: Fix virModuleLoad stub
Posted by Michal Privoznik 5 years, 8 months ago
When building without dlfcn.h we are providing a virModuleLoad()
stub which is supposed to report an error. However, the format
string in virReportSystemError() call there requires two strings
but we are passing just one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under build breaker and trivial rules.

 src/util/virmodule.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virmodule.c b/src/util/virmodule.c
index b19a787e4f..533cfefc77 100644
--- a/src/util/virmodule.c
+++ b/src/util/virmodule.c
@@ -142,14 +142,14 @@ virModuleLoad(const char *path,
 
 #else /* ! HAVE_DLFCN_H */
 int
-virModuleLoad(const char *path ATTRIBUTE_UNUSED,
+virModuleLoad(const char *path,
               const char *regfunc ATTRIBUTE_UNUSED,
               bool required)
 {
     VIR_DEBUG("dlopen not available on this platform");
     if (required) {
         virReportSystemError(ENOSYS,
-                             _("Failed to find module '%s': %s"), path);
+                             _("Failed to find module '%s'"), path);
         return -1;
     } else {
         /* Since we have no dlopen(), but definition we have no
-- 
2.16.4

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