From nobody Fri Dec 19 19:15:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559938974; cv=none; d=zoho.com; s=zohoarc; b=baF2jU1vjApE7Y5sUTFPOAP32YaX/JzQ8ZIhNppRG+XK3nM9vw5giY8QJr4ke7soHr7AibIurL2Q97Z4IjmkV7m53ZCvL8BFf0toLZDkDacAFy/qWf5Ug9xKNRmmUk+hiVKZKUurfeTTbEB61YK+f4N90210SgIUOAt0Dpn7PEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938974; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ucD6AAihrxrX7Zcxf5ru1OcXnBsLlCWfstoT7lB2fpU=; b=WR6tv5D0RCjz9Pr1rZxmxcuUNhIhHgomAL4uM2UwusgXX0BEcLL+5lbWTkTMbffXK8QmfCS7OMt4QgxqMDhADWprlaR7Mw9GaFcurzv8Fq5XaGdL9zR7PWChYC+4Zs93nN1nZ04D2Xb76IFPZu2ukB3qdefolhziMlMbn9pWtyc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559938974112869.5108213890406; Fri, 7 Jun 2019 13:22:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 094323078AAC; Fri, 7 Jun 2019 20:22:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDD045D9C6; Fri, 7 Jun 2019 20:22:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8C8091806B1C; Fri, 7 Jun 2019 20:22:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKgS9025753 for ; Fri, 7 Jun 2019 16:20:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 09B2D5C205; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB10C5C220 for ; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:24 -0500 Message-Id: <20190607202030.29625-14-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/19] src/esx: use #pragma once in headers X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 07 Jun 2019 20:22:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma --- src/esx/esx_driver.h | 5 +--- src/esx/esx_interface_driver.h | 7 ++---- src/esx/esx_network_driver.h | 7 ++---- src/esx/esx_private.h | 15 +++++------- src/esx/esx_storage_backend_iscsi.h | 7 ++---- src/esx/esx_storage_backend_vmfs.h | 7 ++---- src/esx/esx_storage_driver.h | 7 ++---- src/esx/esx_stream.h | 9 +++---- src/esx/esx_util.h | 13 ++++------ src/esx/esx_vi.h | 37 +++++++++++++---------------- src/esx/esx_vi_methods.h | 11 ++++----- src/esx/esx_vi_types.h | 13 ++++------ 12 files changed, 51 insertions(+), 87 deletions(-) diff --git a/src/esx/esx_driver.h b/src/esx/esx_driver.h index 6c8f32c9d6..f37fec4867 100644 --- a/src/esx/esx_driver.h +++ b/src/esx/esx_driver.h @@ -20,9 +20,6 @@ * */ =20 -#ifndef LIBVIRT_ESX_DRIVER_H -# define LIBVIRT_ESX_DRIVER_H +#pragma once =20 int esxRegister(void); - -#endif /* LIBVIRT_ESX_DRIVER_H */ diff --git a/src/esx/esx_interface_driver.h b/src/esx/esx_interface_driver.h index 20e4fe60d0..014e9d06d4 100644 --- a/src/esx/esx_interface_driver.h +++ b/src/esx/esx_interface_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_INTERFACE_DRIVER_H -# define LIBVIRT_ESX_INTERFACE_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virInterfaceDriver esxInterfaceDriver; - -#endif /* LIBVIRT_ESX_INTERFACE_DRIVER_H */ diff --git a/src/esx/esx_network_driver.h b/src/esx/esx_network_driver.h index c977a1abcf..b15e160c69 100644 --- a/src/esx/esx_network_driver.h +++ b/src/esx/esx_network_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_NETWORK_DRIVER_H -# define LIBVIRT_ESX_NETWORK_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virNetworkDriver esxNetworkDriver; - -#endif /* LIBVIRT_ESX_NETWORK_DRIVER_H */ diff --git a/src/esx/esx_private.h b/src/esx/esx_private.h index abb4567e8f..15edab4aa1 100644 --- a/src/esx/esx_private.h +++ b/src/esx/esx_private.h @@ -19,14 +19,13 @@ * */ =20 -#ifndef LIBVIRT_ESX_PRIVATE_H -# define LIBVIRT_ESX_PRIVATE_H +#pragma once =20 -# 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" =20 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 */ diff --git a/src/esx/esx_storage_backend_iscsi.h b/src/esx/esx_storage_back= end_iscsi.h index 09ca4ac813..7d62060122 100644 --- a/src/esx/esx_storage_backend_iscsi.h +++ b/src/esx/esx_storage_backend_iscsi.h @@ -19,11 +19,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H -# define LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageBackendISCSI; - -#endif /* LIBVIRT_ESX_STORAGE_BACKEND_ISCSI_H */ diff --git a/src/esx/esx_storage_backend_vmfs.h b/src/esx/esx_storage_backe= nd_vmfs.h index 67b8af38cc..153996d6c6 100644 --- a/src/esx/esx_storage_backend_vmfs.h +++ b/src/esx/esx_storage_backend_vmfs.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H -# define LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageBackendVMFS; - -#endif /* LIBVIRT_ESX_STORAGE_BACKEND_VMFS_H */ diff --git a/src/esx/esx_storage_driver.h b/src/esx/esx_storage_driver.h index 73110cf8e6..3c487355c8 100644 --- a/src/esx/esx_storage_driver.h +++ b/src/esx/esx_storage_driver.h @@ -20,11 +20,8 @@ * */ =20 -#ifndef LIBVIRT_ESX_STORAGE_DRIVER_H -# define LIBVIRT_ESX_STORAGE_DRIVER_H +#pragma once =20 -# include "driver.h" +#include "driver.h" =20 extern virStorageDriver esxStorageDriver; - -#endif /* LIBVIRT_ESX_STORAGE_DRIVER_H */ diff --git a/src/esx/esx_stream.h b/src/esx/esx_stream.h index f00b4443aa..29ca014c67 100644 --- a/src/esx/esx_stream.h +++ b/src/esx/esx_stream.h @@ -19,14 +19,11 @@ * */ =20 -#ifndef LIBVIRT_ESX_STREAM_H -# define LIBVIRT_ESX_STREAM_H +#pragma once =20 -# include "internal.h" -# include "esx_private.h" +#include "internal.h" +#include "esx_private.h" =20 int esxStreamOpenUpload(virStreamPtr stream, esxPrivate *priv, const char = *url); int esxStreamOpenDownload(virStreamPtr stream, esxPrivate *priv, const cha= r *url, unsigned long long offset, unsigned long long le= ngth); - -#endif /* LIBVIRT_ESX_STREAM_H */ diff --git a/src/esx/esx_util.h b/src/esx/esx_util.h index 163626688e..d80093dcb5 100644 --- a/src/esx/esx_util.h +++ b/src/esx/esx_util.h @@ -19,14 +19,13 @@ * */ =20 -#ifndef LIBVIRT_ESX_UTIL_H -# define LIBVIRT_ESX_UTIL_H +#pragma once =20 -# include -# include "internal.h" -# include "viruri.h" +#include +#include "internal.h" +#include "viruri.h" =20 -# 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 argume= nt")); \ @@ -69,5 +68,3 @@ void esxUtil_ReplaceSpecialWindowsPathChars(char *string); char *esxUtil_EscapeDatastoreItem(const char *string); =20 char *esxUtil_EscapeForXml(const char *string); - -#endif /* LIBVIRT_ESX_UTIL_H */ diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h index ff2abfb034..bff2782ba1 100644 --- a/src/esx/esx_vi.h +++ b/src/esx/esx_vi.h @@ -20,25 +20,24 @@ * */ =20 -#ifndef LIBVIRT_ESX_VI_H -# define LIBVIRT_ESX_VI_H +#pragma once =20 -# include -# include -# include +#include +#include +#include =20 -# 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" =20 /* curl_multi_wait was added in libcurl 7.28.0, emulate it on older versio= ns */ -# define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00) +#define ESX_EMULATE_CURL_MULTI_WAIT (LIBCURL_VERSION_NUM < 0x071C00) =20 =20 =20 -# define ESX_VI__SOAP__REQUEST_HEADER \ +#define ESX_VI__SOAP__REQUEST_HEADER \ "\n" \ "\n" \ "" =20 =20 =20 -# 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 @@ =20 =20 =20 -# define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \ +#define ESV_VI__XML_TAG__CLOSE(_buffer, _element) \ do { \ virBufferAddLit(_buffer, "