]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix many mistakes & inconsistencies in header file layout
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 13 Dec 2018 13:32:06 +0000 (13:32 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 14 Dec 2018 10:46:53 +0000 (10:46 +0000)
This introduces a syntax-check script that validates header files use a
common layout:

  /*
   ...copyright header...
   */
  <one blank line>
  #ifndef SYMBOL
  # define SYMBOL
  ....content....
  #endif /* SYMBOL */

For any file ending priv.h, before the #ifndef, we will require a
guard to prevent bogus imports:

  #ifndef SYMBOL_ALLOW
  # error ....
  #endif /* SYMBOL_ALLOW */
  <one blank line>

The many mistakes this script identifies are then fixed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
146 files changed:
build-aux/header-ifdef.pl [new file with mode: 0644]
cfg.mk
src/bhyve/bhyve_capabilities.h
src/bhyve/bhyve_parse_command.h
src/conf/domain_event.h
src/conf/domain_nwfilter.h
src/conf/netdev_vlan_conf.h
src/conf/network_event.h
src/conf/node_device_event.h
src/conf/nwfilter_conf.h
src/conf/nwfilter_params.h
src/conf/object_event.h
src/conf/object_event_private.h
src/conf/secret_conf.h
src/conf/secret_event.h
src/conf/storage_event.h
src/conf/virchrdev.h
src/conf/virnwfilterbindingdef.h
src/conf/virnwfilterbindingobj.h
src/conf/virnwfilterobj.h
src/conf/virsavecookie.h
src/datatypes.h
src/interface/interface_driver.h
src/internal.h
src/libvirt_internal.h
src/libxl/libxl_migration.h
src/locking/lock_daemon_config.h
src/logging/log_daemon_config.h
src/logging/log_handler.h
src/logging/log_manager.h
src/lxc/lxc_domain.h
src/network/bridge_driver.h
src/node_device/node_device_udev.h
src/nwfilter/nwfilter_ebiptables_driver.h
src/nwfilter/nwfilter_gentech_driver.h
src/openvz/openvz_driver.h
src/openvz/openvz_util.h
src/qemu/qemu_agent.h
src/qemu/qemu_alias.h
src/qemu/qemu_capabilities.h
src/qemu/qemu_capspriv.h
src/qemu/qemu_command.h
src/qemu/qemu_domain_address.h
src/qemu/qemu_extdevice.h
src/qemu/qemu_hotplug.c
src/qemu/qemu_hotplugpriv.h
src/qemu/qemu_migration_params.c
src/qemu/qemu_migration_paramspriv.h
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.h
src/qemu/qemu_monitor_priv.h
src/qemu/qemu_monitor_text.h
src/qemu/qemu_parse_command.h
src/qemu/qemu_process.c
src/qemu/qemu_processpriv.h
src/qemu/qemu_tpm.h
src/remote/remote_daemon.h
src/remote/remote_daemon_stream.h
src/rpc/virnetlibsshsession.h
src/rpc/virnetserverservice.h
src/rpc/virnetsshsession.h
src/rpc/virnettlscontext.h
src/security/security_apparmor.h
src/security/security_dac.h
src/security/security_driver.h
src/security/security_selinux.h
src/security/security_stack.h
src/storage/storage_backend_iscsi_direct.h
src/storage/storage_backend_sheepdog.c
src/storage/storage_backend_sheepdog_priv.h
src/uml/uml_driver.h
src/util/viralloc.h
src/util/viratomic.h
src/util/viraudit.h
src/util/virbitmap.h
src/util/vircgrouppriv.h
src/util/vircommandpriv.h
src/util/virdbus.c
src/util/virdbuspriv.h
src/util/virebtables.h
src/util/virerror.h
src/util/vireventpoll.h
src/util/virfcp.h
src/util/virfdstream.h
src/util/virfile.h
src/util/virfirewallpriv.h
src/util/virgettext.h
src/util/virhash.h
src/util/virhostcpu.c
src/util/virhostcpu.h
src/util/virhostcpupriv.h
src/util/virhostmem.h
src/util/virinitctl.h
src/util/viriscsi.h
src/util/virjson.h
src/util/virkeycode.h
src/util/virlease.h
src/util/virlog.h
src/util/virmacmap.h
src/util/virnetdevvlan.h
src/util/virnodesuspend.h
src/util/virobject.h
src/util/virqemu.h
src/util/virresctrl.c
src/util/virresctrl.h
src/util/virresctrlpriv.h
src/util/virsexpr.h
src/util/virsysinfopriv.h
src/util/virsystemdpriv.h
src/util/virthread.h
src/util/virthreadjob.h
src/util/virthreadpool.h
src/util/virtime.h
src/util/virtpm.h
src/util/virtypedparam.h
src/util/virvhba.h
src/util/virxml.h
src/vbox/vbox_driver.h
src/vbox/vbox_snapshot_conf.h
src/vmware/vmware_conf.h
src/vmware/vmware_driver.h
src/vz/vz_driver.h
src/vz/vz_sdk.h
src/vz/vz_utils.h
src/xenapi/xenapi_driver.h
src/xenapi/xenapi_driver_private.h
tests/qemuhotplugtest.c
tests/qemumigparamstest.c
tests/qemumonitorjsontest.c
tests/qemumonitortestutils.c
tests/storagebackendsheepdogtest.c
tests/testutilshostcpus.h
tests/testutilslxc.h
tests/testutilsqemu.h
tests/testutilsqemuschema.h
tests/testutilsxen.h
tests/virdbustest.c
tests/virfilewrapper.h
tests/virfirewalltest.c
tests/virhashdata.h
tests/virhostcputest.c
tests/virnettlshelpers.h
tests/virresctrltest.c
tools/virsh-completer.h
tools/virt-admin-completer.h
tools/wireshark/src/packet-libvirt.h

diff --git a/build-aux/header-ifdef.pl b/build-aux/header-ifdef.pl
new file mode 100644 (file)
index 0000000..48a2bd4
--- /dev/null
@@ -0,0 +1,149 @@
+#!/usr/bin/perl
+#
+# Validate that header files follow a standard layout:
+#
+# /*
+#  ...copyright header...
+#  */
+# <one blank line>
+# #ifndef SYMBOL
+# # define SYMBOL
+# ....content....
+# #endif /* SYMBOL */
+#
+# For any file ending priv.h, before the #ifndef
+# We will have a further section
+#
+# #ifndef SYMBOL_ALLOW
+# # error ....
+# #endif /* SYMBOL_ALLOW */
+# <one blank line>
+
+use strict;
+use warnings;
+
+my $STATE_COPYRIGHT_COMMENT = 0;
+my $STATE_COPYRIGHT_BLANK = 1;
+my $STATE_PRIV_START = 2;
+my $STATE_PRIV_ERROR = 3;
+my $STATE_PRIV_END = 4;
+my $STATE_PRIV_BLANK = 5;
+my $STATE_GUARD_START = 6;
+my $STATE_GUARD_DEFINE = 7;
+my $STATE_GUARD_END = 8;
+my $STATE_EOF = 9;
+
+my $file = " ";
+my $ret = 0;
+my $ifdef = "";
+my $ifdefpriv = "";
+
+my $state = $STATE_EOF;
+my $mistake = 0;
+
+sub mistake {
+    my $msg = shift;
+    warn $msg;
+    $mistake = 1;
+    $ret = 1;
+}
+
+while (<>) {
+    if (not $file eq $ARGV) {
+        if ($state == $STATE_COPYRIGHT_COMMENT) {
+            &mistake("$file: missing copyright comment");
+        } elsif ($state == $STATE_COPYRIGHT_BLANK) {
+            &mistake("$file: missing blank line after copyright header");
+        } elsif ($state == $STATE_PRIV_START) {
+            &mistake("$file: missing '#ifndef $ifdefpriv'");
+        } elsif ($state == $STATE_PRIV_ERROR) {
+            &mistake("$file: missing '# error ...priv allow...'");
+        } elsif ($state == $STATE_PRIV_END) {
+            &mistake("$file: missing '#endif /* $ifdefpriv */'");
+        } elsif ($state == $STATE_PRIV_BLANK) {
+            &mistake("$file: missing blank line after priv header check");
+        } elsif ($state == $STATE_GUARD_START) {
+            &mistake("$file: missing '#ifndef $ifdef'");
+        } elsif ($state == $STATE_GUARD_DEFINE) {
+            &mistake("$file: missing '# define $ifdef'");
+        } elsif ($state == $STATE_GUARD_END) {
+            &mistake("$file: missing '#endif /* $ifdef */'");
+        }
+
+        $file = $ARGV;
+        $state = $STATE_COPYRIGHT_COMMENT;
+        $mistake = 0;
+    }
+
+    if ($mistake ||
+        $ARGV eq "config-post.h" ||
+        $ARGV =~ /vbox_(CAPI|XPCOM)/) {
+        $state = $STATE_EOF;
+        next;
+    }
+
+    if ($state == $STATE_COPYRIGHT_COMMENT) {
+        if (m,\*/,) {
+            $state = $STATE_COPYRIGHT_BLANK;
+        }
+    } elsif ($state == $STATE_COPYRIGHT_BLANK) {
+        if (! /^$/) {
+            &mistake("$file: missing blank line after copyright header");
+        }
+        if ($ARGV =~ /priv\.h$/) {
+            $state = $STATE_PRIV_START;
+        } else {
+            $state = $STATE_GUARD_START;
+        }
+    } elsif ($state == $STATE_PRIV_START) {
+        if (/^$/) {
+            &mistake("$file: too many blank lines after coyright header");
+        } elsif (/#ifndef\s(.*ALLOW.*)/) {
+            $ifdefpriv = $1;
+            $state = $STATE_PRIV_ERROR;
+        } else {
+            &mistake("$file: missing '#ifndef SYMBOL_ALLOW'");
+        }
+    } elsif ($state == $STATE_PRIV_ERROR) {
+        if (/# error ".*"$/) {
+            $state = $STATE_PRIV_END;
+        } else {
+            &mistake("$file: missing '#error ...priv allow...'");
+        }
+    } elsif ($state == $STATE_PRIV_END) {
+        if (m,#endif /\* $ifdefpriv \*/,) {
+            $state = $STATE_PRIV_BLANK;
+        } else {
+            &mistake("$file: missing '#endif /* $ifdefpriv */'");
+        }
+    } elsif ($state == $STATE_PRIV_BLANK) {
+        if (! /^$/) {
+            &mistake("$file: missing blank line after priv guard");
+        }
+        $state = $STATE_GUARD_START;
+    } elsif ($state == $STATE_GUARD_START) {
+        if (/^$/) {
+            &mistake("$file: too many blank lines after coyright header");
+        } elsif (/#ifndef\s(.*)$/) {
+            $ifdef = $1;
+            $state = $STATE_GUARD_DEFINE;
+        } else {
+            &mistake("$file: missing '#ifndef SYMBOL'");
+        }
+    } elsif ($state == $STATE_GUARD_DEFINE) {
+        if (/# define $ifdef$/) {
+            $state = $STATE_GUARD_END;
+        } else {
+            &mistake("$file: missing '# define $ifdef'");
+        }
+    } elsif ($state == $STATE_GUARD_END) {
+        if (m,#endif /\* $ifdef \*/$,) {
+            $state = $STATE_EOF;
+        }
+    } elsif ($state == $STATE_EOF) {
+        die "$file: unexpected content after '#endif /* $ifdef */'";
+    } else {
+        die "$file: unexpected state $state";
+    }
+}
+exit $ret;
diff --git a/cfg.mk b/cfg.mk
index bd037ff3daf2935a0e7864d28a847ea80cddf6d6..c739edf604150e0711d2a427f124a98eb0c1339a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -1122,7 +1122,8 @@ _autogen_error:
 
 ifneq ($(_gl-Makefile),)
 syntax-check: spacing-check test-wrap-argv \
-       prohibit-duplicate-header mock-noinline group-qemu-caps
+       prohibit-duplicate-header mock-noinline group-qemu-caps \
+        header-ifdef
 endif
 
 # Don't include duplicate header in the source (either *.c or *.h)
@@ -1139,6 +1140,10 @@ mock-noinline:
        $(AM_V_GEN)files=`$(VC_LIST) | grep '\.[ch]$$'`; \
        $(PERL) $(top_srcdir)/build-aux/mock-noinline.pl $$files
 
+header-ifdef:
+       $(AM_V_GEN)files=`$(VC_LIST) | grep '\.[h]$$'`; \
+       $(PERL) $(top_srcdir)/build-aux/header-ifdef.pl $$files
+
 test-wrap-argv:
        $(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
        $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files
index 873bc9c12dbdb6c4e38a127df08d9bd2e16af0ba..9d3218127e953602e4426f5c6d1f0bcb5806aa7c 100644 (file)
@@ -55,4 +55,4 @@ typedef enum {
 int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
 int virBhyveProbeCaps(unsigned int *caps);
 
-#endif
+#endif /* _BHYVE_CAPABILITIES */
index 793685c338822a8393ad47da7e1f39e36431ca8b..236444e77728138a2af68c028d88a030e7b210d4 100644 (file)
@@ -25,4 +25,4 @@ virDomainDefPtr bhyveParseCommandLineString(const char* nativeConfig,
                                             unsigned caps,
                                             virDomainXMLOptionPtr xmlopt);
 
-#endif /* __BHYVE_PARSE_COMMAND_H__*/
+#endif /* __BHYVE_PARSE_COMMAND_H__ */
index 42669302727b356b3cf37e8e47b736435841c611..c70117526a25e0c39a88cc884aa72952e67a54cd 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "internal.h"
-
 #ifndef __DOMAIN_EVENT_H__
 # define __DOMAIN_EVENT_H__
 
+# include "internal.h"
 # include "object_event.h"
 # include "domain_conf.h"
 
@@ -325,4 +324,4 @@ virDomainQemuMonitorEventNew(int id,
                              const char *details)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
 
-#endif
+#endif /* __DOMAIN_EVENT_H__ */
index 8f1bcbacad45b856f21cf7198b89c7432ca8e662..4ab9fbbfa79ff3895532748567bab0292d61e62a 100644 (file)
@@ -18,6 +18,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef DOMAIN_NWFILTER_H
 # define DOMAIN_NWFILTER_H
 
index 4f21873aad2c6defbb2d20fec6d8989b2c6cb3ac..88667d47fa90ab13fd7967058ab201426b2cc7d2 100644 (file)
@@ -27,4 +27,4 @@
 int virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def);
 int virNetDevVlanFormat(const virNetDevVlan *def, virBufferPtr buf);
 
-#endif /* __VIR_NETDEV_VPORT_PROFILE_CONF_H__ */
+#endif /* __VIR_NETDEV_VLAN_CONF_H__ */
index 269475a3b1561f04cba2c329be4713580c595356..fb43a273591d805de52151a9e2df84e0aacd7928 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "internal.h"
-#include "object_event.h"
-#include "object_event_private.h"
-
 #ifndef __NETWORK_EVENT_H__
 # define __NETWORK_EVENT_H__
 
+# include "internal.h"
+# include "object_event.h"
+# include "object_event_private.h"
+
 int
 virNetworkEventStateRegisterID(virConnectPtr conn,
                                virObjectEventStatePtr state,
@@ -56,4 +56,4 @@ virNetworkEventLifecycleNew(const char *name,
                             int type,
                             int detail);
 
-#endif
+#endif /* __NETWORK_EVENT_H__ */
index 5a32d33abe5cf63c0f636c30765837f67ec61699..6c4fc50ef8e97ec00f7d14b2817398f3182543c7 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "internal.h"
-#include "object_event.h"
-#include "object_event_private.h"
-
 #ifndef __NODE_DEVICE_EVENT_H__
 # define __NODE_DEVICE_EVENT_H__
 
+# include "internal.h"
+# include "object_event.h"
+# include "object_event_private.h"
+
 int
 virNodeDeviceEventStateRegisterID(virConnectPtr conn,
                                   virObjectEventStatePtr state,
@@ -59,4 +59,4 @@ virNodeDeviceEventLifecycleNew(const char *name,
 virObjectEventPtr
 virNodeDeviceEventUpdateNew(const char *name);
 
-#endif
+#endif /* __NODE_DEVICE_EVENT_H__ */
index 9d94dd793733d744b724c03346f28aaed3a2e787..da70f0d80bc2df1ad9163ba71ab235cfaf90d091 100644 (file)
@@ -21,6 +21,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef NWFILTER_CONF_H
 # define NWFILTER_CONF_H
 
index c02ddd20a68ec37cd42c8e07efb054647b2931a5..762e94ed0fc845f218644721269f826fb9f81555 100644 (file)
@@ -18,6 +18,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef NWFILTER_PARAMS_H
 # define NWFILTER_PARAMS_H
 
index c1e87a2423f37c09dd0e12eab3329acc70ddcc06..ebded5ab7a278b476d9a61c12b0e72ce518dc2d4 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "internal.h"
-
-#include "virobject.h"
-
 #ifndef __OBJECT_EVENT_H__
 # define __OBJECT_EVENT_H__
 
+# include "internal.h"
+
+# include "virobject.h"
+
 /**
  * Dispatching domain events that come in while
  * in a call / response rpc
@@ -89,4 +89,4 @@ virObjectEventStateSetRemote(virConnectPtr conn,
                              int remoteID)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
-#endif
+#endif /* __OBJECT_EVENT_H__ */
index a45902827d85dc05945e94acf4bf3c8d316afea2..6f152906708c3720f71f18ff9d3bd4773da561d2 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "datatypes.h"
-
 #ifndef __OBJECT_EVENT_PRIVATE_H__
 # define __OBJECT_EVENT_PRIVATE_H__
 
+# include "datatypes.h"
+
 struct _virObjectMeta {
     int id;
     char *name;
@@ -106,4 +106,4 @@ virObjectEventNew(virClassPtr klass,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5)
     ATTRIBUTE_NONNULL(7);
 
-#endif
+#endif /* __OBJECT_EVENT_PRIVATE_H__ */
index 4b824e4023cf7efa966fce05b9c66a5719d2d532..d871ad7e9348c52b400a834986840aebc1c33d1e 100644 (file)
@@ -52,5 +52,4 @@ char *virSecretDefFormat(const virSecretDef *def);
                 (VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL  | \
                  VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE)
 
-
-#endif
+#endif /* __VIR_SECRET_CONF_H__ */
index 5fd52f3fd3d2ce0f9bee0502024c74d6d4638f86..3aa651c533a6782db7736d9b8b6adc0f665ad152 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "internal.h"
-#include "object_event.h"
-#include "object_event_private.h"
-
 #ifndef __SECRET_EVENT_H__
 # define __SECRET_EVENT_H__
 
+# include "internal.h"
+# include "object_event.h"
+# include "object_event_private.h"
+
 int
 virSecretEventStateRegisterID(virConnectPtr conn,
                               virObjectEventStatePtr state,
@@ -62,4 +62,4 @@ virSecretEventValueChangedNew(const unsigned char *uuid,
                               int usage_type,
                               const char *usage_id);
 
-#endif
+#endif /* __SECRET_EVENT_H__ */
index ea726911fa33d33cf4b508ad0c0137c972e682f4..936023584d3eaa789721c94a5bdcf0820d2cdba5 100644 (file)
  * <http://www.gnu.org/licenses/>.
 */
 
-#include "internal.h"
-#include "object_event.h"
-#include "object_event_private.h"
-
 #ifndef __STORAGE_EVENT_H__
 # define __STORAGE_EVENT_H__
 
+# include "internal.h"
+# include "object_event.h"
+# include "object_event_private.h"
+
 int
 virStoragePoolEventStateRegisterID(virConnectPtr conn,
                                    virObjectEventStatePtr state,
@@ -61,4 +61,4 @@ virObjectEventPtr
 virStoragePoolEventRefreshNew(const char *name,
                               const unsigned char *uuid);
 
-#endif
+#endif /* __STORAGE_EVENT_H__ */
index 652767583b24452521a07a99fdab1f65686aad7e..b9dac9b31d985d0abf524b0bfd0cf69f9192c276 100644 (file)
@@ -18,6 +18,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_CHRDEV_H__
 # define __VIR_CHRDEV_H__
 
@@ -32,4 +33,5 @@ void virChrdevFree(virChrdevsPtr devs);
 
 int virChrdevOpen(virChrdevsPtr devs, virDomainChrSourceDefPtr source,
                   virStreamPtr st, bool force);
-#endif /*__VIR_CHRDEV_H__*/
+
+#endif /* __VIR_CHRDEV_H__ */
index af7fab6064fa5f7180f88f530b4f201afb52a083..8a78278beed0dcd2dcbeef79b781e5ba09c70ee6 100644 (file)
@@ -18,6 +18,7 @@
  * <http://www.gnu.org/licenses/>.
  *
  */
+
 #ifndef VIR_NWFILTER_BINDING_DEF_H
 # define VIR_NWFILTER_BINDING_DEF_H
 
index 21ae85b0646a2499031b239774418925aafdadbc..2455a44dd8d7b5d7fc3785a0d0a008a45024a397 100644 (file)
@@ -18,6 +18,7 @@
  * <http://www.gnu.org/licenses/>.
  *
  */
+
 #ifndef VIR_NWFILTER_BINDING_OBJ_H
 # define VIR_NWFILTER_BINDING_OBJ_H
 
index 4a54dd50dac4f6dd63ea571c6cada2e5ea5c0bb4..b047a7c88d94ef15a05bfddea9bab68017d0a6b9 100644 (file)
@@ -16,6 +16,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef VIRNWFILTEROBJ_H
 # define VIRNWFILTEROBJ_H
 
index 4aed18466c786865f0b0db2b18af2edd4f796c6c..c225c8d0bcf600f071056bd39308fda0fd2e2b08 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_SAVE_COOKIE_H__
 # define __VIR_SAVE_COOKIE_H__
 
@@ -59,4 +60,4 @@ char *
 virSaveCookieFormat(virObjectPtr obj,
                     virSaveCookieCallbacksPtr saveCookie);
 
-#endif /*__VIR_SAVE_COOKIE_H__ */
+#endif /* __VIR_SAVE_COOKIE_H__ */
index e1b38706dcd38e520b25585abfc3c46764bcddfa..08f1e033bb0a0184a2b3bc632f91b202e6f6255d 100644 (file)
@@ -777,4 +777,4 @@ int virAdmConnectCloseCallbackDataRegister(virAdmConnectCloseCallbackDataPtr cbd
 int virAdmConnectCloseCallbackDataUnregister(virAdmConnectCloseCallbackDataPtr cbdata,
                                              virAdmConnectCloseFunc cb);
 
-#endif /* __VIR_DATATYPES_H__ */
+#endif /* __VIR_DATATYPES_H_ */
index 59d85648016e8c8a2089a20b2c10ddc0be568eff..575f297953f91d58b72307461f85f9907423fdf6 100644 (file)
@@ -18,7 +18,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __VIR_INTERFACE__DRIVER_H
 # define __VIR_INTERFACE__DRIVER_H
 
index d30d5da499e9a4bbd8d9e989603d1af0528de304..fb2b56b662da4051e34ab6db6a4a8ccb81c0c6b6 100644 (file)
@@ -513,4 +513,4 @@ enum {
 #  define ENODATA EIO
 # endif
 
-#endif                          /* __VIR_INTERNAL_H__ */
+#endif /* __VIR_INTERNAL_H__ */
index 0e008a65518d0f13214092ad1aaaa8d31d6a91c5..5d60f2654db0d64d4f8bfa5768576e2282c64363 100644 (file)
@@ -298,4 +298,4 @@ int virStreamInData(virStreamPtr stream,
                     int *data,
                     long long *length);
 
-#endif
+#endif /* __LIBVIRT_H_ */
index db5cdfcd03185d3c4b7153c263badf8778422b65..954968deef1da63334fecd80254788b203896d15 100644 (file)
@@ -98,4 +98,4 @@ libxlDomainMigrationSrcConfirm(libxlDriverPrivatePtr driver,
                                unsigned int flags,
                                int cancelled);
 
-#endif /* LIBXL_DRIVER_H */
+#endif /* LIBXL_MIGRATION_H */
index 9b2a8c2ebb77d16d4001fd8cb8b61d1ce970b49b..cda71311f59b62e8e55e0545376ff5b9d631d7c7 100644 (file)
@@ -43,4 +43,4 @@ int virLockDaemonConfigLoadFile(virLockDaemonConfigPtr data,
                                 const char *filename,
                                 bool allow_missing);
 
-#endif /* __LIBVIRTD_CONFIG_H__ */
+#endif /* __VIR_LOCK_DAEMON_CONFIG_H__ */
index 35914fc4efd1648463eba8a4c10e3f106fd89659..12610ba7acc429cefc0a47b4a652199a4131145a 100644 (file)
@@ -46,4 +46,4 @@ int virLogDaemonConfigLoadFile(virLogDaemonConfigPtr data,
                                const char *filename,
                                bool allow_missing);
 
-#endif /* __LIBVIRTD_CONFIG_H__ */
+#endif /* __VIR_LOG_DAEMON_CONFIG_H__ */
index 16bcd0df654ae3956697420e639458a6615714c8..670504bec48d7ee4664892ff1269abf293c57875 100644 (file)
@@ -77,4 +77,4 @@ int virLogHandlerDomainAppendLogFile(virLogHandlerPtr handler,
 
 virJSONValuePtr virLogHandlerPreExecRestart(virLogHandlerPtr handler);
 
-#endif /** __VIR_LOG_HANDLER_H__ */
+#endif /* __VIR_LOG_HANDLER_H__ */
index 0f3d55a5f0c498ecd1b8cd127d5cd6763bb43e50..a16f3b198908f1aec9da4430142733faf0182b59 100644 (file)
@@ -18,7 +18,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __VIR_LOG_MANAGER_H__
 # define __VIR_LOG_MANAGER_H__
 
index b248cdfd6f34eb7977190393d48e584c296d7cbd..77ec523a636345057f87e4ec9a8e080bc2f0eaa8 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __LXC_DOMAIN_H__
 # define __LXC_DOMAIN_H__
 
index dff37930d38f07a3ec0edbd79e0d07366be69782..5d621521cb479329b9d8c154ef578fb9f6f6b9e0 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __VIR_NETWORK__DRIVER_H
 # define __VIR_NETWORK__DRIVER_H
 
index af877160cd34f62ab7a77b7752cc2fb8822a92a9..79e7278cc6fd10369d709ced1958d89ea771cf87 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include <libudev.h>
+#ifndef __NODE_DEVICE_UDEV_H__
+# define __NODE_DEVICE_UDEV_H__
 
-#define SYSFS_DATA_SIZE 4096
-#define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
-#define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
+# include <libudev.h>
+
+# define SYSFS_DATA_SIZE 4096
+# define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
+# define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
+
+#endif /* __NODE_DEVICE_UDEV_H__ */
index 2b6b74277f54a69574b3267f6659bf767c6e10be..a8e696aa375fb3d7292bed88710d98b67096915d 100644 (file)
@@ -18,6 +18,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef VIR_NWFILTER_EBTABLES_DRIVER_H__
 # define VIR_NWFILTER_EBTABLES_DRIVER_H__
 
@@ -31,4 +32,4 @@ extern virNWFilterTechDriver ebiptables_driver;
 
 # define IPTABLES_MAX_COMMENT_LENGTH  256
 
-#endif
+#endif /* VIR_NWFILTER_EBTABLES_DRIVER_H__ */
index 57ce5d05ec42fda6aeabc8511f47e3bba991f225..71a8cad938723134e82823a8fd6a30f009305304 100644 (file)
@@ -19,6 +19,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __NWFILTER_GENTECH_DRIVER_H
 # define __NWFILTER_GENTECH_DRIVER_H
 
@@ -55,4 +56,4 @@ virHashTablePtr virNWFilterCreateVarHashmap(const char *macaddr,
 int virNWFilterBuildAll(virNWFilterDriverStatePtr driver,
                         bool newFilters);
 
-#endif
+#endif /* __NWFILTER_GENTECH_DRIVER_H */
index d78a877c51f03e130157d751c28465d929573e03..68d2c1f03cb6b23c71407787a421e41cdb53e8ab 100644 (file)
@@ -20,7 +20,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef OPENVZ_DRIVER_H
 # define OPENVZ_DRIVER_H
 
@@ -38,4 +37,4 @@
 
 int openvzRegister(void);
 
-#endif
+#endif /* OPENVZ_DRIVER_H */
index 0c8d55ae291b69bb3d0e687262511d2c5df0b065..98d13ae336d60d3032a8cc21e4df74d8ab8997ab 100644 (file)
  *
  */
 
-
 #ifndef OPENVZ_UTIL_H
 # define OPENVZ_UTIL_H
 
 long openvzKBPerPages(void);
 char *openvzVEGetStringParam(virDomainPtr dom, const char *param);
 
-#endif
+#endif /* OPENVZ_UTIL_H */
index 219cb9e1dd1d35395e871c27883d323b4dcf0c7e..698b2e06396ac86160e99467654a5b4a29406ee0 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __QEMU_AGENT_H__
 # define __QEMU_AGENT_H__
 
index 441cb16bc1dbdd30a025d0ac3d465b141f33a442..4afa6f1256cda80c85ce226054f0a70a76bd55f3 100644 (file)
@@ -97,4 +97,4 @@ const char *qemuDomainGetManagedPRAlias(void);
 
 char *qemuDomainGetUnmanagedPRAlias(const char *parentalias);
 
-#endif /* __QEMU_ALIAS_H__*/
+#endif /* __QEMU_ALIAS_H__ */
index 2a3057e24980b63e894b4e58a50c6d51679a148d..e19b9d070f7c546db2c958f8a5380782718ef246 100644 (file)
@@ -636,4 +636,4 @@ bool virQEMUCapsCPUFilterFeatures(const char *name,
 virSEVCapabilityPtr
 virQEMUCapsGetSEVCapabilities(virQEMUCapsPtr qemuCaps);
 
-#endif /* __QEMU_CAPABILITIES_H__*/
+#endif /* __QEMU_CAPABILITIES_H__ */
index 3262a63eae25ff63a312e42b21bf14a1ab86a1f8..b4183b5e66e03f9b6e2faff3287f68eec6dffda5 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef __QEMU_CAPSPRIV_H_ALLOW__
 # error "qemu_capspriv.h may only be included by qemu_capabilities.c or test suites"
-#endif
+#endif /* __QEMU_CAPSPRIV_H_ALLOW__ */
 
 #ifndef __QEMU_CAPSPRIV_H__
 # define __QEMU_CAPSPRIV_H__
@@ -98,4 +98,5 @@ virQEMUCapsSetMicrocodeVersion(virQEMUCapsPtr qemuCaps,
 
 void
 virQEMUCapsStripMachineAliases(virQEMUCapsPtr qemuCaps);
-#endif
+
+#endif /* __QEMU_CAPSPRIV_H__ */
index 2ee0633d6ce8a920378910e22fd8836a39b6ce37..c5bca612c129700c5d41528465d4c26c7d5639ab 100644 (file)
@@ -227,4 +227,4 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
     ATTRIBUTE_NONNULL(4);
 
-#endif /* __QEMU_COMMAND_H__*/
+#endif /* __QEMU_COMMAND_H__ */
index 62d92777bc66698f95177ea5dc8393e54034c257..0f360fcc49b904967d7072e217f04150b9d421ff 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #ifndef __QEMU_DOMAIN_ADDRESS_H__
+# define __QEMU_DOMAIN_ADDRESS_H__
 
 # include "domain_addr.h"
 # include "domain_conf.h"
@@ -65,6 +66,4 @@ int qemuDomainEnsureVirtioAddress(bool *releaseAddr,
                                   virDomainDeviceDefPtr dev,
                                   const char *devicename);
 
-# define __QEMU_DOMAIN_ADDRESS_H__
-
 #endif /* __QEMU_DOMAIN_ADDRESS_H__ */
index f5d6945636060d344cdf56ad81234a6c0863518b..ad48dbba677656a535604071ce99adb73672d0b6 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __QEMU_EXTDEVICE_H__
 # define __QEMU_EXTDEVICE_H__
 
index 68d021afbbccd3459bc7928140526dc83694bea0..ca168995e16773beb963168c808fbfdc98b76b5a 100644 (file)
@@ -23,6 +23,7 @@
 #include <config.h>
 
 #include "qemu_hotplug.h"
+#define __QEMU_HOTPLUGPRIV_H_ALLOW__
 #include "qemu_hotplugpriv.h"
 #include "qemu_alias.h"
 #include "qemu_capabilities.h"
index c1653ee0d4fe8b5d95d3598c428aaf137d53c37c..22390137018a11fa87400f3e27ec99b884a0a0aa 100644 (file)
  *
  */
 
+#ifndef __QEMU_HOTPLUGPRIV_H_ALLOW__
+# error "qemu_hotplugpriv.h may only be included by qemu_hotplug.c or test suites"
+#endif /* __QEMU_HOTPLUGPRIV_H_ALLOW__ */
+
 #ifndef __QEMU_HOTPLUGPRIV_H__
 # define __QEMU_HOTPLUGPRIV_H__
 
index 9ecd2ab39d0b833ea6554c983761521c85d8e4eb..f34c3f6c0699eca6be966c9f60348f862ffb5b11 100644 (file)
@@ -30,6 +30,7 @@
 #include "qemu_hotplug.h"
 #include "qemu_migration.h"
 #include "qemu_migration_params.h"
+#define __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
 #include "qemu_migration_paramspriv.h"
 #include "qemu_monitor.h"
 
index 30773a679d951612d97c232b11da7edaba0a62a4..52f159125144d255060acb3bca95f8feaf75a0a1 100644 (file)
  *
  */
 
+#ifndef __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
+# error "qemu_migration_paramspriv.h may only be included by qemu_migration_params.c or test suites"
+#endif /* __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__ */
+
 #ifndef __QEMU_MIGRATION_PARAMSPRIV_H__
 # define __QEMU_MIGRATION_PARAMSPRIV_H__
 
index 5d30973a37411e95876df52aeca57ef2af8af158..95a21fde05db5cbc9d5603cc230bb1ce550cf476 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef QEMU_MONITOR_H
 # define QEMU_MONITOR_H
 
index a82814dde602745d930257874640563352adae9d..331419890bccd463526be8511ff4dab0ba11c13a 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef QEMU_MONITOR_JSON_H
 # define QEMU_MONITOR_JSON_H
 
index 45bda27c0fb34a8ea2d1eb77ab4fe9d9516ac852..6db3e3769f5c108d38b5c4206d7bf20f797e0b7d 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef __QEMU_MONITOR_PRIV_H_ALLOW__
 # error "qemu_monitor_priv.h may only be included by qemu_monitor.c or test suites"
-#endif
+#endif /* __QEMU_MONITOR_PRIV_H_ALLOW__ */
 
 #ifndef __QEMU_MONITOR_PRIV_H__
 # define __QEMU_MONITOR_PRIV_H__
@@ -28,4 +28,4 @@
 void
 qemuMonitorResetCommandID(qemuMonitorPtr mon);
 
-#endif
+#endif /* __QEMU_MONITOR_PRIV_H__ */
index 8b9a9caeb37a2bdf8d9d2fa8d045de2cb15c7e92..8ebdef67b6cd3e6f5935c581c0634e53029e2e80 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef QEMU_MONITOR_TEXT_H
 # define QEMU_MONITOR_TEXT_H
 
index ffada71f5813be76f274291a245a37e06275cd48..901b5b438f9dea016efb003e74de71cdcc09ffae 100644 (file)
@@ -57,4 +57,4 @@ qemuParseKeywords(const char *str,
                   int *retnkeywords,
                   int allowEmptyValue);
 
-#endif /* __QEMU_PARSE_COMMAND_H__*/
+#endif /* __QEMU_PARSE_COMMAND_H__ */
index 2f8e19d29d20ffe609ef8c290db4cec2a68b0a8d..6809522d36788870aa5b0bc76856e9f0f7118aed 100644 (file)
@@ -35,6 +35,7 @@
 #include <sys/utsname.h>
 
 #include "qemu_process.h"
+#define __QEMU_PROCESS_PRIV_H_ALLOW__
 #include "qemu_processpriv.h"
 #include "qemu_alias.h"
 #include "qemu_block.h"
index 782fcd52615063e3d6ce68e1824936ecb6a27edc..a7582558a9a4f074498389e78a3e5333fa1b3c66 100644 (file)
  *
  */
 
+#ifndef __QEMU_PROCESS_PRIV_H_ALLOW__
+# error "qemu_process_priv.h may only be included by qemu_process.c or test suites"
+#endif /* __QEMU_PROCESS_PRIV_H_ALLOW__ */
+
 #ifndef __QEMU_PROCESSPRIV_H__
 # define __QEMU_PROCESSPRIV_H__
 
index 93a45b9691310903ecd46cc39fbd8e9f35aafe89..acae9520aac31c4c46894b7f71ae3547a988f6fc 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __QEMU_TPM_H__
 # define __QEMU_TPM_H__
 
index 365a31c372c0b9f5f34e640fc06bf58f3f594e29..2184f9bda37227bb3432d179b4f1b8a77ad31f8b 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __REMOTE_DAEMON_H__
 # define __REMOTE_DAEMON_H__
 
index 2c1eeddb187fbfb93969640f3d3a0c55b19b0db8..55a483665ced3f563305215bf2bebfe96cefb7cb 100644 (file)
@@ -18,7 +18,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __REMOTE_DAEMON_STREAM_H__
 # define __REMOTE_DAEMON_STREAM_H__
 
index 4dcf398f539170122b19196fa94332733677a0fd..b8844dc3ad12bdf7f2ad7ca0db388c0dcfdc43fb 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_NET_LIBSSH_SESSION_H__
 # define __VIR_NET_LIBSSH_SESSION_H__
 
@@ -72,4 +73,4 @@ ssize_t virNetLibsshChannelWrite(virNetLibsshSessionPtr sess,
 
 bool virNetLibsshSessionHasCachedData(virNetLibsshSessionPtr sess);
 
-#endif /* ___VIR_NET_LIBSSH_SESSION_H_ */
+#endif /* __VIR_NET_LIBSSH_SESSION_H__ */
index 4a76704fb6447b3a6c446f7342694f62faac00a9..32371d979ec1ff84c8c24a8ab65284d284b8540a 100644 (file)
@@ -88,4 +88,4 @@ void virNetServerServiceToggle(virNetServerServicePtr svc,
 
 void virNetServerServiceClose(virNetServerServicePtr svc);
 
-#endif
+#endif /* __VIR_NET_SERVER_SERVICE_H__ */
index fa70ede414f65822b41d61f982f7c0ff9bb73704..faecb75064f60f162518c7f678a5c2fb196d5903 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_NET_SSH_SESSION_H__
 # define __VIR_NET_SSH_SESSION_H__
 
@@ -84,4 +85,4 @@ ssize_t virNetSSHChannelWrite(virNetSSHSessionPtr sess,
 
 bool virNetSSHSessionHasCachedData(virNetSSHSessionPtr sess);
 
-#endif /* ___VIR_NET_SSH_SESSION_H_ */
+#endif /* __VIR_NET_SSH_SESSION_H__ */
index 6100b45c396ede777be371ff064b556849f3360f..c20ea9a722b86e8ed3fa7a14cf034e33f3690126 100644 (file)
@@ -100,4 +100,4 @@ int virNetTLSSessionGetKeySize(virNetTLSSessionPtr sess);
 
 const char *virNetTLSSessionGetX509DName(virNetTLSSessionPtr sess);
 
-#endif
+#endif /* __VIR_NET_TLS_CONTEXT_H__ */
index f15238ab864a552cedcfdaa91e65051e26236f23..a3661a82ec5a84b7405b6cca1f0afab9e8ba2525 100644 (file)
@@ -15,6 +15,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_SECURITY_APPARMOR_H__
 # define __VIR_SECURITY_APPARMOR_H__
 
index 97681c96105d83f1ae01c10d2e13230afea1154e..adc549432862b64a6c3e2b16a882888dd191d8f5 100644 (file)
  * POSIX DAC security driver
  */
 
-#include "security_driver.h"
-
 #ifndef __VIR_SECURITY_DAC
 # define __VIR_SECURITY_DAC
 
+# include "security_driver.h"
+
 extern virSecurityDriver virSecurityDriverDAC;
 
 int virSecurityDACSetUserAndGroup(virSecurityManagerPtr mgr,
index 0de8826f31832e7bb10b8316ffd2b6c4ef6d738e..1969f7f089726be70bfbb8d44df651106433fcc6 100644 (file)
@@ -15,6 +15,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_SECURITY_H__
 # define __VIR_SECURITY_H__
 
index 5d02d79b47018f9d62147c5a7d253914256b2c9e..3d46289849cf82eba946a1a5049ae14f368aaf3b 100644 (file)
@@ -15,6 +15,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_SECURITY_SELINUX_H__
 # define __VIR_SECURITY_SELINUX_H__
 
index b38f9a94815dd10855c6d31340f4b978f8976eae..633182fdd846dd7f64930cda8758e8e905fce74a 100644 (file)
  * Stacked security driver
  */
 
-#include "security_driver.h"
-
 #ifndef __VIR_SECURITY_STACK
 # define __VIR_SECURITY_STACK
 
+# include "security_driver.h"
+
 extern virSecurityDriver virSecurityDriverStack;
 
 
index 545579daf79267014b37fb9810e7fd5d8385e7a8..eb56e857ec9842a13f7190953fb56fee7ffa4ac1 100644 (file)
@@ -1,3 +1,19 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
 #ifndef __VIR_STORAGE_BACKEND_ISCSI_H__
 # define __VIR_STORAGE_BACKEND_ISCSI_H__
 
index 484a587474eeac488a60b34797526cadfedbfdc0..96d825cc1da77d4fbbe767c90d33d8426c311b2c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "virerror.h"
 #include "storage_backend_sheepdog.h"
+#define __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__
 #include "storage_backend_sheepdog_priv.h"
 #include "storage_conf.h"
 #include "vircommand.h"
index e324ef6181836f2c465036779722ba9b324dc2a6..7dc2d7db3c954017158c5adadf1814e89a754444 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__
+# error "storage_backend_sheepdog_priv.h may only be included by storage_backend_sheepdog.c or test suites"
+#endif /* __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__ */
+
 #ifndef __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_H__
 # define __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_H__
 
index d31b3bda8ff016b4af4c1fe4887f7a100d2a6ede..8f877b49c51e1de191fa6e751599467ede20d9cc 100644 (file)
@@ -19,7 +19,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef UML_DRIVER_H
 # define UML_DRIVER_H
 
index ed72caaa135bb04afe6d8b62e2f9852dbfa65be6..9e45ab5f11dc9bcf14620e137c43244a43bcc9cf 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifndef __VIR_MEMORY_H_
 # define __VIR_MEMORY_H_
 
index febe401f770496bf2dc89f2c14a76ef4ba886a64..f63436fb6b23b43a864759768b7eb03f0e23a60b 100644 (file)
@@ -451,4 +451,4 @@ virAtomicIntXor(volatile unsigned int *atomic,
 
 # endif
 
-#endif /* __VIR_ATOMIC_H */
+#endif /* __VIR_ATOMIC_H__ */
index 478dc8408f4e26254a4ff89e2e89c10c0718d284..9e3fc897714f05e450dc86d9b498307ed4f4a3fe 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-
 #ifndef __LIBVIRT_AUDIT_H__
 # define __LIBVIRT_AUDIT_H__
 
index de16b43f63c681eb84387e5956fbfa4b373fb10d..4318db6766c18af72305e09a9267f2b7ab823767 100644 (file)
@@ -156,4 +156,4 @@ void virBitmapShrink(virBitmapPtr map, size_t b);
 
 VIR_DEFINE_AUTOPTR_FUNC(virBitmap, virBitmapFree)
 
-#endif
+#endif /* __BITMAP_H__ */
index b166b26eee452d642ad93f1a2f547723019860b9..0e615d3291aada72287cd64e82cb49088046c030 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__
 # error "vircgrouppriv.h may only be included by vircgroup.c or its test suite"
-#endif
+#endif /* __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__ */
 
 #ifndef __VIR_CGROUP_PRIV_H__
 # define __VIR_CGROUP_PRIV_H__
index 8930299d45f4d0578b0b048d4b1ce8c3e7724b29..a21643555af4b0be57d70c977343acb91133062a 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef __VIR_COMMAND_PRIV_H_ALLOW__
 # error "vircommandpriv.h may only be included by vircommand.c or test suites"
-#endif
+#endif /* __VIR_COMMAND_PRIV_H_ALLOW__ */
 
 #ifndef __VIR_COMMAND_PRIV_H__
 # define __VIR_COMMAND_PRIV_H__
index cb5371faef9e599c343e1a8e84ecf0066c5e4882..1c84b9c8bd72e22e70e288a9dbc69ef640a846be 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <config.h>
 
+#define __VIR_DBUS_PRIV_H_ALLOW__
 #include "virdbuspriv.h"
 #include "viralloc.h"
 #include "virerror.h"
index 74b395f70d9752d6cdb40420b0f048f7512ef453..5f97a4967681ba3aa98c265fc610e75ab09baf1d 100644 (file)
  *
  */
 
+#ifndef __VIR_DBUS_PRIV_H_ALLOW__
+# error "virdbuspriv.h may only be included by virdbus.c or test suites"
+#endif /* __VIR_DBUS_PRIV_H_ALLOW__ */
+
 #ifndef __VIR_DBUS_PRIV_H__
 # define __VIR_DBUS_PRIV_H__
 
index baca746f89b6314516a77bd586c0481fcc39ef28..b8cb584963fdf8feafafe9cbef14e29e2cafb3da 100644 (file)
@@ -38,4 +38,4 @@ int              ebtablesRemoveForwardAllowIn    (ebtablesContext *ctx,
 
 int              ebtablesAddForwardPolicyReject(ebtablesContext *ctx);
 
-#endif /* __QEMUD_ebtabLES_H__ */
+#endif /* __QEMUD_EBTABLES_H__ */
index 31577c5c8c6692c74f458cc7f77a3b6043a2e8a9..ff5bde9b10bad0811d1022c57bd40d501cab7491 100644 (file)
@@ -208,4 +208,4 @@ void virErrorRestore(virErrorPtr *savederr);
 
 VIR_DEFINE_AUTOPTR_FUNC(virError, virFreeError)
 
-#endif
+#endif /* __VIRT_ERROR_H_ */
index 720e72db8d815c1d9e93be44b4a4f6cd2236ba37..199a658c2eb6376368d388cb7cb7b2f5eaaef242 100644 (file)
@@ -127,4 +127,4 @@ int virEventPollToNativeEvents(int events);
 int virEventPollInterrupt(void);
 
 
-#endif /* __VIRTD_EVENT_H__ */
+#endif /* __VIR_EVENT_POLL_H__ */
index 3ca1eb177856afd85d3af68a6f738479089eddd7..fab6e9403b6ef53a1613e50c156f46d907e8cdf9 100644 (file)
@@ -29,4 +29,4 @@ virFCReadRportValue(const char *rport,
                     const char *entry,
                     char **result);
 
-#endif
+#endif /* __VIR_FCP_H__ */
index 887c991d69a66ae84021c42f1024080cc338be2a..905975ff1e272927ccc5be760b1b0af82f668e3e 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-
 #ifndef __VIR_FDSTREAM_H_
 # define __VIR_FDSTREAM_H_
 
index 0f7dece95874c37b517c33f16237c41cc0d526fd..795c339356c9b3e506455c9fef7b7059e96c2dd0 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-
 #ifndef __VIR_FILE_H_
 # define __VIR_FILE_H_
 
@@ -383,4 +382,4 @@ int virFileInData(int fd,
 
 VIR_DEFINE_AUTOPTR_FUNC(virFileWrapperFd, virFileWrapperFdFree)
 
-#endif /* __VIR_FILE_H */
+#endif /* __VIR_FILE_H_ */
index ab90bf37135bae331a4f735784551fa2a22af86d..1dca0c5e9aa87e5408a9be0cb3343b82dcb133d6 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifndef __VIR_FIREWALL_PRIV_H_ALLOW__
 # error "virfirewallpriv.h may only be included by virfirewall.c or test suites"
-#endif
+#endif /* __VIR_FIREWALL_PRIV_H_ALLOW__ */
 
 #ifndef __VIR_FIREWALL_PRIV_H__
 # define __VIR_FIREWALL_PRIV_H__
index 4584d8391c3312091f0099815c3585449470bd6d..5e9cfd2719fc0264fcbd00f73e904f05fb774a00 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_GETTEXT_H__
 # define __VIR_GETTEXT_H__
 
index a201b8910d786400ec9ccd01ac47b63f2629df47..811b6c5b210599680c9e06754e071c64d5d66c1f 100644 (file)
@@ -199,4 +199,4 @@ void virHashValueFree(void *value, const void *name);
 
 VIR_DEFINE_AUTOPTR_FUNC(virHashTable, virHashFree)
 
-#endif                          /* ! __VIR_HASH_H__ */
+#endif /* __VIR_HASH_H__ */
index 7200bab16f1b0a28c154a7726a598f9dbd046e5f..9e80c192ac8488ade01a918e85c3d0a7dc70e9da 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "c-ctype.h"
 #include "viralloc.h"
+#define __VIR_HOSTCPU_PRIV_H_ALLOW__
 #include "virhostcpupriv.h"
 #include "physmem.h"
 #include "virerror.h"
index 1d84dd72e5da09bc4c7477210a9aa94a8572cd0b..9107bb32ff240c2bc1f8a17313644716ca6cc7d6 100644 (file)
@@ -66,4 +66,4 @@ int virHostCPUGetOnline(unsigned int cpu, bool *online);
 
 unsigned int virHostCPUGetMicrocodeVersion(void);
 
-#endif /* __VIR_HOSTCPU_H__*/
+#endif /* __VIR_HOSTCPU_H__ */
index 5e7ae3b88ad35f4a6a755dcd81f73f201782b432..52ab4a9fe0c9be1b288db0078e80bfc94d8bc578 100644 (file)
  *
  */
 
+#ifndef __VIR_HOSTCPU_PRIV_H_ALLOW__
+# error "virhostcpupriv.h may only be included by virhostcpu.c or test suites"
+#endif /* __VIR_HOSTCPU_PRIV_H_ALLOW__ */
+
 #ifndef __VIR_HOSTCPU_PRIV_H__
 # define __VIR_HOSTCPU_PRIV_H__
 
index 0b713235b27d043b7739c1888e166f5239ffd468..c5a3853fdf62b3e05f2aff35de686aefd776f754 100644 (file)
@@ -55,4 +55,4 @@ int virHostMemAllocPages(unsigned int npages,
                          unsigned int cellCount,
                          bool add);
 
-#endif /* __VIR_HOSTMEM_H__*/
+#endif /* __VIR_HOSTMEM_H__ */
index b19742bf1e9f0ed8872e142cc753de84360faf5e..83170753da85e9740433a2d79eef59c2c1a0ed50 100644 (file)
@@ -35,4 +35,4 @@ typedef enum {
 
 int virInitctlSetRunLevel(virInitctlRunLevel level);
 
-#endif
+#endif /* __VIR_INITCTL_H__ */
index 4da9becfb2a72775195154333f2868872dbd6349..3fbf90663766c07667f0ec9989ea53d57d8d9d26 100644 (file)
@@ -68,4 +68,5 @@ virISCSINodeUpdate(const char *portal,
                    const char *value)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
     ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
-#endif
+
+#endif /* __VIR_ISCSI_H__ */
index 75f7f17b443c18732ba1bc880e008734eb8669a3..804cc0ce95407b2628d4aedbcf7fbf71d97eede3 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifndef __VIR_JSON_H_
 # define __VIR_JSON_H_
 
index 6947cfe913073d576155d4e25e7e12207567023a..106dae7a08788afe8f7553a37c756b77a84433c5 100644 (file)
@@ -30,4 +30,4 @@ int virKeycodeValueTranslate(virKeycodeSet from_codeset,
                         virKeycodeSet to_offset,
                         int key_value);
 
-#endif
+#endif /* __VIR_UTIL_VIRTKEYCODE_H__ */
index b9f394e9aa4c7a52073ed53d5e752dff3aeea2fd..9f151aed74b586c8d17661d632542e0f139503d9 100644 (file)
@@ -41,4 +41,5 @@ int virLeaseNew(virJSONValuePtr *lease_ret,
                 const char *hostname,
                 const char *iaid,
                 const char *server_duid);
-#endif /* __VIR_LEASE_H */
+
+#endif /* __VIR_LEASE_H_ */
index 35dba16cfe7591f40c54dcef690054da1c19966f..1155d35663e42001c8e37428ed720edf7ef0557b 100644 (file)
@@ -239,4 +239,4 @@ int virLogParseOutputs(const char *src,
 int virLogParseFilters(const char *src,
                        virLogFilterPtr **filters) ATTRIBUTE_NONNULL(1);
 
-#endif
+#endif /* __VIRTLOG_H_ */
index dab7a9f4cb0bd9560aa75c46e4d34ed0222ad1b9..e34f98f6614ebff4e4cbab8c55d244a289765db6 100644 (file)
@@ -46,4 +46,5 @@ int virMacMapWriteFile(virMacMapPtr mgr,
 
 int virMacMapDumpStr(virMacMapPtr mgr,
                      char **str);
-#endif /* __VIR_MACMAPPING_H__ */
+
+#endif /* __VIR_MACMAP_H__ */
index ca2793ae344e390fd0bf03f150d2f383e721c0ba..73e1ab40ad474490f75bd6bf35cefb739d41a415 100644 (file)
@@ -15,6 +15,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_NETDEV_VLAN_H__
 # define __VIR_NETDEV_VLAN_H__
 
index 85941bf1ab1ee01850c1c2c27f482bf851852418..64558ab0a591a11831b65c0e1ffd9fa8543bdd17 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-
 #ifndef __VIR_NODE_SUSPEND_H__
 # define __VIR_NODE_SUSPEND_H__
 
index 77ebad1e8b783ac6b24f1cdb0b808bdfd5a1d88e..6c48fb6249d08ae4631bca15280296a89f6bbdb0 100644 (file)
@@ -152,4 +152,4 @@ void
 virObjectListFreeCount(void *list,
                        size_t count);
 
-#endif /* __VIR_OBJECT_H */
+#endif /* __VIR_OBJECT_H__ */
index 309be4576188a36d5b1a74b4017b1c03fff45efa..4a4d7e42cf750a6343bf5ccb79e0a33783744cb1 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifndef __VIR_QEMU_H_
 # define __VIR_QEMU_H_
 
index bc6b614ee9c8b02f3579dd07317cf974c1454bb5..c823ebb6573311e363954c7aade7d7f616a02977 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#define __VIR_RESCTRL_PRIV_H_ALLOW__
 #include "virresctrlpriv.h"
 #include "viralloc.h"
 #include "virfile.h"
index 8ea9758b947d92474989f275a267a81ac244ca23..04202b5f092ade6cfbe68d689cda00150aae80d5 100644 (file)
@@ -235,4 +235,4 @@ virResctrlMonitorGetCacheOccupancy(virResctrlMonitorPtr monitor,
 void
 virResctrlMonitorFreeStats(virResctrlMonitorStatsPtr *stats,
                            size_t nstats);
-#endif /*  __VIR_RESCTRL_H__ */
+#endif /* __VIR_RESCTRL_H__ */
index 72b115afd13ec878311b9e5209b1114e6f68a32a..f8743d81ea61cdfd63f0a1f6f81002b554cdd0f2 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
+#ifndef __VIR_RESCTRL_PRIV_H_ALLOW__
+# error "virresctrlpriv.h may only be included by virresctrl.c or test suites"
+#endif /* __VIR_RESCTRL_PRIV_H_ALLOW__ */
+
 #ifndef __VIR_RESCTRL_PRIV_H__
 # define __VIR_RESCTRL_PRIV_H__
 
index 72a49e4a41a7a395416800b0edb04e8be28c0548..7b8358cd7247dc34f0990a8c4f4b002591264223 100644 (file)
@@ -66,4 +66,4 @@ int sexpr_int(const struct sexpr *sexpr, const char *name);
 double sexpr_float(const struct sexpr *sexpr, const char *name);
 uint64_t sexpr_u64(const struct sexpr *sexpr, const char *name);
 
-#endif
+#endif /* _LIBVIR_SEXPR_H_ */
index a50b280f64adf54ca2448aaf1e9cf1e4097b32b5..607a9354fb7f3ec0f7d8c32909708a65593fea79 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef __VIR_SYSINFO_PRIV_H_ALLOW__
 # error "virsysinfopriv.h may only be included by virsysinfo.c or test suites"
-#endif
+#endif /* __VIR_SYSINFO_PRIV_H_ALLOW__ */
 
 #ifndef __VIR_SYSINFO_PRIV_H__
 # define __VIR_SYSINFO_PRIV_H__
index 4f4058b35fc24a2f7ac2351b7203498a5c9fccc8..c5423cf426a1fce9cdbf13d233178ad0ea9a00cb 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef __VIR_SYSTEMD_PRIV_H_ALLOW__
 # error "virsystemdpriv.h may only be included by virsystemd.c or test suites"
-#endif
+#endif /* __VIR_SYSTEMD_PRIV_H_ALLOW__ */
 
 #ifndef __VIR_SYSTEMD_PRIV_H__
 # define __VIR_SYSTEMD_PRIV_H__
index e468ba941cf61c054427ed66d0d30b90a1228338..e4348e87a997c8c9703215b6e47775a38609d0db 100644 (file)
@@ -213,4 +213,4 @@ int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
         return 0; \
     }
 
-#endif
+#endif /* __THREADS_H_ */
index 0c62ee672358f0340c3b21b0dc45d8fcaf3c1fa5..343b8b041a19462ff459ec08eed1edea06518bc9 100644 (file)
@@ -28,4 +28,4 @@ void virThreadJobSetWorker(const char *caller);
 void virThreadJobSet(const char *caller);
 void virThreadJobClear(int rv);
 
-#endif
+#endif /* __VIR_THREAD_JOB_H__ */
index 26fb4b739c71c3d1c0f74825fca658de3152ef91..12f12e4fc37fb8101adc3a99b841c1f3ab82e57b 100644 (file)
@@ -60,4 +60,4 @@ int virThreadPoolSetParameters(virThreadPoolPtr pool,
                                long long int maxWorkers,
                                long long int prioWorkers);
 
-#endif
+#endif /* __VIR_THREADPOOL_H__ */
index dec723891239b7ad5ac548e41ae4f951f57961b4..340ea5d58813090ea3a446afe4a0308de1297963 100644 (file)
@@ -73,4 +73,4 @@ int virTimeBackOffStart(virTimeBackOffVar *var,
 
 bool virTimeBackOffWait(virTimeBackOffVar *var);
 
-#endif
+#endif /* __VIR_TIME_H__ */
index 2ceb4a6af696321ce8a04fe025bcfb624782ad72..a363f37ec00257ca16fe842f56d12e171ca9161b 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __VIR_TPM_H__
 # define __VIR_TPM_H__
 
index 120286a5a19611c2f2a82efc14c753f3f0fb908f..6df63a1e5cdac7127efbb0ea7e6a59f5a9e04386 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-
 #ifndef __VIR_TYPED_PARAM_H_
 # define __VIR_TYPED_PARAM_H_
 
@@ -135,4 +134,4 @@ VIR_ENUM_DECL(virTypedParameter)
         } \
     } while (0)
 
-#endif /* __VIR_TYPED_PARAM_H */
+#endif /* __VIR_TYPED_PARAM_H_ */
index 67b1fa5376a0617d0e66084c2c6327113a060eee..32792918ae1c6f270436d53ad3252ae68885c7e7 100644 (file)
@@ -59,4 +59,4 @@ virVHBAGetHostByFabricWWN(const char *sysfs_prefix,
                           const char *fabric_wwn)
     ATTRIBUTE_NONNULL(2);
 
-#endif /* __VIR_VBHA_H__ */
+#endif /* __VIR_VHBA_H__ */
index 127560d9d1bd783ac977059c1b8005e3f46f48a1..43ce031082db38dfdb74b106cbe558d1289b0398 100644 (file)
@@ -221,4 +221,4 @@ virXMLFormatElement(virBufferPtr buf,
                     virBufferPtr attrBuf,
                     virBufferPtr childBuf);
 
-#endif                          /* __VIR_XML_H__ */
+#endif /* __VIR_XML_H__ */
index bf7db2bf87d960d01d0b5891e42d6915187f50ad..38aaaf6e3989a6834b582817d130b06b5a6f24b5 100644 (file)
@@ -1,7 +1,3 @@
-/** @file vbox_driver.h
- * Core driver methods for managing VirtualBox VM's
- */
-
 /*
  * Copyright (C) 2008-2009 Sun Microsystems, Inc.
  *
@@ -43,4 +39,4 @@ int vboxStorageRegister(void);
 int vboxRegister(void);
 # endif
 
-#endif
+#endif /* VBOX_DRIVER_H */
index 3864b308470dc7ac997d3e1d49ab3e6d832fff9a..7ba3ca03eaea337ec94807c4a51c2f1860a7d5f3 100644 (file)
@@ -138,4 +138,4 @@ virVBoxSnapshotConfSnapshotPtr
 virVBoxSnapshotConfSnapshotByName(virVBoxSnapshotConfSnapshotPtr snapshot,
                                   const char *snapshotName);
 
-#endif /*VBOX_SNAPSHOT_CONF_H*/
+#endif /* VBOX_SNAPSHOT_CONF_H */
index b3f8cdf253eb93a603a50e1b24e4d324cbb18676..e7ba403848e1317eedae236e899749275cda271f 100644 (file)
@@ -1,4 +1,3 @@
-/*---------------------------------------------------------------------------*/
 /*
  * Copyright (C) 2014 Red Hat, Inc.
  * Copyright 2010, diateam (www.diateam.net)
@@ -18,7 +17,6 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
-/*---------------------------------------------------------------------------*/
 
 #ifndef VMWARE_CONF_H
 # define VMWARE_CONF_H
@@ -87,4 +85,4 @@ int vmwareExtractPid(const char * vmxPath);
 
 char *vmwareCopyVMXFileName(const char *datastorePath, void *opaque);
 
-#endif
+#endif /* VMWARE_CONF_H */
index e7427bb2505252759ed2b40ef008dd5954b453cd..94ed04d023a2a6b3ac5ad8a011b79d489e52cbc6 100644 (file)
@@ -1,5 +1,5 @@
-/*---------------------------------------------------------------------------*/
-/* Copyright 2010, diateam (www.diateam.net)
+/*
+ * Copyright 2010, diateam (www.diateam.net)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
-/*---------------------------------------------------------------------------*/
 
 #ifndef VMWARE_DRIVER_H
 # define VMWARE_DRIVER_H
 
 int vmwareRegister(void);
 
-#endif
+#endif /* VMWARE_DRIVER_H */
index 3c7610637fda913b4c0144cc2c79fb66a0c5f415..82c77fd0ece54e34ea20d484e4a9323a6fcea57b 100644 (file)
@@ -25,4 +25,4 @@
 
 int vzRegister(void);
 
-#endif
+#endif /* PARALLELS_DRIVER_H */
index 0a77431db55408b8de40f5ffe2c9e06ab1b42d9d..d201d6a10da81d35d93d1a1cb7a2fcba7e68e490 100644 (file)
  *
  */
 
-#include <Parallels.h>
+#ifndef __VZ_SDK_H__
+# define __VZ_SDK_H__
 
-#include "vz_utils.h"
+# include <Parallels.h>
+
+# include "vz_utils.h"
 
 int prlsdkInit(void);
 void prlsdkDeinit(void);
@@ -91,3 +94,5 @@ PRL_HANDLE
 prlsdkSdkDomainLookupByName(vzDriverPtr driver, const char *name);
 int prlsdkCancelJob(virDomainObjPtr dom);
 int prlsdkResizeImage(virDomainObjPtr dom, virDomainDiskDefPtr disk, unsigned long long newsize);
+
+#endif /* __VZ_SDK_H__ */
index 7137a2a8b6e385e7f00d8837ca1c0182e455f788..93db255f953be9454d18d1f6ea55509a385a6bc4 100644 (file)
@@ -151,11 +151,11 @@ int vzCheckUnsupportedGraphics(virDomainGraphicsDefPtr gr);
     OP(wr_req, VIR_DOMAIN_BLOCK_STATS_WRITE_REQ, "write_requests") \
     OP(wr_bytes, VIR_DOMAIN_BLOCK_STATS_WRITE_BYTES, "write_total")
 
-#endif
-
 int
 vzDomainObjBeginJob(virDomainObjPtr dom);
 void
 vzDomainObjEndJob(virDomainObjPtr dom);
 int
 vzDomainJobUpdateTime(vzDomainJobObjPtr job);
+
+#endif /* PARALLELS_UTILS_H */
index 7a59c87587df608b9030e85ad31c3bdd1dfe9cf0..df469aff345fb954769e2c6681ceb6e15cef69eb 100644 (file)
@@ -17,7 +17,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __VIR_XENAPI_PRIV_H__
 # define __VIR_XENAPI_PRIV_H__
 
index fb6d1a40beb00dae6bd1566227e9c3c057499310..7d8d8c66d2de8826c4955fbf6fd8cbd9f173d93a 100644 (file)
@@ -17,7 +17,6 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-
 #ifndef __VIR_XENAPI_H__
 # define __VIR_XENAPI_H__
 
index 5b1e0db1049b2b7cff5b8c8e8281b1ee2ede0640..bf334c75ee9e0550cb5234c9b1b035850ea99833 100644 (file)
@@ -22,6 +22,7 @@
 #include "qemu/qemu_alias.h"
 #include "qemu/qemu_conf.h"
 #include "qemu/qemu_hotplug.h"
+#define __QEMU_HOTPLUGPRIV_H_ALLOW__
 #include "qemu/qemu_hotplugpriv.h"
 #include "qemumonitortestutils.h"
 #include "testutils.h"
index 053205372214182d5e8b3ba5b228ac890ea1241b..e0117d026152e434a0b2aba64dc9a930aba84655 100644 (file)
@@ -26,6 +26,7 @@
 #include "testutilsqemu.h"
 #include "qemumonitortestutils.h"
 #include "qemu/qemu_migration_params.h"
+#define __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
 #include "qemu/qemu_migration_paramspriv.h"
 #include "qemu/qemu_monitor.h"
 
index 5c77db337fb72b59f412cf8209fdddf19c3640b4..0e7d27a610f9368d7e141e24dba5a40014c03113 100644 (file)
@@ -33,6 +33,7 @@
 #include "cpu/cpu.h"
 #include "qemu/qemu_monitor.h"
 #include "qemu/qemu_migration_params.h"
+#define __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
 #include "qemu/qemu_migration_paramspriv.h"
 
 #define VIR_FROM_THIS VIR_FROM_NONE
index 9cee0082fab2de4803fad91ad8d80aea100f168d..cc9e0bd0f482f966f3d7b8ab4452ec5db2a86923 100644 (file)
@@ -26,6 +26,7 @@
 #include "qemumonitortestutils.h"
 
 #include "virthread.h"
+#define __QEMU_PROCESS_PRIV_H_ALLOW__
 #include "qemu/qemu_processpriv.h"
 #include "qemu/qemu_monitor.h"
 #include "qemu/qemu_agent.h"
index a0bbad3990b425bd3c316493b0656e9e23cb7c3e..88c125236b910b2c7077b74305986f887d51b22d 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "internal.h"
 #include "testutils.h"
+#define __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__
 #include "storage/storage_backend_sheepdog_priv.h"
 #include "virstring.h"
 
index f0ab23b962268c4bbbfb1e7b4e358c02f0eaf72c..07e7302d7f920b4636a9d14d19c47e8886a22cb0 100644 (file)
@@ -1,6 +1,25 @@
-#include "conf/cpu_conf.h"
-#include "internal.h"
-#include "util/virarch.h"
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TESTUTILSHOSTCPUS_H
+# define TESTUTILSHOSTCPUS_H
+
+# include "conf/cpu_conf.h"
+# include "internal.h"
+# include "util/virarch.h"
 
 static virCPUFeatureDef cpuDefaultFeatures[] = {
     { (char *) "ds",        -1 },
@@ -146,3 +165,5 @@ testUtilsHostCpusGetDefForArch(virArch arch)
 
     return NULL;
 }
+
+#endif /* TESTUTILSHOSTCPUS_H */
index 3f9a67b7f457cd61f0a87f412513a7f03c3d4807..0bc69a903f5bb75d08e3e3fe04875e5b5c596b4e 100644 (file)
@@ -1,6 +1,27 @@
-#include "capabilities.h"
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
 
-#define FAKEDEVDIR0 "/fakedevdir0/bla/fasl"
-#define FAKEDEVDIR1 "/fakedevdir1/bla/fasl"
+#ifndef TESTUTILSLXC_H
+# define TESTUTILSLXC_H
+
+# include "capabilities.h"
+
+# define FAKEDEVDIR0 "/fakedevdir0/bla/fasl"
+# define FAKEDEVDIR1 "/fakedevdir1/bla/fasl"
 
 virCapsPtr testLXCCapsInit(void);
+
+#endif /* TESTUTILSLXC_H */
index efb1baeadd42d1519b3dc18ee90613e1e852a909..1aa0034bb91896fe0bec0974d2d1c4f77a0c6d8a 100644 (file)
@@ -1,10 +1,29 @@
-#ifdef WITH_QEMU
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
 
-# include "capabilities.h"
-# include "virfilecache.h"
-# include "domain_conf.h"
-# include "qemu/qemu_capabilities.h"
-# include "qemu/qemu_conf.h"
+#ifndef TESTUTILSQEMU_H
+# define TESTUTILSQEMU_H
+
+# ifdef WITH_QEMU
+
+#  include "capabilities.h"
+#  include "virfilecache.h"
+#  include "domain_conf.h"
+#  include "qemu/qemu_capabilities.h"
+#  include "qemu/qemu_conf.h"
 
 enum {
     GIC_NONE = 0,
@@ -44,4 +63,6 @@ char *testQemuGetLatestCapsForArch(const char *dirname,
                                    const char *arch,
                                    const char *suffix);
 
-#endif
+# endif
+
+#endif /* TESTUTILSQEMU_H */
index c69435f4205c532b7f2384b753fdfc8d15bec7ed..081d12ea63422fd267bd4a80e4fbee05d29354c6 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "virhash.h"
-#include "virjson.h"
-#include "virbuffer.h"
+#ifndef __TESTUTILSQEMUSCHEMA_H__
+# define __TESTUTILSQEMUSCHEMA_H__
+
+# include "virhash.h"
+# include "virjson.h"
+# include "virbuffer.h"
 
 int
 testQEMUSchemaValidate(virJSONValuePtr obj,
@@ -31,3 +34,5 @@ testQEMUSchemaGetLatest(void);
 
 virHashTablePtr
 testQEMUSchemaLoad(void);
+
+#endif /* __TESTUTILSQEMUSCHEMA_H__ */
index c5ccb6d4713b01b78ff7ebd23ee25e4c7c4fbed5..0fceb93ae8e5c041063105ffe32b886b2d0a3f6d 100644 (file)
@@ -1,3 +1,19 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
 #ifndef _TESTUTILSXEN_H_
 # define _TESTUTILSXEN_H_
 
index 3afea6c248efe2833e09f0029cf4ad329b7e8664..b62a42eca7416c3323d3872e4bfe9201a98c63f7 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-
+#define __VIR_DBUS_PRIV_H_ALLOW__
 #include "virdbuspriv.h"
 #include "virlog.h"
 #include "testutils.h"
index 612322c1d044c72d22288289f668f1cd34d0aa75..441013cec34ca373acdce5f76bf1f9f208a7bbff 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #ifndef __VIR_FILE_MOCK_H__
+# define __VIR_FILE_MOCK_H__
 
 int
 virFileWrapperAddPrefix(const char *prefix,
index 39aaa3bda7f8d44972fc3d4e26de673e39ba57a6..71935761027736ca6df5d2f6aeedcd1a6a0397c3 100644 (file)
@@ -20,6 +20,7 @@
 
 #define __VIR_FIREWALL_PRIV_H_ALLOW__
 #define __VIR_COMMAND_PRIV_H_ALLOW__
+#define __VIR_DBUS_PRIV_H_ALLOW__
 
 #include "testutils.h"
 
index 332e09c3b3d087896f600133130269baf11ccff1..557ed8e923186b3a9f2fa25417f9df658ec18377 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef VIRHASHDATA_H
+# define VIRHASHDATA_H
+
 const char *uuids[] = {
 /* [  2] */ "a9b02f96-e430-4f7c-a7ff-a647d080447a",
 /* [  4] */ "202e32ca-f82c-4f13-9266-28dc8d002074",
@@ -264,3 +283,5 @@ const char *uuids_new[] = {
     "5920cc9d-62a3-4772-9e73-eb97f0bc483c",
     "53c215dd-bdba-4fdc-887a-86ab6f860df4",
 };
+
+#endif /* VIRHASHDATA_H */
index 1df4bb8ee68490b4a35731d28591fc9439d8d25c..219de942b79169ee55ec8763ba150d3bf4c2cd61 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "testutils.h"
 #include "internal.h"
+#define __VIR_HOSTCPU_PRIV_H_ALLOW__
 #include "virhostcpupriv.h"
 #include "virfile.h"
 #include "virstring.h"
index ad72cd6ab888c2edc40df8172c45e4583aa3cc33..2ca4b52c3cab889f4c2dfa768c1d4e75fdee3648 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#include <gnutls/gnutls.h>
-#include <gnutls/x509.h>
+#ifndef VIRNETTLSHELPERS_H
+# define VIRNETTLSHELPERS_H
 
-#if !defined WIN32 && HAVE_LIBTASN1_H && LIBGNUTLS_VERSION_NUMBER >= 0x020600
+# include <gnutls/gnutls.h>
+# include <gnutls/x509.h>
 
-# include <libtasn1.h>
+# if !defined WIN32 && HAVE_LIBTASN1_H && LIBGNUTLS_VERSION_NUMBER >= 0x020600
 
-# include "rpc/virnettlscontext.h"
+#  include <libtasn1.h>
+
+#  include "rpc/virnettlscontext.h"
 
 /*
  * This contains parameter about how to generate
@@ -74,4 +77,6 @@ void testTLSDiscardCert(struct testTLSCertReq *req);
 void testTLSInit(const char *keyfile);
 void testTLSCleanup(const char *keyfile);
 
-#endif
+# endif
+
+#endif /* VIRNETTLSHELPERS_H */
index d2a290035ffd2f50a8dcb2aeaa8b76ee7d638403..d75c73f49e43d9a2813c6b2f11664115f8c30005 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "testutils.h"
 #include "virfilewrapper.h"
+#define __VIR_RESCTRL_PRIV_H_ALLOW__
 #include "virresctrlpriv.h"
 
 
index b4fd2a86c62babd2d501b641718df827e9962d09..343b2b9d6c7f4a894795abc4554be03e34f5687e 100644 (file)
@@ -109,4 +109,4 @@ char ** virshDomainDeviceAliasCompleter(vshControl *ctl,
 char ** virshCellnoCompleter(vshControl *ctl,
                              const vshCmd *cmd,
                              unsigned int flags);
-#endif
+#endif /* VIRSH_COMPLETER */
index 7507b95c1a3acdae4301f5e2eabb840ba77cda12..311f47fcf66fd66c224d3e08e72f7bd6a5cccb0a 100644 (file)
@@ -30,4 +30,4 @@ char **
 vshAdmServerCompleter(vshControl *ctl,
                       const vshCmd *cmd,
                       unsigned int flags);
-#endif
+#endif /* VIRT_ADMIN_COMPLETER */
index 53197eb2eb56fd02448c8323655082e4bd537353..896b33fb6c3d5bc6976b7e4e47c8d78485518eb6 100644 (file)
@@ -16,6 +16,7 @@
  * License along with this library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #ifndef _PACKET_LIBVIRT_H_
 # define _PACKET_LIBVIRT_H_