[libvirt PATCH] util: fix prototype of virDaemonSetupLogging

Ján Tomko posted 1 patch 2 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/2a9264b8b25e5cd9e54196ebf06a11f6d8846823.1641399651.git.jtomko@redhat.com
src/util/virdaemon.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
[libvirt PATCH] util: fix prototype of virDaemonSetupLogging
Posted by Ján Tomko 2 years, 2 months ago
The commit that added error checking to this function
forgot to adjust the WIN32 stub.

Fixes: a873924e36b28c5b125621e35b32beb6b077bcc8
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
Pushed as a build fix.

 src/util/virdaemon.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c
index 5c0ca534cf..00bd7095f6 100644
--- a/src/util/virdaemon.c
+++ b/src/util/virdaemon.c
@@ -275,17 +275,17 @@ int virDaemonForkIntoBackground(const char *argv0 G_GNUC_UNUSED)
     return -1;
 }
 
-void virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
-                           unsigned int log_level G_GNUC_UNUSED,
-                           char *log_filters G_GNUC_UNUSED,
-                           char *log_outputs G_GNUC_UNUSED,
-                           bool privileged G_GNUC_UNUSED,
-                           bool verbose G_GNUC_UNUSED,
-                           bool godaemon G_GNUC_UNUSED)
+int virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
+                          unsigned int log_level G_GNUC_UNUSED,
+                          char *log_filters G_GNUC_UNUSED,
+                          char *log_outputs G_GNUC_UNUSED,
+                          bool privileged G_GNUC_UNUSED,
+                          bool verbose G_GNUC_UNUSED,
+                          bool godaemon G_GNUC_UNUSED)
 {
     /* NOOP */
     errno = ENOTSUP;
-    return;
+    return -1;
 }
 
 int virDaemonUnixSocketPaths(const char *sock_prefix G_GNUC_UNUSED,
-- 
2.31.1

Re: [libvirt PATCH] util: fix prototype of virDaemonSetupLogging
Posted by Martin Kletzander 2 years, 2 months ago
On Wed, Jan 05, 2022 at 05:21:11PM +0100, Ján Tomko wrote:
>The commit that added error checking to this function
>forgot to adjust the WIN32 stub.
>
>Fixes: a873924e36b28c5b125621e35b32beb6b077bcc8
>Signed-off-by: Ján Tomko <jtomko@redhat.com>
>---
>Pushed as a build fix.
>

Oops, thanks.

> src/util/virdaemon.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c
>index 5c0ca534cf..00bd7095f6 100644
>--- a/src/util/virdaemon.c
>+++ b/src/util/virdaemon.c
>@@ -275,17 +275,17 @@ int virDaemonForkIntoBackground(const char *argv0 G_GNUC_UNUSED)
>     return -1;
> }
>
>-void virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
>-                           unsigned int log_level G_GNUC_UNUSED,
>-                           char *log_filters G_GNUC_UNUSED,
>-                           char *log_outputs G_GNUC_UNUSED,
>-                           bool privileged G_GNUC_UNUSED,
>-                           bool verbose G_GNUC_UNUSED,
>-                           bool godaemon G_GNUC_UNUSED)
>+int virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
>+                          unsigned int log_level G_GNUC_UNUSED,
>+                          char *log_filters G_GNUC_UNUSED,
>+                          char *log_outputs G_GNUC_UNUSED,
>+                          bool privileged G_GNUC_UNUSED,
>+                          bool verbose G_GNUC_UNUSED,
>+                          bool godaemon G_GNUC_UNUSED)
> {
>     /* NOOP */
>     errno = ENOTSUP;
>-    return;
>+    return -1;
> }
>
> int virDaemonUnixSocketPaths(const char *sock_prefix G_GNUC_UNUSED,
>-- 
>2.31.1
>