From nobody Fri Dec 19 19:16:01 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=1559938975; cv=none; d=zoho.com; s=zohoarc; b=WhTsLxMJbI43SbvOaNrEdMEDhh2WRvxqFBcx9bihxRRG3+EUORmfTr2WTUDLgaw9QPM6HkWEC9IWkNCnXswiuEQ+Gw9fAfL1+B1MdlQg8oFGQBiWVrGdqq/vstRJIPFt05T3149fp28xWbB6zOnvqp5eagqSf4LxbVsC5atdbq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938975; 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=DQ7idKiHpwxEcY6CEMedP25rpo7tyDhcHbF0+cHexsQ=; b=TkLvfe8pUu9hjPHzzkf3jIEZ3tWgrsY9CWzoHBqpB2Yx95WshvN+R+bVHCNrzYFN06roUyah0r7pfqLLbMcTgBEnKwBELpw10bsDDCRce5Q/DtEnBPSeh9u5gI5EfQTpfkH/lqi1+pWt7ACyaHv1BMSVp7NkspCvZZV78mU/2x8= 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 1559938975059524.9709283051985; Fri, 7 Jun 2019 13:22:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F433308427E; Fri, 7 Jun 2019 20:22:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63E365C220; Fri, 7 Jun 2019 20:22:47 +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 B25B3206D7; Fri, 7 Jun 2019 20:22:46 +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 x57KKgVm025760 for ; Fri, 7 Jun 2019 16:20:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5B91C5C206; 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 2A1705C205 for ; Fri, 7 Jun 2019 20:20:42 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:25 -0500 Message-Id: <20190607202030.29625-15-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 14/19] src/hyperv: 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Jun 2019 20:22:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma --- src/hyperv/hyperv_driver.h | 5 +---- src/hyperv/hyperv_private.h | 13 +++++------- src/hyperv/hyperv_util.h | 9 +++------ src/hyperv/hyperv_wmi.h | 21 +++++++++----------- src/hyperv/hyperv_wmi_classes.h | 27 +++++++++++-------------- src/hyperv/openwsman.h | 35 +++++++++++++++------------------ 6 files changed, 46 insertions(+), 64 deletions(-) diff --git a/src/hyperv/hyperv_driver.h b/src/hyperv/hyperv_driver.h index f333fba3e1..8099b5714b 100644 --- a/src/hyperv/hyperv_driver.h +++ b/src/hyperv/hyperv_driver.h @@ -20,9 +20,6 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_DRIVER_H -# define LIBVIRT_HYPERV_DRIVER_H +#pragma once =20 int hypervRegister(void); - -#endif /* LIBVIRT_HYPERV_DRIVER_H */ diff --git a/src/hyperv/hyperv_private.h b/src/hyperv/hyperv_private.h index f8d8f7deff..b502e71d83 100644 --- a/src/hyperv/hyperv_private.h +++ b/src/hyperv/hyperv_private.h @@ -20,13 +20,12 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_PRIVATE_H -# define LIBVIRT_HYPERV_PRIVATE_H +#pragma once =20 -# include "internal.h" -# include "virerror.h" -# include "hyperv_util.h" -# include "openwsman.h" +#include "internal.h" +#include "virerror.h" +#include "hyperv_util.h" +#include "openwsman.h" =20 typedef enum _hypervWmiVersion hypervWmiVersion; enum _hypervWmiVersion { @@ -40,5 +39,3 @@ struct _hypervPrivate { WsManClient *client; hypervWmiVersion wmiVersion; }; - -#endif /* LIBVIRT_HYPERV_PRIVATE_H */ diff --git a/src/hyperv/hyperv_util.h b/src/hyperv/hyperv_util.h index c72a308da9..67d698450d 100644 --- a/src/hyperv/hyperv_util.h +++ b/src/hyperv/hyperv_util.h @@ -19,11 +19,10 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_UTIL_H -# define LIBVIRT_HYPERV_UTIL_H +#pragma once =20 -# include "internal.h" -# include "viruri.h" +#include "internal.h" +#include "viruri.h" =20 typedef struct _hypervParsedUri hypervParsedUri; =20 @@ -34,5 +33,3 @@ struct _hypervParsedUri { int hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri); =20 void hypervFreeParsedUri(hypervParsedUri **parsedUri); - -#endif /* LIBVIRT_HYPERV_UTIL_H */ diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index e3ace01131..74a74e0e09 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -21,21 +21,20 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_WMI_H -# define LIBVIRT_HYPERV_WMI_H +#pragma once =20 -# include "virbuffer.h" -# include "hyperv_private.h" -# include "hyperv_wmi_classes.h" -# include "openwsman.h" -# include "virhash.h" +#include "virbuffer.h" +#include "hyperv_private.h" +#include "hyperv_wmi_classes.h" +#include "openwsman.h" +#include "virhash.h" =20 =20 -# define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL } +#define HYPERV_WQL_QUERY_INITIALIZER { NULL, NULL } =20 -# define HYPERV_DEFAULT_PARAM_COUNT 5 +#define HYPERV_DEFAULT_PARAM_COUNT 5 =20 -# define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \ +#define MSVM_VIRTUALSYSTEMMANAGEMENTSERVICE_SELECTOR \ "CreationClassName=3DMsvm_VirtualSystemManagementService" =20 int hypervVerifyResponse(WsManClient *client, WsXmlDocH response, @@ -252,5 +251,3 @@ int hypervMsvmComputerSystemToDomain(virConnectPtr conn, =20 int hypervMsvmComputerSystemFromDomain(virDomainPtr domain, Msvm_ComputerSystem **computerSyste= m); - -#endif /* LIBVIRT_HYPERV_WMI_H */ diff --git a/src/hyperv/hyperv_wmi_classes.h b/src/hyperv/hyperv_wmi_classe= s.h index cf2ae75447..a19b6a656d 100644 --- a/src/hyperv/hyperv_wmi_classes.h +++ b/src/hyperv/hyperv_wmi_classes.h @@ -21,21 +21,20 @@ * */ =20 -#ifndef LIBVIRT_HYPERV_WMI_CLASSES_H -# define LIBVIRT_HYPERV_WMI_CLASSES_H +#pragma once =20 -# include "internal.h" -# include "openwsman.h" +#include "internal.h" +#include "openwsman.h" =20 -# include "hyperv_wmi_classes.generated.typedef" +#include "hyperv_wmi_classes.generated.typedef" =20 -# define ROOT_CIMV2 \ +#define ROOT_CIMV2 \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/*" =20 -# define ROOT_VIRTUALIZATION \ +#define ROOT_VIRTUALIZATION \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/*" =20 -# define ROOT_VIRTUALIZATION_V2 \ +#define ROOT_VIRTUALIZATION_V2 \ "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/= *" =20 =20 @@ -44,16 +43,16 @@ * Msvm_ComputerSystem */ =20 -# define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \ +#define MSVM_COMPUTERSYSTEM_WQL_VIRTUAL \ "Description =3D \"Microsoft Virtual Machine\" " =20 -# define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \ +#define MSVM_COMPUTERSYSTEM_WQL_PHYSICAL \ "Description =3D \"Microsoft Hosting Computer System\" " =20 -# define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \ +#define MSVM_COMPUTERSYSTEM_WQL_ACTIVE \ "(EnabledState !=3D 0 and EnabledState !=3D 3 and EnabledState !=3D 32= 769) " =20 -# define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \ +#define MSVM_COMPUTERSYSTEM_WQL_INACTIVE \ "(EnabledState =3D 0 or EnabledState =3D 3 or EnabledState =3D 32769) " =20 enum _Msvm_ComputerSystem_EnabledState { @@ -138,6 +137,4 @@ struct _hypervWmiClassInfoList { hypervWmiClassInfoPtr *objs; }; =20 -# include "hyperv_wmi_classes.generated.h" - -#endif /* LIBVIRT_HYPERV_WMI_CLASSES_H */ +#include "hyperv_wmi_classes.generated.h" diff --git a/src/hyperv/openwsman.h b/src/hyperv/openwsman.h index 3f19a8f890..cd7660ac2e 100644 --- a/src/hyperv/openwsman.h +++ b/src/hyperv/openwsman.h @@ -19,32 +19,29 @@ * */ =20 -#ifndef LIBVIRT_OPENWSMAN_H -# define LIBVIRT_OPENWSMAN_H +#pragma once =20 /* Workaround openwsman <=3D 2.2.6 unconditionally defining optarg. Just p= retend * that u/os.h was already included. Need to explicitly include time.h bec= ause * wsman-xml-serializer.h needs it and u/os.h would have included it. */ -# include -# define _LIBU_OS_H_ -# include +#include +#define _LIBU_OS_H_ +#include =20 /* wsman-xml-serializer.h in openwsman <=3D 2.2.6 is missing this defines = */ -# ifndef SER_NS_INT8 -# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT16 -# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT32 -# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0) -# endif -# ifndef SER_NS_INT64 -# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0) -# endif +#ifndef SER_NS_INT8 +# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT16 +# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT32 +# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0) +#endif +#ifndef SER_NS_INT64 +# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0) +#endif =20 /* wsman-xml.h */ WsXmlDocH ws_xml_create_doc(const char *rootNsUri, const char *rootName); WsXmlNodeH xml_parser_get_root(WsXmlDocH doc); - -#endif /* LIBVIRT_OPENWSMAN_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list