[PATCH v3 2/5] logging: move virLogHandler to header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oleg Vasilev <oleg.vasilev@xxxxxxxxxxxxx>
---
 src/logging/log_handler.c | 26 --------------------------
 src/logging/log_handler.h | 31 ++++++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c
index 7342404b00..8fc7e9b2a8 100644
--- a/src/logging/log_handler.c
+++ b/src/logging/log_handler.c
@@ -22,11 +22,9 @@
 
 #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);
diff --git a/src/logging/log_handler.h b/src/logging/log_handler.h
index c9af033cd3..d473a19fc6 100644
--- a/src/logging/log_handler.h
+++ b/src/logging/log_handler.h
@@ -23,13 +23,38 @@
 #include "internal.h"
 #include "virjson.h"
 #include "log_daemon_config.h"
-
-typedef struct _virLogHandler virLogHandler;
-
+#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;
+
+    virLogHandlerLogFile **files;
+    size_t nfiles;
+
+    virLogHandlerShutdownInhibitor inhibitor;
+    void *opaque;
+};
+
 virLogHandler *virLogHandlerNew(bool privileged,
                                 virLogDaemonConfig *config,
                                 virLogHandlerShutdownInhibitor inhibitor,
-- 
2.39.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux