Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/util/virhostcpu.h | 17 +++++++----------
src/util/virhostcpupriv.h | 11 ++++-------
src/util/virhostdev.h | 19 ++++++++-----------
src/util/virhostmem.h | 7 ++-----
4 files changed, 21 insertions(+), 33 deletions(-)
diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h
index b822bc11a8..2ba79b97a5 100644
--- a/src/util/virhostcpu.h
+++ b/src/util/virhostcpu.h
@@ -19,13 +19,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRHOSTCPU_H
-# define LIBVIRT_VIRHOSTCPU_H
+#pragma once
-# include "internal.h"
-# include "virarch.h"
-# include "virbitmap.h"
-# include "virenum.h"
+#include "internal.h"
+#include "virarch.h"
+#include "virbitmap.h"
+#include "virenum.h"
typedef struct _virHostCPUTscInfo virHostCPUTscInfo;
@@ -64,12 +63,12 @@ int virHostCPUStatsAssign(virNodeCPUStatsPtr param,
const char *name,
unsigned long long value);
-# ifdef __linux__
+#ifdef __linux__
int virHostCPUGetSocket(unsigned int cpu, unsigned int *socket);
int virHostCPUGetCore(unsigned int cpu, unsigned int *core);
virBitmapPtr virHostCPUGetSiblingsList(unsigned int cpu);
-# endif
+#endif
int virHostCPUGetOnline(unsigned int cpu, bool *online);
@@ -79,5 +78,3 @@ int virHostCPUGetMSR(unsigned long index,
uint64_t *msr);
virHostCPUTscInfoPtr virHostCPUGetTscInfo(void);
-
-#endif /* LIBVIRT_VIRHOSTCPU_H */
diff --git a/src/util/virhostcpupriv.h b/src/util/virhostcpupriv.h
index 980d4cb1fa..afb415f9ea 100644
--- a/src/util/virhostcpupriv.h
+++ b/src/util/virhostcpupriv.h
@@ -23,12 +23,11 @@
# error "virhostcpupriv.h may only be included by virhostcpu.c or test suites"
#endif /* LIBVIRT_VIRHOSTCPUPRIV_H_ALLOW */
-#ifndef LIBVIRT_VIRHOSTCPUPRIV_H
-# define LIBVIRT_VIRHOSTCPUPRIV_H
+#pragma once
-# include "virhostcpu.h"
+#include "virhostcpu.h"
-# ifdef __linux__
+#ifdef __linux__
int virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
virArch arch,
unsigned int *cpus,
@@ -42,6 +41,4 @@ int virHostCPUGetStatsLinux(FILE *procstat,
int cpuNum,
virNodeCPUStatsPtr params,
int *nparams);
-# endif
-
-#endif /* LIBVIRT_VIRHOSTCPUPRIV_H */
+#endif
diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h
index 7263f320a2..88501e2743 100644
--- a/src/util/virhostdev.h
+++ b/src/util/virhostdev.h
@@ -19,17 +19,16 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRHOSTDEV_H
-# define LIBVIRT_VIRHOSTDEV_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
-# include "virpci.h"
-# include "virusb.h"
-# include "virscsi.h"
-# include "virscsivhost.h"
-# include "conf/domain_conf.h"
-# include "virmdev.h"
+#include "virpci.h"
+#include "virusb.h"
+#include "virscsi.h"
+#include "virscsivhost.h"
+#include "conf/domain_conf.h"
+#include "virmdev.h"
typedef enum {
VIR_HOSTDEV_STRICT_ACS_CHECK = (1 << 0), /* strict acs check */
@@ -202,5 +201,3 @@ int virHostdevPCINodeDeviceReAttach(virHostdevManagerPtr mgr,
int virHostdevPCINodeDeviceReset(virHostdevManagerPtr mgr,
virPCIDevicePtr pci)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
-#endif /* LIBVIRT_VIRHOSTDEV_H */
diff --git a/src/util/virhostmem.h b/src/util/virhostmem.h
index cba1732d8d..1369829807 100644
--- a/src/util/virhostmem.h
+++ b/src/util/virhostmem.h
@@ -19,10 +19,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRHOSTMEM_H
-# define LIBVIRT_VIRHOSTMEM_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
int virHostMemGetStats(int cellNum,
virNodeMemoryStatsPtr params,
@@ -54,5 +53,3 @@ int virHostMemAllocPages(unsigned int npages,
int startCell,
unsigned int cellCount,
bool add);
-
-#endif /* LIBVIRT_VIRHOSTMEM_H */
--
2.20.1