]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: host: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 18 Jun 2019 16:12:52 +0000 (11:12 -0500)
committerJán Tomko <jtomko@redhat.com>
Wed, 19 Jun 2019 15:12:32 +0000 (17:12 +0200)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/util/virhostcpu.h
src/util/virhostcpupriv.h
src/util/virhostdev.h
src/util/virhostmem.h

index b822bc11a862208ab0e59a3574d2838f1f5bf2a1..2ba79b97a5e4260ac4820b80a723ca28611d3f3d 100644 (file)
  * <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 */
index 980d4cb1fad23123f4e86aaf67b78b47fc22121f..afb415f9eaa25569976d549e795f2f522c13e3cb 100644 (file)
 # 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
index 7263f320a2521f099b670c5555b21b7e532ecb36..88501e27432d59f7b94e47029e3bd3344fa4654c 100644 (file)
  * <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 */
index cba1732d8d69a79dc97a15dbf6fc9e6bb835ef20..1369829807da137e38ae0698ecebb71b32fc695a 100644 (file)
  * <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 */