Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/conf/domain_addr.h | 16 +++---
src/conf/domain_audit.h | 10 ++--
src/conf/domain_capabilities.h | 15 +++---
src/conf/domain_conf.h | 91 ++++++++++++++++------------------
src/conf/domain_event.h | 11 ++--
src/conf/domain_nwfilter.h | 5 +-
6 files changed, 65 insertions(+), 83 deletions(-)
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index 803d07d415..dcb90618f8 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -19,13 +19,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_ADDR_H
-# define LIBVIRT_DOMAIN_ADDR_H
+#pragma once
-# include "domain_conf.h"
+#include "domain_conf.h"
-# define VIR_PCI_ADDRESS_SLOT_LAST 31
-# define VIR_PCI_ADDRESS_FUNCTION_LAST 7
+#define VIR_PCI_ADDRESS_SLOT_LAST 31
+#define VIR_PCI_ADDRESS_FUNCTION_LAST 7
typedef enum {
VIR_PCI_ADDRESS_EXTENSION_NONE = 0, /* no extension */
@@ -58,7 +57,7 @@ typedef enum {
/* a combination of all bits that describe the type of connections
* allowed, e.g. PCI, PCIe, switch
*/
-# define VIR_PCI_CONNECT_TYPES_MASK \
+#define VIR_PCI_CONNECT_TYPES_MASK \
(VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE | \
VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT | \
VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT | \
@@ -74,7 +73,7 @@ typedef enum {
* upstream and downstream switch port, or a PCIe root port and a PCIe
* port)
*/
-# define VIR_PCI_CONNECT_TYPES_ENDPOINT \
+#define VIR_PCI_CONNECT_TYPES_ENDPOINT \
(VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE)
virDomainPCIConnectFlags
@@ -255,7 +254,7 @@ virDomainUSBAddressPortFormatBuf(virBufferPtr buf,
unsigned int *port)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-# define VIR_DOMAIN_USB_HUB_PORTS 8
+#define VIR_DOMAIN_USB_HUB_PORTS 8
typedef struct _virDomainUSBAddressHub virDomainUSBAddressHub;
typedef virDomainUSBAddressHub *virDomainUSBAddressHubPtr;
@@ -312,4 +311,3 @@ int
virDomainUSBAddressRelease(virDomainUSBAddressSetPtr addrs,
virDomainDeviceInfoPtr info)
ATTRIBUTE_NONNULL(2);
-#endif /* LIBVIRT_DOMAIN_ADDR_H */
diff --git a/src/conf/domain_audit.h b/src/conf/domain_audit.h
index ee8a4aa70e..d34c750427 100644
--- a/src/conf/domain_audit.h
+++ b/src/conf/domain_audit.h
@@ -19,11 +19,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_AUDIT_H
-# define LIBVIRT_DOMAIN_AUDIT_H
+#pragma once
-# include "domain_conf.h"
-# include "vircgroup.h"
+#include "domain_conf.h"
+#include "vircgroup.h"
void virDomainAuditStart(virDomainObjPtr vm,
const char *reason,
@@ -136,6 +135,3 @@ void virDomainAuditInput(virDomainObjPtr vm,
const char *reason,
bool success)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
-
-
-#endif /* LIBVIRT_DOMAIN_AUDIT_H */
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index cd09d50cee..96ab59cae9 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -18,13 +18,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_CAPABILITIES_H
-# define LIBVIRT_DOMAIN_CAPABILITIES_H
+#pragma once
-# include "internal.h"
-# include "domain_conf.h"
-# include "virautoclean.h"
-# include "virenum.h"
+#include "internal.h"
+#include "domain_conf.h"
+#include "virautoclean.h"
+#include "virenum.h"
typedef const char * (*virDomainCapsValToStr)(int value);
@@ -201,7 +200,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpuModels,
const char *name);
-# define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \
+#define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \
do { \
unsigned int __values[] = {__VA_ARGS__}; \
size_t __nvalues = ARRAY_CARDINALITY(__values); \
@@ -221,5 +220,3 @@ void
virSEVCapabilitiesFree(virSEVCapability *capabilities);
VIR_DEFINE_AUTOPTR_FUNC(virSEVCapability, virSEVCapabilitiesFree);
-
-#endif /* LIBVIRT_DOMAIN_CAPABILITIES_H */
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4c3ab07062..471c18ae19 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -20,43 +20,42 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_CONF_H
-# define LIBVIRT_DOMAIN_CONF_H
-
-# include <libxml/parser.h>
-# include <libxml/tree.h>
-# include <libxml/xpath.h>
-
-# include "internal.h"
-# include "virconftypes.h"
-# include "capabilities.h"
-# include "virstorageencryption.h"
-# include "cpu_conf.h"
-# include "virthread.h"
-# include "virhash.h"
-# include "virsocketaddr.h"
-# include "networkcommon_conf.h"
-# include "nwfilter_params.h"
-# include "numa_conf.h"
-# include "virnetdevmacvlan.h"
-# include "virsysinfo.h"
-# include "virnetdev.h"
-# include "virnetdevip.h"
-# include "virnetdevvportprofile.h"
-# include "virnetdevbandwidth.h"
-# include "virnetdevvlan.h"
-# include "virobject.h"
-# include "device_conf.h"
-# include "virbitmap.h"
-# include "virstoragefile.h"
-# include "virseclabel.h"
-# include "virprocess.h"
-# include "virgic.h"
-# include "virperf.h"
-# include "virtypedparam.h"
-# include "virsavecookie.h"
-# include "virresctrl.h"
-# include "virenum.h"
+#pragma once
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#include "internal.h"
+#include "virconftypes.h"
+#include "capabilities.h"
+#include "virstorageencryption.h"
+#include "cpu_conf.h"
+#include "virthread.h"
+#include "virhash.h"
+#include "virsocketaddr.h"
+#include "networkcommon_conf.h"
+#include "nwfilter_params.h"
+#include "numa_conf.h"
+#include "virnetdevmacvlan.h"
+#include "virsysinfo.h"
+#include "virnetdev.h"
+#include "virnetdevip.h"
+#include "virnetdevvportprofile.h"
+#include "virnetdevbandwidth.h"
+#include "virnetdevvlan.h"
+#include "virobject.h"
+#include "device_conf.h"
+#include "virbitmap.h"
+#include "virstoragefile.h"
+#include "virseclabel.h"
+#include "virprocess.h"
+#include "virgic.h"
+#include "virperf.h"
+#include "virtypedparam.h"
+#include "virsavecookie.h"
+#include "virresctrl.h"
+#include "virenum.h"
/* Flags for the 'type' field in virDomainDeviceDef */
typedef enum {
@@ -680,7 +679,7 @@ typedef enum {
VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST
} virDomainControllerModelVirtioSerial;
-# define IS_USB2_CONTROLLER(ctrl) \
+#define IS_USB2_CONTROLLER(ctrl) \
(((ctrl)->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) && \
((ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \
(ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1 || \
@@ -1208,8 +1207,8 @@ typedef enum {
VIR_DOMAIN_SMARTCARD_TYPE_LAST
} virDomainSmartcardType;
-# define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3
-# define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb"
+#define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3
+#define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb"
struct _virDomainSmartcardDef {
int type; /* virDomainSmartcardType */
@@ -1252,7 +1251,7 @@ typedef enum {
VIR_DOMAIN_TPM_VERSION_LAST
} virDomainTPMVersion;
-# define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0"
+#define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0"
struct _virDomainTPMDef {
int type; /* virDomainTPMBackendType */
@@ -1701,7 +1700,7 @@ typedef enum {
} virDomainSmbiosMode;
-# define VIR_DOMAIN_MAX_BOOT_DEVS 4
+#define VIR_DOMAIN_MAX_BOOT_DEVS 4
typedef enum {
VIR_DOMAIN_BOOT_FLOPPY,
@@ -1737,7 +1736,7 @@ typedef enum {
VIR_DOMAIN_FEATURE_LAST
} virDomainFeature;
-# define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12
+#define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12
typedef enum {
VIR_DOMAIN_HYPERV_RELAXED = 0,
@@ -2167,7 +2166,7 @@ struct _virDomainHugePage {
unsigned long long size; /* hugepage size in KiB */
};
-# define VIR_DOMAIN_CPUMASK_LEN 1024
+#define VIR_DOMAIN_CPUMASK_LEN 1024
struct _virDomainIOThreadIDDef {
bool autofill;
@@ -3042,7 +3041,7 @@ void virDomainIOThreadIDDel(virDomainDefPtr def, unsigned int
iothread_id);
* server omits the requested output, but a new flag to suppress
* information could result in a security hole when older libvirt
* supplies the sensitive information in spite of the flag. */
-# define VIR_DOMAIN_XML_COMMON_FLAGS \
+#define VIR_DOMAIN_XML_COMMON_FLAGS \
(VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE | \
VIR_DOMAIN_XML_MIGRATABLE)
unsigned int virDomainDefFormatConvertXMLFlags(unsigned int flags);
@@ -3637,5 +3636,3 @@ virDomainGraphicsGetRenderNode(const virDomainGraphicsDef
*graphics);
bool
virDomainGraphicsNeedsAutoRenderNode(const virDomainGraphicsDef *graphics);
-
-#endif /* LIBVIRT_DOMAIN_CONF_H */
diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h
index 637f1daf68..d1cfb81d62 100644
--- a/src/conf/domain_event.h
+++ b/src/conf/domain_event.h
@@ -20,12 +20,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_EVENT_H
-# define LIBVIRT_DOMAIN_EVENT_H
+#pragma once
-# include "internal.h"
-# include "object_event.h"
-# include "domain_conf.h"
+#include "internal.h"
+#include "object_event.h"
+#include "domain_conf.h"
virObjectEventPtr
@@ -323,5 +322,3 @@ virDomainQemuMonitorEventNew(int id,
unsigned int micros,
const char *details)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
-
-#endif /* LIBVIRT_DOMAIN_EVENT_H */
diff --git a/src/conf/domain_nwfilter.h b/src/conf/domain_nwfilter.h
index 9429ee6493..f44fbcce7d 100644
--- a/src/conf/domain_nwfilter.h
+++ b/src/conf/domain_nwfilter.h
@@ -19,8 +19,7 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_DOMAIN_NWFILTER_H
-# define LIBVIRT_DOMAIN_NWFILTER_H
+#pragma once
int virDomainConfNWFilterInstantiate(const char *vmname,
const unsigned char *vmuuid,
@@ -28,5 +27,3 @@ int virDomainConfNWFilterInstantiate(const char *vmname,
bool ignoreExists);
void virDomainConfNWFilterTeardown(virDomainNetDefPtr net);
void virDomainConfVMNWFilterTeardown(virDomainObjPtr vm);
-
-#endif /* LIBVIRT_DOMAIN_NWFILTER_H */
--
2.20.1