mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
src/esx: use #pragma once in headers
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>
This commit is contained in:
parent
d293ff8efc
commit
a037259055
@ -20,9 +20,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_DRIVER_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_DRIVER_H
|
|
||||||
|
|
||||||
int esxRegister(void);
|
int esxRegister(void);
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_DRIVER_H */
|
|
||||||
|
@ -20,11 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_INTERFACE_DRIVER_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_INTERFACE_DRIVER_H
|
|
||||||
|
|
||||||
# include "driver.h"
|
#include "driver.h"
|
||||||
|
|
||||||
extern virInterfaceDriver esxInterfaceDriver;
|
extern virInterfaceDriver esxInterfaceDriver;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_INTERFACE_DRIVER_H */
|
|
||||||
|
@ -20,11 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_NETWORK_DRIVER_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_NETWORK_DRIVER_H
|
|
||||||
|
|
||||||
# include "driver.h"
|
#include "driver.h"
|
||||||
|
|
||||||
extern virNetworkDriver esxNetworkDriver;
|
extern virNetworkDriver esxNetworkDriver;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_NETWORK_DRIVER_H */
|
|
||||||
|
@ -19,14 +19,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_PRIVATE_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_PRIVATE_H
|
|
||||||
|
|
||||||
# include "internal.h"
|
#include "internal.h"
|
||||||
# include "virerror.h"
|
#include "virerror.h"
|
||||||
# include "capabilities.h"
|
#include "capabilities.h"
|
||||||
# include "domain_conf.h"
|
#include "domain_conf.h"
|
||||||
# include "esx_vi.h"
|
#include "esx_vi.h"
|
||||||
|
|
||||||
typedef struct _esxPrivate {
|
typedef struct _esxPrivate {
|
||||||
esxVI_Context *primary; /* points to host or vCenter */
|
esxVI_Context *primary; /* points to host or vCenter */
|
||||||
@ -41,5 +40,3 @@ typedef struct _esxPrivate {
|
|||||||
esxVI_Boolean supportsScreenshot;
|
esxVI_Boolean supportsScreenshot;
|
||||||
int32_t usedCpuTimeCounterId;
|
int32_t usedCpuTimeCounterId;
|
||||||
} esxPrivate;
|
} esxPrivate;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_PRIVATE_H */
|
|
||||||
|
@ -19,11 +19,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H
|
|
||||||
|
|
||||||
# include "driver.h"
|
#include "driver.h"
|
||||||
|
|
||||||
extern virStorageDriver esxStorageBackendISCSI;
|
extern virStorageDriver esxStorageBackendISCSI;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H */
|
|
||||||
|
@ -20,11 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H
|
|
||||||
|
|
||||||
# include "driver.h"
|
#include "driver.h"
|
||||||
|
|
||||||
extern virStorageDriver esxStorageBackendVMFS;
|
extern virStorageDriver esxStorageBackendVMFS;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H */
|
|
||||||
|
@ -20,11 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_STORAGE_DRIVER_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_STORAGE_DRIVER_H
|
|
||||||
|
|
||||||
# include "driver.h"
|
#include "driver.h"
|
||||||
|
|
||||||
extern virStorageDriver esxStorageDriver;
|
extern virStorageDriver esxStorageDriver;
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_STORAGE_DRIVER_H */
|
|
||||||
|
@ -19,14 +19,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_STREAM_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_STREAM_H
|
|
||||||
|
|
||||||
# include "internal.h"
|
#include "internal.h"
|
||||||
# include "esx_private.h"
|
#include "esx_private.h"
|
||||||
|
|
||||||
int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char *url);
|
int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char *url);
|
||||||
int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const char *url,
|
int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const char *url,
|
||||||
unsigned long long offset, unsigned long long length);
|
unsigned long long offset, unsigned long long length);
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_STREAM_H */
|
|
||||||
|
@ -19,14 +19,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_UTIL_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_UTIL_H
|
|
||||||
|
|
||||||
# include <netdb.h>
|
#include <netdb.h>
|
||||||
# include "internal.h"
|
#include "internal.h"
|
||||||
# include "viruri.h"
|
#include "viruri.h"
|
||||||
|
|
||||||
# define ESX_VI_CHECK_ARG_LIST(val) \
|
#define ESX_VI_CHECK_ARG_LIST(val) \
|
||||||
do { \
|
do { \
|
||||||
if (!val || *val) { \
|
if (!val || *val) { \
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); \
|
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_EscapeDatastoreItem(const char *string);
|
||||||
|
|
||||||
char *esxUtil_EscapeForXml(const char *string);
|
char *esxUtil_EscapeForXml(const char *string);
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_UTIL_H */
|
|
||||||
|
@ -20,25 +20,24 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_VI_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_VI_H
|
|
||||||
|
|
||||||
# include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
# include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
# include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
# include "internal.h"
|
#include "internal.h"
|
||||||
# include "virerror.h"
|
#include "virerror.h"
|
||||||
# include "datatypes.h"
|
#include "datatypes.h"
|
||||||
# include "esx_vi_types.h"
|
#include "esx_vi_types.h"
|
||||||
# include "esx_util.h"
|
#include "esx_util.h"
|
||||||
|
|
||||||
/* curl_multi_wait was added in libcurl 7.28.0, emulate it on older versions */
|
/* 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" \
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
|
||||||
"<soapenv:Envelope\n" \
|
"<soapenv:Envelope\n" \
|
||||||
" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" \
|
" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"\n" \
|
||||||
@ -49,13 +48,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# define ESX_VI__SOAP__REQUEST_FOOTER \
|
#define ESX_VI__SOAP__REQUEST_FOOTER \
|
||||||
"</soapenv:Body>\n" \
|
"</soapenv:Body>\n" \
|
||||||
"</soapenv:Envelope>"
|
"</soapenv:Envelope>"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
|
#define ESV_VI__XML_TAG__OPEN(_buffer, _element, _type) \
|
||||||
do { \
|
do { \
|
||||||
virBufferAddLit(_buffer, "<"); \
|
virBufferAddLit(_buffer, "<"); \
|
||||||
virBufferAdd(_buffer, _element, -1); \
|
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 { \
|
do { \
|
||||||
virBufferAddLit(_buffer, "</"); \
|
virBufferAddLit(_buffer, "</"); \
|
||||||
virBufferAdd(_buffer, _element, -1); \
|
virBufferAdd(_buffer, _element, -1); \
|
||||||
@ -160,11 +159,11 @@ int esxVI_SharedCURL_Remove(esxVI_SharedCURL *shared, esxVI_CURL *curl);
|
|||||||
struct _esxVI_MultiCURL {
|
struct _esxVI_MultiCURL {
|
||||||
CURLM *handle;
|
CURLM *handle;
|
||||||
size_t count; /* number of added easy handle */
|
size_t count; /* number of added easy handle */
|
||||||
# if ESX_EMULATE_CURL_MULTI_WAIT
|
#if ESX_EMULATE_CURL_MULTI_WAIT
|
||||||
struct pollfd *pollfds;
|
struct pollfd *pollfds;
|
||||||
size_t npollfds;
|
size_t npollfds;
|
||||||
bool timeoutPending;
|
bool timeoutPending;
|
||||||
# endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int esxVI_MultiCURL_Alloc(esxVI_MultiCURL **multi);
|
int esxVI_MultiCURL_Alloc(esxVI_MultiCURL **multi);
|
||||||
@ -530,6 +529,4 @@ int esxVI_LookupHostScsiTopologyLunListByTargetName
|
|||||||
int esxVI_LookupStoragePoolNameByScsiLunKey(esxVI_Context *ctx, const char *key,
|
int esxVI_LookupStoragePoolNameByScsiLunKey(esxVI_Context *ctx, const char *key,
|
||||||
char **poolName);
|
char **poolName);
|
||||||
|
|
||||||
# include "esx_vi.generated.h"
|
#include "esx_vi.generated.h"
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_VI_H */
|
|
||||||
|
@ -19,11 +19,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_VI_METHODS_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_VI_METHODS_H
|
|
||||||
|
|
||||||
# include "esx_vi.h"
|
#include "esx_vi.h"
|
||||||
# include "esx_vi_types.h"
|
#include "esx_vi_types.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -44,6 +43,4 @@ int esxVI_ValidateMigration
|
|||||||
esxVI_ManagedObjectReference *host, /* optional */
|
esxVI_ManagedObjectReference *host, /* optional */
|
||||||
esxVI_Event **output); /* optional, list */
|
esxVI_Event **output); /* optional, list */
|
||||||
|
|
||||||
# include "esx_vi_methods.generated.h"
|
#include "esx_vi_methods.generated.h"
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_VI_METHODS_H */
|
|
||||||
|
@ -19,10 +19,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBVIRT_ESX_VI_TYPES_H
|
#pragma once
|
||||||
# define LIBVIRT_ESX_VI_TYPES_H
|
|
||||||
|
|
||||||
# include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
|
|
||||||
typedef enum _esxVI_Type esxVI_Type;
|
typedef enum _esxVI_Type esxVI_Type;
|
||||||
typedef struct _esxVI_Object esxVI_Object;
|
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_ManagedObjectReference esxVI_ManagedObjectReference;
|
||||||
typedef struct _esxVI_Event esxVI_Event;
|
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_ManagedObjectReference,
|
||||||
esxVI_Type_Event,
|
esxVI_Type_Event,
|
||||||
|
|
||||||
# include "esx_vi_types.generated.typeenum"
|
#include "esx_vi_types.generated.typeenum"
|
||||||
|
|
||||||
esxVI_Type_Other,
|
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
|
int esxVI_VirtualMachinePowerState_ConvertToLibvirt
|
||||||
(esxVI_VirtualMachinePowerState powerState);
|
(esxVI_VirtualMachinePowerState powerState);
|
||||||
|
|
||||||
#endif /* LIBVIRT_ESX_VI_TYPES_H */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user