Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/xenapi/xenapi_driver.h | 5 +----
src/xenapi/xenapi_driver_private.h | 17 +++++++----------
src/xenapi/xenapi_utils.h | 15 ++++++---------
src/xenconfig/xen_common.h | 17 +++++++----------
src/xenconfig/xen_sxpr.h | 13 +++++--------
src/xenconfig/xen_xl.h | 11 ++++-------
src/xenconfig/xen_xm.h | 9 ++++-----
src/xenconfig/xenxs_private.h | 29 +++++++++++++----------------
8 files changed, 47 insertions(+), 69 deletions(-)
diff --git a/src/xenapi/xenapi_driver.h b/src/xenapi/xenapi_driver.h
index 85bbe06776..f126dcbed6 100644
--- a/src/xenapi/xenapi_driver.h
+++ b/src/xenapi/xenapi_driver.h
@@ -17,9 +17,6 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XENAPI_DRIVER_H
-# define LIBVIRT_XENAPI_DRIVER_H
+#pragma once
int xenapiRegister(void);
-
-#endif /* LIBVIRT_XENAPI_DRIVER_H */
diff --git a/src/xenapi/xenapi_driver_private.h b/src/xenapi/xenapi_driver_private.h
index 590a96f532..276bc7c516 100644
--- a/src/xenapi/xenapi_driver_private.h
+++ b/src/xenapi/xenapi_driver_private.h
@@ -17,17 +17,16 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XENAPI_DRIVER_PRIVATE_H
-# define LIBVIRT_XENAPI_DRIVER_PRIVATE_H
+#pragma once
-# include <libxml/tree.h>
-# include <xen/api/xen_common.h>
-# include "virerror.h"
+#include <libxml/tree.h>
+#include <xen/api/xen_common.h>
+#include "virerror.h"
/*# define PRINT_XML*/
-# define VIR_FROM_THIS VIR_FROM_XENAPI
-# define LIBVIRT_MODELNAME_LEN (32)
-# define xenapiSessionErrorHandler(conn, errNum, buf) \
+#define VIR_FROM_THIS VIR_FROM_XENAPI
+#define LIBVIRT_MODELNAME_LEN (32)
+#define xenapiSessionErrorHandler(conn, errNum, buf) \
xenapiSessionErrorHandle(conn, errNum, buf, \
__FILE__, __FUNCTION__, __LINE__)
@@ -57,5 +56,3 @@ struct _xenapiPrivate {
virCapsPtr caps;
virDomainXMLOptionPtr xmlopt;
};
-
-#endif /* LIBVIRT_XENAPI_DRIVER_PRIVATE_H */
diff --git a/src/xenapi/xenapi_utils.h b/src/xenapi/xenapi_utils.h
index 70a0e5fc13..e394197bfd 100644
--- a/src/xenapi/xenapi_utils.h
+++ b/src/xenapi/xenapi_utils.h
@@ -18,15 +18,14 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XENAPI_UTILS_H
-# define LIBVIRT_XENAPI_UTILS_H
+#pragma once
-# include <xen/api/xen_all.h>
-# include "internal.h"
-# include "viruri.h"
-# include "domain_conf.h"
+#include <xen/api/xen_all.h>
+#include "internal.h"
+#include "viruri.h"
+#include "domain_conf.h"
-# define NETWORK_DEVID_SIZE (12)
+#define NETWORK_DEVID_SIZE (12)
typedef uint64_t cpumap_t;
@@ -75,5 +74,3 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr defPtr,
int
allocStringMap (xen_string_string_map **strings, char *key, char *val);
-
-#endif /* LIBVIRT_XENAPI_UTILS_H */
diff --git a/src/xenconfig/xen_common.h b/src/xenconfig/xen_common.h
index b22d18aa67..231fa0d078 100644
--- a/src/xenconfig/xen_common.h
+++ b/src/xenconfig/xen_common.h
@@ -18,16 +18,15 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XEN_COMMON_H
-# define LIBVIRT_XEN_COMMON_H
+#pragma once
-# include "internal.h"
-# include "virconf.h"
-# include "domain_conf.h"
+#include "internal.h"
+#include "virconf.h"
+#include "domain_conf.h"
-# define XEN_CONFIG_FORMAT_XL "xen-xl"
-# define XEN_CONFIG_FORMAT_XM "xen-xm"
-# define XEN_CONFIG_FORMAT_SEXPR "xen-sxpr"
+#define XEN_CONFIG_FORMAT_XL "xen-xl"
+#define XEN_CONFIG_FORMAT_XM "xen-xm"
+#define XEN_CONFIG_FORMAT_SEXPR "xen-sxpr"
int xenConfigGetString(virConfPtr conf,
const char *name,
@@ -68,5 +67,3 @@ int xenFormatConfigCommon(virConfPtr conf,
char *xenMakeIPList(virNetDevIPInfoPtr guestIP);
int xenDomainDefAddImplicitInputDevice(virDomainDefPtr def);
-
-#endif /* LIBVIRT_XEN_COMMON_H */
diff --git a/src/xenconfig/xen_sxpr.h b/src/xenconfig/xen_sxpr.h
index 0cec2a4068..019657380c 100644
--- a/src/xenconfig/xen_sxpr.h
+++ b/src/xenconfig/xen_sxpr.h
@@ -20,13 +20,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XEN_SXPR_H
-# define LIBVIRT_XEN_SXPR_H
+#pragma once
-# include "internal.h"
-# include "virconf.h"
-# include "domain_conf.h"
-# include "virsexpr.h"
+#include "internal.h"
+#include "virconf.h"
+#include "domain_conf.h"
+#include "virsexpr.h"
/* helper functions to get the dom id from a sexpr */
int xenGetDomIdFromSxprString(const char *sexpr, int *id);
@@ -65,5 +64,3 @@ int xenFormatSxprChr(virDomainChrDefPtr def, virBufferPtr buf);
int xenFormatSxprSound(virDomainDefPtr def, virBufferPtr buf);
char * xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def);
-
-#endif /* LIBVIRT_XEN_SXPR_H */
diff --git a/src/xenconfig/xen_xl.h b/src/xenconfig/xen_xl.h
index e347ad274f..24f6470283 100644
--- a/src/xenconfig/xen_xl.h
+++ b/src/xenconfig/xen_xl.h
@@ -20,12 +20,11 @@
*
*/
-#ifndef LIBVIRT_XEN_XL_H
-# define LIBVIRT_XEN_XL_H
+#pragma once
-# include "virconf.h"
-# include "domain_conf.h"
-# include "xen_common.h"
+#include "virconf.h"
+#include "domain_conf.h"
+#include "xen_common.h"
virDomainDefPtr xenParseXL(virConfPtr conn,
virCapsPtr caps,
@@ -34,5 +33,3 @@ virDomainDefPtr xenParseXL(virConfPtr conn,
virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr);
const char *xenTranslateCPUFeature(const char *feature_name, bool from_libxl);
-
-#endif /* LIBVIRT_XEN_XL_H */
diff --git a/src/xenconfig/xen_xm.h b/src/xenconfig/xen_xm.h
index b0a73fc09b..a2cc6715b4 100644
--- a/src/xenconfig/xen_xm.h
+++ b/src/xenconfig/xen_xm.h
@@ -20,12 +20,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XEN_XM_H
-# define LIBVIRT_XEN_XM_H
+#pragma once
-# include "internal.h"
-# include "virconf.h"
-# include "domain_conf.h"
+#include "internal.h"
+#include "virconf.h"
+#include "domain_conf.h"
virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def);
diff --git a/src/xenconfig/xenxs_private.h b/src/xenconfig/xenxs_private.h
index 7cba0bff86..79909aba2f 100644
--- a/src/xenconfig/xenxs_private.h
+++ b/src/xenconfig/xenxs_private.h
@@ -19,28 +19,25 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_XENXS_PRIVATE_H
-# define LIBVIRT_XENXS_PRIVATE_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
-# include <xen/xen.h>
-# include "xen_sxpr.h"
+#include <xen/xen.h>
+#include "xen_sxpr.h"
/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
* headers. Its semantic was retained with XEN_LEGACY_MAX_VCPUS.
* Ensure MAX_VIRT_CPUS is defined accordingly.
*/
-# if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
-# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
-# endif
+#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
+# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
+#endif
-# define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */
+#define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */
-# ifdef __sun
-# define DEFAULT_VIF_SCRIPT "vif-vnic"
-# else
-# define DEFAULT_VIF_SCRIPT "vif-bridge"
-# endif
-
-#endif /* LIBVIRT_XENXS_PRIVATE_H */
+#ifdef __sun
+# define DEFAULT_VIF_SCRIPT "vif-vnic"
+#else
+# define DEFAULT_VIF_SCRIPT "vif-bridge"
+#endif
--
2.20.1