]> xenbits.xensource.com Git - libvirt.git/commitdiff
Use #pragma once in driver headers
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 7 Jun 2019 20:20:12 +0000 (15:20 -0500)
committerJán Tomko <jtomko@redhat.com>
Thu, 13 Jun 2019 15:05:08 +0000 (17:05 +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/driver-hypervisor.h
src/driver-interface.h
src/driver-network.h
src/driver-nodedev.h
src/driver-nwfilter.h
src/driver-secret.h
src/driver-state.h
src/driver-storage.h
src/driver-stream.h
src/driver.h

index 5315e33dde50d36bfc745b4d6d3f95c82830b666..b15aaa36bc10045374639f69f978d7f393806605 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_HYPERVISOR_H
-# define LIBVIRT_DRIVER_HYPERVISOR_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvConnectURIProbe)(char **uri);
@@ -1581,6 +1580,3 @@ struct _virHypervisorDriver {
     virDrvNodeGetSEVInfo nodeGetSEVInfo;
     virDrvDomainGetLaunchSecurityInfo domainGetLaunchSecurityInfo;
 };
-
-
-#endif /* LIBVIRT_DRIVER_HYPERVISOR_H */
index 5373f5e66a4b0529f828d85d290e6c9c9df86611..117c93b66fa6237a7c1b36293565ce602c28169e 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_INTERFACE_H
-# define LIBVIRT_DRIVER_INTERFACE_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvConnectNumOfInterfaces)(virConnectPtr conn);
@@ -117,6 +116,3 @@ struct _virInterfaceDriver {
     virDrvInterfaceChangeCommit interfaceChangeCommit;
     virDrvInterfaceChangeRollback interfaceChangeRollback;
 };
-
-
-#endif /* LIBVIRT_DRIVER_INTERFACE_H */
index 2715c7bfece55c5cf1245a08795427108b809095..a4f71a8fd1fd837bd6c004c4215b7dfea39a18ea 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_NETWORK_H
-# define LIBVIRT_DRIVER_NETWORK_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvConnectNumOfNetworks)(virConnectPtr conn);
@@ -152,6 +151,3 @@ struct _virNetworkDriver {
     virDrvNetworkIsPersistent networkIsPersistent;
     virDrvNetworkGetDHCPLeases networkGetDHCPLeases;
 };
-
-
-#endif /* LIBVIRT_DRIVER_NETWORK_H */
index c506e846f6b94bcf60ba976c04ca87bc024e3326..d0fc7f19cf73318d93ea33aecadd1325945cbe1f 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_NODEDEV_H
-# define LIBVIRT_DRIVER_NODEDEV_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvNodeNumOfDevices)(virConnectPtr conn,
@@ -115,6 +114,3 @@ struct _virNodeDeviceDriver {
     virDrvNodeDeviceCreateXML nodeDeviceCreateXML;
     virDrvNodeDeviceDestroy nodeDeviceDestroy;
 };
-
-
-#endif /* LIBVIRT_DRIVER_NODEDEV_H */
index 7bcb823f0ac2d18978170a1b7d365a554a0abda0..7e956224231abb8adef65ef0acb73f3d7d89ea5c 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_NWFILTER_H
-# define LIBVIRT_DRIVER_NWFILTER_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvConnectNumOfNWFilters)(virConnectPtr conn);
@@ -108,6 +107,3 @@ struct _virNWFilterDriver {
     virDrvNWFilterBindingDelete nwfilterBindingDelete;
     virDrvNWFilterBindingGetXMLDesc nwfilterBindingGetXMLDesc;
 };
-
-
-#endif /* LIBVIRT_DRIVER_NWFILTER_H */
index 1dcae638808228fc2e64f72aa1bd02dadd93f9df..125238fe7b6753a6b40e4ef0890fdd5357407ecd 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_SECRET_H
-# define LIBVIRT_DRIVER_SECRET_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 enum {
     /* This getValue call is inside libvirt, override the "private" flag.
@@ -113,6 +112,3 @@ struct _virSecretDriver {
     virDrvConnectSecretEventRegisterAny connectSecretEventRegisterAny;
     virDrvConnectSecretEventDeregisterAny connectSecretEventDeregisterAny;
 };
-
-
-#endif /* LIBVIRT_DRIVER_SECRET_H */
index a8595662afff9fa8c61b62ea37d7320d1e7203df..974b2252ee9b20a99d3c54cfe37267c51b737522 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_STATE_H
-# define LIBVIRT_DRIVER_STATE_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvStateInitialize)(bool privileged,
@@ -49,6 +48,3 @@ struct _virStateDriver {
     virDrvStateReload stateReload;
     virDrvStateStop stateStop;
 };
-
-
-#endif /* LIBVIRT_DRIVER_STATE_H */
index 2a855c34d8bfbda04491dc52ede41cd4b9e4cc4f..e11d1b78956f7cc9dec9bc67aad8b2b09c0b2299 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_STORAGE_H
-# define LIBVIRT_DRIVER_STORAGE_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvConnectNumOfStoragePools)(virConnectPtr conn);
@@ -279,6 +278,3 @@ struct _virStorageDriver {
     virDrvStoragePoolIsActive storagePoolIsActive;
     virDrvStoragePoolIsPersistent storagePoolIsPersistent;
 };
-
-
-#endif /* LIBVIRT_DRIVER_STORAGE_H */
index 4978f90d2db0a9a8f55eaf19135a87ce532dc63e..a5b16c8c4e48e85002c4860880edf52668795980 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_STREAM_H
-# define LIBVIRT_DRIVER_STREAM_H
+#pragma once
 
-# ifndef __VIR_DRIVER_H_INCLUDES___
-#  error "Don't include this file directly, only use driver.h"
-# endif
+#ifndef __VIR_DRIVER_H_INCLUDES___
+# error "Don't include this file directly, only use driver.h"
+#endif
 
 typedef int
 (*virDrvStreamSend)(virStreamPtr st,
@@ -92,6 +91,3 @@ struct _virStreamDriver {
     virDrvStreamFinish streamFinish;
     virDrvStreamAbort streamAbort;
 };
-
-
-#endif /* LIBVIRT_DRIVER_STREAM_H */
index 6472bd9367702e9c7f18f9cd2b2a5a84c97949ef..3fcea0d629c6d9d5359d21efc013b1869cd6788e 100644 (file)
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBVIRT_DRIVER_H
-# define LIBVIRT_DRIVER_H
+#pragma once
 
-# include <unistd.h>
+#include <unistd.h>
 
-# include "internal.h"
-# include "libvirt_internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "libvirt_internal.h"
+#include "viruri.h"
 
 
 /* Status codes returned from driver open call. */
@@ -56,24 +55,24 @@ typedef enum {
  *   != 0  Feature is supported.
  *   0     Feature is not supported.
  */
-# define VIR_DRV_SUPPORTS_FEATURE(drv, conn, feature) \
+#define VIR_DRV_SUPPORTS_FEATURE(drv, conn, feature) \
     ((drv)->connectSupportsFeature ? \
         (drv)->connectSupportsFeature((conn), (feature)) > 0 : 0)
 
 
-# define __VIR_DRIVER_H_INCLUDES___
+#define __VIR_DRIVER_H_INCLUDES___
 
-# include "driver-hypervisor.h"
-# include "driver-interface.h"
-# include "driver-network.h"
-# include "driver-nodedev.h"
-# include "driver-nwfilter.h"
-# include "driver-secret.h"
-# include "driver-state.h"
-# include "driver-stream.h"
-# include "driver-storage.h"
+#include "driver-hypervisor.h"
+#include "driver-interface.h"
+#include "driver-network.h"
+#include "driver-nodedev.h"
+#include "driver-nwfilter.h"
+#include "driver-secret.h"
+#include "driver-state.h"
+#include "driver-stream.h"
+#include "driver-storage.h"
 
-# undef __VIR_DRIVER_H_INCLUDES___
+#undef __VIR_DRIVER_H_INCLUDES___
 
 typedef struct _virConnectDriver virConnectDriver;
 typedef virConnectDriver *virConnectDriverPtr;
@@ -126,5 +125,3 @@ int virSetConnectNWFilter(virConnectPtr conn);
 int virSetConnectNodeDev(virConnectPtr conn);
 int virSetConnectSecret(virConnectPtr conn);
 int virSetConnectStorage(virConnectPtr conn);
-
-#endif /* LIBVIRT_DRIVER_H */