]> xenbits.xensource.com Git - libvirt.git/commitdiff
src/esx: use #pragma once in headers
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 7 Jun 2019 20:20:24 +0000 (15:20 -0500)
committerJán Tomko <jtomko@redhat.com>
Thu, 13 Jun 2019 15:05:09 +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>
12 files changed:
src/esx/esx_driver.h
src/esx/esx_interface_driver.h
src/esx/esx_network_driver.h
src/esx/esx_private.h
src/esx/esx_storage_backend_iscsi.h
src/esx/esx_storage_backend_vmfs.h
src/esx/esx_storage_driver.h
src/esx/esx_stream.h
src/esx/esx_util.h
src/esx/esx_vi.h
src/esx/esx_vi_methods.h
src/esx/esx_vi_types.h

index 6c8f32c9d6c6a4097677f5152505078182decfae..f37fec4867ef5e7046c01f1652ae63775db9e349 100644 (file)
@@ -20,9 +20,6 @@
  *
  */
 
-#ifndef LIBVIRT_ESX_DRIVER_H
-# define LIBVIRT_ESX_DRIVER_H
+#pragma once
 
 int esxRegister(void);
-
-#endif /* LIBVIRT_ESX_DRIVER_H */
index 20e4fe60d0dca1a1c9568651ee559b34e5d35621..014e9d06d48ee126076f552510c9c6eaf5d74cc1 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_INTERFACE_DRIVER_H
-# define LIBVIRT_ESX_INTERFACE_DRIVER_H
+#pragma once
 
-# include "driver.h"
+#include "driver.h"
 
 extern virInterfaceDriver esxInterfaceDriver;
-
-#endif /* LIBVIRT_ESX_INTERFACE_DRIVER_H */
index c977a1abcf39f19edcad57f75c6e10d6879403d6..b15e160c697ffe48883c3074ec13f5c0d402ad04 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_NETWORK_DRIVER_H
-# define LIBVIRT_ESX_NETWORK_DRIVER_H
+#pragma once
 
-# include "driver.h"
+#include "driver.h"
 
 extern virNetworkDriver esxNetworkDriver;
-
-#endif /* LIBVIRT_ESX_NETWORK_DRIVER_H */
index abb4567e8f23ded1632b57721fddceed7381aa79..15edab4aa12f22a2b9344d595d628e6a64ac0883 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_PRIVATE_H
-# define LIBVIRT_ESX_PRIVATE_H
+#pragma once
 
-# include "internal.h"
-# include "virerror.h"
-# include "capabilities.h"
-# include "domain_conf.h"
-# include "esx_vi.h"
+#include "internal.h"
+#include "virerror.h"
+#include "capabilities.h"
+#include "domain_conf.h"
+#include "esx_vi.h"
 
 typedef struct _esxPrivate {
     esxVI_Context *primary; /* points to host or vCenter */
@@ -41,5 +40,3 @@ typedef struct _esxPrivate {
     esxVI_Boolean supportsScreenshot;
     int32_t usedCpuTimeCounterId;
 } esxPrivate;
-
-#endif /* LIBVIRT_ESX_PRIVATE_H */
index 09ca4ac8131edc0de24251854bb996e7df66dc6e..7d62060122636a7deaa92ec3fdcc35119ef5f408 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
-# define LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
+#pragma once
 
-# include "driver.h"
+#include "driver.h"
 
 extern virStorageDriver esxStorageBackendISCSI;
-
-#endif /* LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H */
index 67b8af38cc4f1c341b9b0ebd4114d2b6ec1d1cb4..153996d6c66ff31d214121aeb57c29adcfd149d6 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
-# define LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
+#pragma once
 
-# include "driver.h"
+#include "driver.h"
 
 extern virStorageDriver esxStorageBackendVMFS;
-
-#endif /* LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H */
index 73110cf8e6064d77df9115486b25fd95ca65bd91..3c487355c8be1780402b6678d093cd2703cff20c 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_STORAGE_DRIVER_H
-# define LIBVIRT_ESX_STORAGE_DRIVER_H
+#pragma once
 
-# include "driver.h"
+#include "driver.h"
 
 extern virStorageDriver esxStorageDriver;
-
-#endif /* LIBVIRT_ESX_STORAGE_DRIVER_H */
index f00b4443aadc6d48b6b94b62eba7acd7e5cdc900..29ca014c67ccd11f91c432e18be427a3fb75450f 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_STREAM_H
-# define LIBVIRT_ESX_STREAM_H
+#pragma once
 
-# include "internal.h"
-# include "esx_private.h"
+#include "internal.h"
+#include "esx_private.h"
 
 int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char *url);
 int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const char *url,
                           unsigned long long offset, unsigned long long length);
-
-#endif /* LIBVIRT_ESX_STREAM_H */
index 163626688e71ff7857399a949da8b8ae6679ed16..d80093dcb5a35182faa5971948f95b4ce0e6c971 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_UTIL_H
-# define LIBVIRT_ESX_UTIL_H
+#pragma once
 
-# include <netdb.h>
-# include "internal.h"
-# include "viruri.h"
+#include <netdb.h>
+#include "internal.h"
+#include "viruri.h"
 
-# define ESX_VI_CHECK_ARG_LIST(val) \
+#define ESX_VI_CHECK_ARG_LIST(val) \
     do { \
         if (!val || *val) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); \
@@ -69,5 +68,3 @@ void esxUtil_ReplaceSpecialWindowsPathChars(char *string);
 char *esxUtil_EscapeDatastoreItem(const char *string);
 
 char *esxUtil_EscapeForXml(const char *string);
-
-#endif /* LIBVIRT_ESX_UTIL_H */
index ff2abfb0345af2e8c13970f62e71afbd234339c2..bff2782ba151af41ece59391607bc1ee50497f44 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_VI_H
-# define LIBVIRT_ESX_VI_H
+#pragma once
 
-# include <libxml/tree.h>
-# include <libxml/xpath.h>
-# include <curl/curl.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <curl/curl.h>
 
-# include "internal.h"
-# include "virerror.h"
-# include "datatypes.h"
-# include "esx_vi_types.h"
-# include "esx_util.h"
+#include "internal.h"
+#include "virerror.h"
+#include "datatypes.h"
+#include "esx_vi_types.h"
+#include "esx_util.h"
 
 /* curl_multi_wait was added in libcurl 7.28.0, emulate it on older versions */
-# define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00)
+#define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00)
 
 
 
-# define ESX_VI__SOAP__REQUEST_HEADER \
+#define ESX_VI__SOAP__REQUEST_HEADER \
     "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
     "<soapenv:Envelope\n" \
     " xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" \
 
 
 
-# define ESX_VI__SOAP__REQUEST_FOOTER \
+#define ESX_VI__SOAP__REQUEST_FOOTER \
     "</soapenv:Body>\n" \
     "</soapenv:Envelope>"
 
 
 
-# define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
+#define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
     do { \
         virBufferAddLit(_buffer, "<"); \
         virBufferAdd(_buffer, _element, -1); \
@@ -66,7 +65,7 @@
 
 
 
-# define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \
+#define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \
     do { \
         virBufferAddLit(_buffer, "</"); \
         virBufferAdd(_buffer, _element, -1); \
@@ -160,11 +159,11 @@ int esxVI_SharedCURL_Remove(esxVI_SharedCURL *shared, esxVI_CURL *curl);
 struct _esxVI_MultiCURL {
     CURLM *handle;
     size_t count; /* number of added easy handle */
-# if ESX_EMULATE_CURL_MULTI_WAIT
+#if ESX_EMULATE_CURL_MULTI_WAIT
     struct pollfd *pollfds;
     size_t npollfds;
     bool timeoutPending;
-# endif
+#endif
 };
 
 int esxVI_MultiCURL_Alloc(esxVI_MultiCURL **multi);
@@ -530,6 +529,4 @@ int esxVI_LookupHostScsiTopologyLunListByTargetName
 int esxVI_LookupStoragePoolNameByScsiLunKey(esxVI_Context *ctx, const char *key,
                                             char **poolName);
 
-# include "esx_vi.generated.h"
-
-#endif /* LIBVIRT_ESX_VI_H */
+#include "esx_vi.generated.h"
index b09f64ba480aae5de03cea57ae7ad43b8270c899..3f0823dbd1c5433f2a712e2f1c2a55d4414eae48 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_VI_METHODS_H
-# define LIBVIRT_ESX_VI_METHODS_H
+#pragma once
 
-# include "esx_vi.h"
-# include "esx_vi_types.h"
+#include "esx_vi.h"
+#include "esx_vi_types.h"
 
 
 
@@ -44,6 +43,4 @@ int esxVI_ValidateMigration
        esxVI_ManagedObjectReference *host,                 /* optional */
        esxVI_Event **output);                              /* optional, list */
 
-# include "esx_vi_methods.generated.h"
-
-#endif /* LIBVIRT_ESX_VI_METHODS_H */
+#include "esx_vi_methods.generated.h"
index d43e825a486c3052a06530e680cba24ab664d0ae..956c43df9a3cff57a3156993ac0f1809cc39afd6 100644 (file)
  *
  */
 
-#ifndef LIBVIRT_ESX_VI_TYPES_H
-# define LIBVIRT_ESX_VI_TYPES_H
+#pragma once
 
-# include "virbuffer.h"
+#include "virbuffer.h"
 
 typedef enum _esxVI_Type esxVI_Type;
 typedef struct _esxVI_Object esxVI_Object;
@@ -60,7 +59,7 @@ typedef struct _esxVI_MethodFault esxVI_MethodFault;
 typedef struct _esxVI_ManagedObjectReference esxVI_ManagedObjectReference;
 typedef struct _esxVI_Event esxVI_Event;
 
-# include "esx_vi_types.generated.typedef"
+#include "esx_vi_types.generated.typedef"
 
 
 
@@ -83,7 +82,7 @@ enum _esxVI_Type {
     esxVI_Type_ManagedObjectReference,
     esxVI_Type_Event,
 
-# include "esx_vi_types.generated.typeenum"
+#include "esx_vi_types.generated.typeenum"
 
     esxVI_Type_Other,
 };
@@ -409,7 +408,7 @@ int esxVI_Event_DeserializeList(xmlNodePtr node, esxVI_Event **list);
 
 
 
-# include "esx_vi_types.generated.h"
+#include "esx_vi_types.generated.h"
 
 
 
@@ -419,5 +418,3 @@ int esxVI_Event_DeserializeList(xmlNodePtr node, esxVI_Event **list);
 
 int esxVI_VirtualMachinePowerState_ConvertToLibvirt
       (esxVI_VirtualMachinePowerState powerState);
-
-#endif /* LIBVIRT_ESX_VI_TYPES_H */