[PATCH 08/19] conf: node device: use #pragma once in headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/conf/node_device_conf.h  | 31 ++++++++++++++-----------------
 src/conf/node_device_event.h | 11 ++++-------
 src/conf/node_device_util.h  |  7 ++-----
 src/conf/virnodedeviceobj.h  | 13 +++++--------
 4 files changed, 25 insertions(+), 37 deletions(-)

diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h
index 510624968f..bf7939fbb3 100644
--- a/src/conf/node_device_conf.h
+++ b/src/conf/node_device_conf.h
@@ -20,23 +20,22 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NODE_DEVICE_CONF_H
-# define LIBVIRT_NODE_DEVICE_CONF_H
+#pragma once
 
-# include "internal.h"
-# include "virbitmap.h"
-# include "virutil.h"
-# include "virscsihost.h"
-# include "virpci.h"
-# include "virvhba.h"
-# include "device_conf.h"
-# include "storage_adapter_conf.h"
-# include "virenum.h"
+#include "internal.h"
+#include "virbitmap.h"
+#include "virutil.h"
+#include "virscsihost.h"
+#include "virpci.h"
+#include "virvhba.h"
+#include "device_conf.h"
+#include "storage_adapter_conf.h"
+#include "virenum.h"
 
-# include <libxml/tree.h>
+#include <libxml/tree.h>
 
-# define CREATE_DEVICE 1
-# define EXISTING_DEVICE 0
+#define CREATE_DEVICE 1
+#define EXISTING_DEVICE 0
 
 typedef enum {
     /* Keep in sync with VIR_ENUM_IMPL in node_device_conf.c */
@@ -348,7 +347,7 @@ virNodeDeviceDefFree(virNodeDeviceDefPtr def);
 void
 virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps);
 
-# define VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP \
+#define VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP \
                 (VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM        | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV       | \
                  VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV       | \
@@ -383,5 +382,3 @@ virNodeDeviceUpdateCaps(virNodeDeviceDefPtr def);
 int
 virNodeDeviceCapsListExport(virNodeDeviceDefPtr def,
                             virNodeDevCapType **list);
-
-#endif /* LIBVIRT_NODE_DEVICE_CONF_H */
diff --git a/src/conf/node_device_event.h b/src/conf/node_device_event.h
index b30177a901..8fe55ba6d1 100644
--- a/src/conf/node_device_event.h
+++ b/src/conf/node_device_event.h
@@ -20,12 +20,11 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NODE_DEVICE_EVENT_H
-# define LIBVIRT_NODE_DEVICE_EVENT_H
+#pragma once
 
-# include "internal.h"
-# include "object_event.h"
-# include "object_event_private.h"
+#include "internal.h"
+#include "object_event.h"
+#include "object_event_private.h"
 
 int
 virNodeDeviceEventStateRegisterID(virConnectPtr conn,
@@ -58,5 +57,3 @@ virNodeDeviceEventLifecycleNew(const char *name,
 
 virObjectEventPtr
 virNodeDeviceEventUpdateNew(const char *name);
-
-#endif /* LIBVIRT_NODE_DEVICE_EVENT_H */
diff --git a/src/conf/node_device_util.h b/src/conf/node_device_util.h
index e040bf62a9..933b7f6e31 100644
--- a/src/conf/node_device_util.h
+++ b/src/conf/node_device_util.h
@@ -16,10 +16,9 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_NODE_DEVICE_UTIL_H
-# define LIBVIRT_NODE_DEVICE_UTIL_H
+#pragma once
 
-# include "conf/storage_adapter_conf.h"
+#include "conf/storage_adapter_conf.h"
 
 char *
 virNodeDeviceGetParentName(virConnectPtr conn,
@@ -31,5 +30,3 @@ virNodeDeviceCreateVport(virStorageAdapterFCHostPtr fchost);
 int
 virNodeDeviceDeleteVport(virConnectPtr conn,
                          virStorageAdapterFCHostPtr fchost);
-
-#endif /* LIBVIRT_NODE_DEVICE_UTIL_H */
diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h
index a560852c27..1abfcb9af4 100644
--- a/src/conf/virnodedeviceobj.h
+++ b/src/conf/virnodedeviceobj.h
@@ -17,14 +17,13 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_VIRNODEDEVICEOBJ_H
-# define LIBVIRT_VIRNODEDEVICEOBJ_H
+#pragma once
 
-# include "internal.h"
-# include "virthread.h"
+#include "internal.h"
+#include "virthread.h"
 
-# include "node_device_conf.h"
-# include "object_event.h"
+#include "node_device_conf.h"
+#include "object_event.h"
 
 
 typedef struct _virNodeDeviceObj virNodeDeviceObj;
@@ -112,5 +111,3 @@ virNodeDeviceObjListExport(virConnectPtr conn,
 void
 virNodeDeviceObjSetSkipUpdateCaps(virNodeDeviceObjPtr obj,
                                   bool skipUpdateCaps);
-
-#endif /* LIBVIRT_VIRNODEDEVICEOBJ_H */
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux