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 @@ * . */ -#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 @@ * . */ -#ifndef LIBVIRT_XENAPI_DRIVER_PRIVATE_H -# define LIBVIRT_XENAPI_DRIVER_PRIVATE_H +#pragma once -# include -# include -# include "virerror.h" +#include +#include +#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 @@ * . */ -#ifndef LIBVIRT_XENAPI_UTILS_H -# define LIBVIRT_XENAPI_UTILS_H +#pragma once -# include -# include "internal.h" -# include "viruri.h" -# include "domain_conf.h" +#include +#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 @@ * . */ -#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 @@ * . */ -#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..5546b2ddf4 100644 --- a/src/xenconfig/xen_xm.h +++ b/src/xenconfig/xen_xm.h @@ -20,16 +20,13 @@ * . */ -#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); virDomainDefPtr xenParseXM(virConfPtr conf, virCapsPtr caps, virDomainXMLOptionPtr xmlopt); - -#endif /* LIBVIRT_XEN_XM_H */ 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 @@ * . */ -#ifndef LIBVIRT_XENXS_PRIVATE_H -# define LIBVIRT_XENXS_PRIVATE_H +#pragma once -# include "internal.h" +#include "internal.h" -# include -# include "xen_sxpr.h" +#include +#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