[libvirt] [PATCH RFC 22/27] maint: Fix messy include of libvirt_internal.h

Peter Krempa pkrempa at redhat.com
Mon Dec 16 16:32:50 UTC 2013


The libvirt_internal.h header was included by the internal.h header.
This made it painful to add new stuff to the header file that would
require some more specific types. Remove inclusion by internal.h and add
it to appropriate places manually.
---
 src/driver.h           | 1 +
 src/internal.h         | 2 --
 src/libxl/libxl_conf.h | 1 +
 src/lxc/lxc_conf.h     | 1 +
 src/uml/uml_conf.h     | 1 +
 5 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index b6927ea..5f4cd8d 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -25,6 +25,7 @@
 # include <unistd.h>

 # include "internal.h"
+# include "libvirt_internal.h"
 # include "viruri.h"
 /*
  * List of registered drivers numbers
diff --git a/src/internal.h b/src/internal.h
index 5e29694..b7c3519 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -60,8 +60,6 @@
 # include "libvirt/libvirt-qemu.h"
 # include "libvirt/virterror.h"

-# include "libvirt_internal.h"
-
 # include "c-strcase.h"
 # include "ignore-value.h"

diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index ffa93bd..3ab8f20 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -29,6 +29,7 @@
 # include <libxl.h>

 # include "internal.h"
+# include "libvirt_internal.h"
 # include "domain_conf.h"
 # include "domain_event.h"
 # include "capabilities.h"
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index f6cbfc9..e04dcdd 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -26,6 +26,7 @@
 # define LXC_CONF_H

 # include "internal.h"
+# include "libvirt_internal.h"
 # include "domain_conf.h"
 # include "domain_event.h"
 # include "capabilities.h"
diff --git a/src/uml/uml_conf.h b/src/uml/uml_conf.h
index c23a177..a914be0 100644
--- a/src/uml/uml_conf.h
+++ b/src/uml/uml_conf.h
@@ -25,6 +25,7 @@
 # define __UML_CONF_H

 # include "internal.h"
+# include "libvirt_internal.h"
 # include "capabilities.h"
 # include "network_conf.h"
 # include "domain_conf.h"
-- 
1.8.5.1




More information about the libvir-list mailing list