From nobody Fri Dec 19 19:16:03 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=1559938951; cv=none; d=zoho.com; s=zohoarc; b=WyiG7UaD7q/q3ItQHAMW1K9RePrt9+6ihCNd2OCGBkwpOlET2lKY+LksI1JXgz+xCigNRnW3yNt+DB9mC1ImrANoZCdYhUsB1o4qLA1DsLq7a47+6G+5+aq7PQTwYOTuj1hB/p62Cv9HI1xrNt7gdzu1tAvymFsJ+xjPiJsOgf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938951; 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=4sadZkqbJqIKDg7qU9UbWxX6M5D7gjlGZO2teZ3JyMQ=; b=cIro7K0IQDYxpm7dVXfJzLbKUM2koNx80wwWraYsmwBIKMwJhIXMLzoThVhD6+4LAkgXXBb8TZdBk1dMUHSqjqUdyK4rhRGMfvDmPxuSDf8S3WRpawV6pYN38yw2wbCTKNHuO86urXpVB/9eoO/6Wwp7Ckjq1k0KNjLbOYC4tUU= 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 1559938951996198.48751384222294; Fri, 7 Jun 2019 13:22:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 519058830A; Fri, 7 Jun 2019 20:22:21 +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 2859519C65; Fri, 7 Jun 2019 20:22:20 +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 DC9DF206D2; Fri, 7 Jun 2019 20:22:17 +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 x57KKd3x025695 for ; Fri, 7 Jun 2019 16:20:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 49B4B5C206; Fri, 7 Jun 2019 20:20:39 +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 18F875C205 for ; Fri, 7 Jun 2019 20:20:39 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:16 -0500 Message-Id: <20190607202030.29625-6-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 05/19] conf: domain: 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 07 Jun 2019 20:22:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma --- src/conf/domain_addr.h | 16 +++--- src/conf/domain_audit.h | 10 ++-- src/conf/domain_capabilities.h | 15 +++--- src/conf/domain_conf.h | 91 ++++++++++++++++------------------ src/conf/domain_event.h | 11 ++-- src/conf/domain_nwfilter.h | 5 +- 6 files changed, 65 insertions(+), 83 deletions(-) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 803d07d415..dcb90618f8 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -19,13 +19,12 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_ADDR_H -# define LIBVIRT_DOMAIN_ADDR_H +#pragma once =20 -# include "domain_conf.h" +#include "domain_conf.h" =20 -# define VIR_PCI_ADDRESS_SLOT_LAST 31 -# define VIR_PCI_ADDRESS_FUNCTION_LAST 7 +#define VIR_PCI_ADDRESS_SLOT_LAST 31 +#define VIR_PCI_ADDRESS_FUNCTION_LAST 7 =20 typedef enum { VIR_PCI_ADDRESS_EXTENSION_NONE =3D 0, /* no extension */ @@ -58,7 +57,7 @@ typedef enum { /* a combination of all bits that describe the type of connections * allowed, e.g. PCI, PCIe, switch */ -# define VIR_PCI_CONNECT_TYPES_MASK \ +#define VIR_PCI_CONNECT_TYPES_MASK \ (VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE | \ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT | \ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT | \ @@ -74,7 +73,7 @@ typedef enum { * upstream and downstream switch port, or a PCIe root port and a PCIe * port) */ -# define VIR_PCI_CONNECT_TYPES_ENDPOINT \ +#define VIR_PCI_CONNECT_TYPES_ENDPOINT \ (VIR_PCI_CONNECT_TYPE_PCI_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_DEVICE) =20 virDomainPCIConnectFlags @@ -255,7 +254,7 @@ virDomainUSBAddressPortFormatBuf(virBufferPtr buf, unsigned int *port) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); =20 -# define VIR_DOMAIN_USB_HUB_PORTS 8 +#define VIR_DOMAIN_USB_HUB_PORTS 8 =20 typedef struct _virDomainUSBAddressHub virDomainUSBAddressHub; typedef virDomainUSBAddressHub *virDomainUSBAddressHubPtr; @@ -312,4 +311,3 @@ int virDomainUSBAddressRelease(virDomainUSBAddressSetPtr addrs, virDomainDeviceInfoPtr info) ATTRIBUTE_NONNULL(2); -#endif /* LIBVIRT_DOMAIN_ADDR_H */ diff --git a/src/conf/domain_audit.h b/src/conf/domain_audit.h index ee8a4aa70e..d34c750427 100644 --- a/src/conf/domain_audit.h +++ b/src/conf/domain_audit.h @@ -19,11 +19,10 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_AUDIT_H -# define LIBVIRT_DOMAIN_AUDIT_H +#pragma once =20 -# include "domain_conf.h" -# include "vircgroup.h" +#include "domain_conf.h" +#include "vircgroup.h" =20 void virDomainAuditStart(virDomainObjPtr vm, const char *reason, @@ -136,6 +135,3 @@ void virDomainAuditInput(virDomainObjPtr vm, const char *reason, bool success) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); - - -#endif /* LIBVIRT_DOMAIN_AUDIT_H */ diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index cd09d50cee..96ab59cae9 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -18,13 +18,12 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_CAPABILITIES_H -# define LIBVIRT_DOMAIN_CAPABILITIES_H +#pragma once =20 -# include "internal.h" -# include "domain_conf.h" -# include "virautoclean.h" -# include "virenum.h" +#include "internal.h" +#include "domain_conf.h" +#include "virautoclean.h" +#include "virenum.h" =20 typedef const char * (*virDomainCapsValToStr)(int value); =20 @@ -201,7 +200,7 @@ virDomainCapsCPUModelsGet(virDomainCapsCPUModelsPtr cpu= Models, const char *name); =20 =20 -# define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \ +#define VIR_DOMAIN_CAPS_ENUM_SET(capsEnum, ...) \ do { \ unsigned int __values[] =3D {__VA_ARGS__}; \ size_t __nvalues =3D ARRAY_CARDINALITY(__values); \ @@ -221,5 +220,3 @@ void virSEVCapabilitiesFree(virSEVCapability *capabilities); =20 VIR_DEFINE_AUTOPTR_FUNC(virSEVCapability, virSEVCapabilitiesFree); - -#endif /* LIBVIRT_DOMAIN_CAPABILITIES_H */ diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4c3ab07062..471c18ae19 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -20,43 +20,42 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_CONF_H -# define LIBVIRT_DOMAIN_CONF_H - -# include -# include -# include - -# include "internal.h" -# include "virconftypes.h" -# include "capabilities.h" -# include "virstorageencryption.h" -# include "cpu_conf.h" -# include "virthread.h" -# include "virhash.h" -# include "virsocketaddr.h" -# include "networkcommon_conf.h" -# include "nwfilter_params.h" -# include "numa_conf.h" -# include "virnetdevmacvlan.h" -# include "virsysinfo.h" -# include "virnetdev.h" -# include "virnetdevip.h" -# include "virnetdevvportprofile.h" -# include "virnetdevbandwidth.h" -# include "virnetdevvlan.h" -# include "virobject.h" -# include "device_conf.h" -# include "virbitmap.h" -# include "virstoragefile.h" -# include "virseclabel.h" -# include "virprocess.h" -# include "virgic.h" -# include "virperf.h" -# include "virtypedparam.h" -# include "virsavecookie.h" -# include "virresctrl.h" -# include "virenum.h" +#pragma once + +#include +#include +#include + +#include "internal.h" +#include "virconftypes.h" +#include "capabilities.h" +#include "virstorageencryption.h" +#include "cpu_conf.h" +#include "virthread.h" +#include "virhash.h" +#include "virsocketaddr.h" +#include "networkcommon_conf.h" +#include "nwfilter_params.h" +#include "numa_conf.h" +#include "virnetdevmacvlan.h" +#include "virsysinfo.h" +#include "virnetdev.h" +#include "virnetdevip.h" +#include "virnetdevvportprofile.h" +#include "virnetdevbandwidth.h" +#include "virnetdevvlan.h" +#include "virobject.h" +#include "device_conf.h" +#include "virbitmap.h" +#include "virstoragefile.h" +#include "virseclabel.h" +#include "virprocess.h" +#include "virgic.h" +#include "virperf.h" +#include "virtypedparam.h" +#include "virsavecookie.h" +#include "virresctrl.h" +#include "virenum.h" =20 /* Flags for the 'type' field in virDomainDeviceDef */ typedef enum { @@ -680,7 +679,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST } virDomainControllerModelVirtioSerial; =20 -# define IS_USB2_CONTROLLER(ctrl) \ +#define IS_USB2_CONTROLLER(ctrl) \ (((ctrl)->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_USB) && \ ((ctrl)->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \ (ctrl)->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI1 || \ @@ -1208,8 +1207,8 @@ typedef enum { VIR_DOMAIN_SMARTCARD_TYPE_LAST } virDomainSmartcardType; =20 -# define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3 -# define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb" +#define VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES 3 +#define VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE "/etc/pki/nssdb" =20 struct _virDomainSmartcardDef { int type; /* virDomainSmartcardType */ @@ -1252,7 +1251,7 @@ typedef enum { VIR_DOMAIN_TPM_VERSION_LAST } virDomainTPMVersion; =20 -# define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0" +#define VIR_DOMAIN_TPM_DEFAULT_DEVICE "/dev/tpm0" =20 struct _virDomainTPMDef { int type; /* virDomainTPMBackendType */ @@ -1701,7 +1700,7 @@ typedef enum { } virDomainSmbiosMode; =20 =20 -# define VIR_DOMAIN_MAX_BOOT_DEVS 4 +#define VIR_DOMAIN_MAX_BOOT_DEVS 4 =20 typedef enum { VIR_DOMAIN_BOOT_FLOPPY, @@ -1737,7 +1736,7 @@ typedef enum { VIR_DOMAIN_FEATURE_LAST } virDomainFeature; =20 -# define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12 +#define VIR_DOMAIN_HYPERV_VENDOR_ID_MAX 12 =20 typedef enum { VIR_DOMAIN_HYPERV_RELAXED =3D 0, @@ -2167,7 +2166,7 @@ struct _virDomainHugePage { unsigned long long size; /* hugepage size in KiB */ }; =20 -# define VIR_DOMAIN_CPUMASK_LEN 1024 +#define VIR_DOMAIN_CPUMASK_LEN 1024 =20 struct _virDomainIOThreadIDDef { bool autofill; @@ -3042,7 +3041,7 @@ void virDomainIOThreadIDDel(virDomainDefPtr def, unsi= gned int iothread_id); * server omits the requested output, but a new flag to suppress * information could result in a security hole when older libvirt * supplies the sensitive information in spite of the flag. */ -# define VIR_DOMAIN_XML_COMMON_FLAGS \ +#define VIR_DOMAIN_XML_COMMON_FLAGS \ (VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE | \ VIR_DOMAIN_XML_MIGRATABLE) unsigned int virDomainDefFormatConvertXMLFlags(unsigned int flags); @@ -3637,5 +3636,3 @@ virDomainGraphicsGetRenderNode(const virDomainGraphic= sDef *graphics); =20 bool virDomainGraphicsNeedsAutoRenderNode(const virDomainGraphicsDef *graphics); - -#endif /* LIBVIRT_DOMAIN_CONF_H */ diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h index 637f1daf68..d1cfb81d62 100644 --- a/src/conf/domain_event.h +++ b/src/conf/domain_event.h @@ -20,12 +20,11 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_EVENT_H -# define LIBVIRT_DOMAIN_EVENT_H +#pragma once =20 -# include "internal.h" -# include "object_event.h" -# include "domain_conf.h" +#include "internal.h" +#include "object_event.h" +#include "domain_conf.h" =20 =20 virObjectEventPtr @@ -323,5 +322,3 @@ virDomainQemuMonitorEventNew(int id, unsigned int micros, const char *details) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); - -#endif /* LIBVIRT_DOMAIN_EVENT_H */ diff --git a/src/conf/domain_nwfilter.h b/src/conf/domain_nwfilter.h index 9429ee6493..f44fbcce7d 100644 --- a/src/conf/domain_nwfilter.h +++ b/src/conf/domain_nwfilter.h @@ -19,8 +19,7 @@ * . */ =20 -#ifndef LIBVIRT_DOMAIN_NWFILTER_H -# define LIBVIRT_DOMAIN_NWFILTER_H +#pragma once =20 int virDomainConfNWFilterInstantiate(const char *vmname, const unsigned char *vmuuid, @@ -28,5 +27,3 @@ int virDomainConfNWFilterInstantiate(const char *vmname, bool ignoreExists); void virDomainConfNWFilterTeardown(virDomainNetDefPtr net); void virDomainConfVMNWFilterTeardown(virDomainObjPtr vm); - -#endif /* LIBVIRT_DOMAIN_NWFILTER_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list