]> xenbits.xensource.com Git - libvirt.git/commitdiff
logging: move virLogHandler to header
authorOleg Vasilev <oleg.vasilev@virtuozzo.com>
Mon, 30 Jan 2023 14:59:59 +0000 (20:59 +0600)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 6 Feb 2023 14:28:51 +0000 (15:28 +0100)
Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/logging/log_handler.c
src/logging/log_handler.h

index 7342404b0036c7020d48b1f69324257d43d2cefc..8fc7e9b2a8989cb311546b04f59f4d7d747ebdcc 100644 (file)
 
 #include "log_handler.h"
 #include "virerror.h"
-#include "virobject.h"
 #include "virfile.h"
 #include "viralloc.h"
 #include "virlog.h"
-#include "virrotatingfile.h"
 #include "viruuid.h"
 #include "virutil.h"
 
@@ -42,30 +40,6 @@ VIR_LOG_INIT("logging.log_handler");
 
 #define DEFAULT_MODE 0600
 
-typedef struct _virLogHandlerLogFile virLogHandlerLogFile;
-struct _virLogHandlerLogFile {
-    virRotatingFileWriter *file;
-    int watch;
-    int pipefd; /* Read from QEMU via this */
-    bool drained;
-
-    char *driver;
-    unsigned char domuuid[VIR_UUID_BUFLEN];
-    char *domname;
-};
-
-struct _virLogHandler {
-    virObjectLockable parent;
-
-    bool privileged;
-    virLogDaemonConfig *config;
-
-    virLogHandlerLogFile **files;
-    size_t nfiles;
-
-    virLogHandlerShutdownInhibitor inhibitor;
-    void *opaque;
-};
 
 static virClass *virLogHandlerClass;
 static void virLogHandlerDispose(void *obj);
index c9af033cd3b86f560af9ddf6f83e2a28034b4869..d473a19fc6c4e143a6c0cff687e31d8047f583f8 100644 (file)
 #include "internal.h"
 #include "virjson.h"
 #include "log_daemon_config.h"
+#include "virobject.h"
+#include "virrotatingfile.h"
+
+typedef void (*virLogHandlerShutdownInhibitor)(bool inhibit,
+                                               void *opaque);
+
+typedef struct _virLogHandlerLogFile virLogHandlerLogFile;
+struct _virLogHandlerLogFile {
+    virRotatingFileWriter *file;
+    int watch;
+    int pipefd; /* Read from QEMU via this */
+    bool drained;
+
+    char *driver;
+    unsigned char domuuid[VIR_UUID_BUFLEN];
+    char *domname;
+};
 
 typedef struct _virLogHandler virLogHandler;
+struct _virLogHandler {
+    virObjectLockable parent;
 
+    bool privileged;
+    virLogDaemonConfig *config;
 
-typedef void (*virLogHandlerShutdownInhibitor)(bool inhibit,
-                                               void *opaque);
+    virLogHandlerLogFile **files;
+    size_t nfiles;
+
+    virLogHandlerShutdownInhibitor inhibitor;
+    void *opaque;
+};
 
 virLogHandler *virLogHandlerNew(bool privileged,
                                 virLogDaemonConfig *config,