From nobody Fri Apr 26 05:31:35 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1552662582916857.8287158389463; Fri, 15 Mar 2019 08:09:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 060B81152F; Fri, 15 Mar 2019 15:09:38 +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 A96A117CC6; Fri, 15 Mar 2019 15:09:37 +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 5A9473F5CC; Fri, 15 Mar 2019 15:09:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2FF78bG028743 for ; Fri, 15 Mar 2019 11:07:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 928A91001DC9; Fri, 15 Mar 2019 15:07:08 +0000 (UTC) Received: from blue.redhat.com (ovpn-118-35.phx2.redhat.com [10.3.118.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 333851001DC0; Fri, 15 Mar 2019 15:07:03 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Fri, 15 Mar 2019 10:06:58 -0500 Message-Id: <20190315150658.27458-1-eblake@redhat.com> In-Reply-To: <20190315050233.10782-1-eblake@redhat.com> References: <20190315050233.10782-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: jsnow@redhat.com, jtomko@redhat.com Subject: [libvirt] [PATCH v6 1.5/8] conf: Split capabilities forward typedefs into virconftypes.h 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Mar 2019 15:09:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" As explained in the previous patch, collecting pointer typedefs into a common header makes it easier to avoid circular inclusions. Continue the efforts by pulling the appropriate typedefs from capabilities.h into the new header. This patch is just straight code motion (all typedefs are listed in the same order before and after the patch); a later patch will sort things for legibility. Signed-off-by: Eric Blake Reviewed-by: J=C3=A1n Tomko --- src/conf/capabilities.h | 45 ++--------------------------- src/conf/virconftypes.h | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 43 deletions(-) diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index cca1a20949..a6331b081c 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -1,7 +1,7 @@ /* * capabilities.h: hypervisor capabilities * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * Copyright (C) 2006-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ # define LIBVIRT_CAPABILITIES_H # include "internal.h" +# include "virconftypes.h" # include "virbuffer.h" # include "cpu_conf.h" # include "virarch.h" @@ -32,24 +33,18 @@ # include -typedef struct _virCapsGuestFeature virCapsGuestFeature; -typedef virCapsGuestFeature *virCapsGuestFeaturePtr; struct _virCapsGuestFeature { char *name; bool defaultOn; bool toggle; }; -typedef struct _virCapsGuestMachine virCapsGuestMachine; -typedef virCapsGuestMachine *virCapsGuestMachinePtr; struct _virCapsGuestMachine { char *name; char *canonical; unsigned int maxCpus; }; -typedef struct _virCapsGuestDomainInfo virCapsGuestDomainInfo; -typedef virCapsGuestDomainInfo *virCapsGuestDomainInfoPtr; struct _virCapsGuestDomainInfo { char *emulator; char *loader; @@ -57,15 +52,11 @@ struct _virCapsGuestDomainInfo { virCapsGuestMachinePtr *machines; }; -typedef struct _virCapsGuestDomain virCapsGuestDomain; -typedef virCapsGuestDomain *virCapsGuestDomainPtr; struct _virCapsGuestDomain { int type; /* virDomainVirtType */ virCapsGuestDomainInfo info; }; -typedef struct _virCapsGuestArch virCapsGuestArch; -typedef virCapsGuestArch *virCapsGuestArchptr; struct _virCapsGuestArch { virArch id; unsigned int wordsize; @@ -75,8 +66,6 @@ struct _virCapsGuestArch { virCapsGuestDomainPtr *domains; }; -typedef struct _virCapsGuest virCapsGuest; -typedef virCapsGuest *virCapsGuestPtr; struct _virCapsGuest { int ostype; virCapsGuestArch arch; @@ -85,8 +74,6 @@ struct _virCapsGuest { virCapsGuestFeaturePtr *features; }; -typedef struct _virCapsHostNUMACellCPU virCapsHostNUMACellCPU; -typedef virCapsHostNUMACellCPU *virCapsHostNUMACellCPUPtr; struct _virCapsHostNUMACellCPU { unsigned int id; unsigned int socket_id; @@ -94,22 +81,16 @@ struct _virCapsHostNUMACellCPU { virBitmapPtr siblings; }; -typedef struct _virCapsHostNUMACellSiblingInfo virCapsHostNUMACellSiblingI= nfo; -typedef virCapsHostNUMACellSiblingInfo *virCapsHostNUMACellSiblingInfoPtr; struct _virCapsHostNUMACellSiblingInfo { int node; /* foreign NUMA node */ unsigned int distance; /* distance to the node */ }; -typedef struct _virCapsHostNUMACellPageInfo virCapsHostNUMACellPageInfo; -typedef virCapsHostNUMACellPageInfo *virCapsHostNUMACellPageInfoPtr; struct _virCapsHostNUMACellPageInfo { unsigned int size; /* page size in kibibytes */ unsigned long long avail; /* the size of pool */ }; -typedef struct _virCapsHostNUMACell virCapsHostNUMACell; -typedef virCapsHostNUMACell *virCapsHostNUMACellPtr; struct _virCapsHostNUMACell { int num; int ncpus; @@ -121,15 +102,11 @@ struct _virCapsHostNUMACell { virCapsHostNUMACellPageInfoPtr pageinfo; }; -typedef struct _virCapsHostSecModelLabel virCapsHostSecModelLabel; -typedef virCapsHostSecModelLabel *virCapsHostSecModelLabelPtr; struct _virCapsHostSecModelLabel { char *type; char *label; }; -typedef struct _virCapsHostSecModel virCapsHostSecModel; -typedef virCapsHostSecModel *virCapsHostSecModelPtr; struct _virCapsHostSecModel { char *model; char *doi; @@ -137,8 +114,6 @@ struct _virCapsHostSecModel { virCapsHostSecModelLabelPtr labels; }; -typedef struct _virCapsHostCacheBank virCapsHostCacheBank; -typedef virCapsHostCacheBank *virCapsHostCacheBankPtr; struct _virCapsHostCacheBank { unsigned int id; unsigned int level; /* 1=3DL1, 2=3DL2, 3=3DL3, etc. */ @@ -149,8 +124,6 @@ struct _virCapsHostCacheBank { virResctrlInfoPerCachePtr *controls; }; -typedef struct _virCapsHostCache virCapsHostCache; -typedef virCapsHostCache *virCapsHostCachePtr; struct _virCapsHostCache { size_t nbanks; virCapsHostCacheBankPtr *banks; @@ -158,16 +131,12 @@ struct _virCapsHostCache { virResctrlInfoMonPtr monitor; }; -typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; -typedef virCapsHostMemBWNode *virCapsHostMemBWNodePtr; struct _virCapsHostMemBWNode { unsigned int id; virBitmapPtr cpus; /* All CPUs that belong to this node*/ virResctrlInfoMemBWPerNode control; }; -typedef struct _virCapsHostMemBW virCapsHostMemBW; -typedef virCapsHostMemBW *virCapsHostMemBWPtr; struct _virCapsHostMemBW { size_t nnodes; virCapsHostMemBWNodePtr *nodes; @@ -175,8 +144,6 @@ struct _virCapsHostMemBW { virResctrlInfoMonPtr monitor; }; -typedef struct _virCapsHost virCapsHost; -typedef virCapsHost *virCapsHostPtr; struct _virCapsHost { virArch arch; size_t nfeatures; @@ -211,8 +178,6 @@ struct _virCapsHost { bool iommu; }; -typedef struct _virCapsStoragePool virCapsStoragePool; -typedef virCapsStoragePool *virCapsStoragePoolPtr; struct _virCapsStoragePool { int type; }; @@ -224,8 +189,6 @@ typedef void (*virDomainDefNamespaceFree)(void *); typedef int (*virDomainDefNamespaceXMLFormat)(virBufferPtr, void *); typedef const char *(*virDomainDefNamespaceHref)(void); -typedef struct _virDomainXMLNamespace virDomainXMLNamespace; -typedef virDomainXMLNamespace *virDomainXMLNamespacePtr; struct _virDomainXMLNamespace { virDomainDefNamespaceParse parse; virDomainDefNamespaceFree free; @@ -233,8 +196,6 @@ struct _virDomainXMLNamespace { virDomainDefNamespaceHref href; }; -typedef struct _virCaps virCaps; -typedef virCaps *virCapsPtr; struct _virCaps { virObject parent; @@ -248,8 +209,6 @@ struct _virCaps { virCapsStoragePoolPtr *pools; }; -typedef struct _virCapsDomainData virCapsDomainData; -typedef virCapsDomainData *virCapsDomainDataPtr; struct _virCapsDomainData { int ostype; int arch; diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index 020aa70422..88e7c7083b 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -274,4 +274,67 @@ typedef virDomainXMLPrivateDataCallbacks *virDomainXML= PrivateDataCallbacksPtr; typedef struct _virDomainABIStability virDomainABIStability; typedef virDomainABIStability *virDomainABIStabilityPtr; +typedef struct _virCapsGuestFeature virCapsGuestFeature; +typedef virCapsGuestFeature *virCapsGuestFeaturePtr; + +typedef struct _virCapsGuestMachine virCapsGuestMachine; +typedef virCapsGuestMachine *virCapsGuestMachinePtr; + +typedef struct _virCapsGuestDomainInfo virCapsGuestDomainInfo; +typedef virCapsGuestDomainInfo *virCapsGuestDomainInfoPtr; + +typedef struct _virCapsGuestDomain virCapsGuestDomain; +typedef virCapsGuestDomain *virCapsGuestDomainPtr; + +typedef struct _virCapsGuestArch virCapsGuestArch; +typedef virCapsGuestArch *virCapsGuestArchptr; + +typedef struct _virCapsGuest virCapsGuest; +typedef virCapsGuest *virCapsGuestPtr; + +typedef struct _virCapsHostNUMACellCPU virCapsHostNUMACellCPU; +typedef virCapsHostNUMACellCPU *virCapsHostNUMACellCPUPtr; + +typedef struct _virCapsHostNUMACellSiblingInfo virCapsHostNUMACellSiblingI= nfo; +typedef virCapsHostNUMACellSiblingInfo *virCapsHostNUMACellSiblingInfoPtr; + +typedef struct _virCapsHostNUMACellPageInfo virCapsHostNUMACellPageInfo; +typedef virCapsHostNUMACellPageInfo *virCapsHostNUMACellPageInfoPtr; + +typedef struct _virCapsHostNUMACell virCapsHostNUMACell; +typedef virCapsHostNUMACell *virCapsHostNUMACellPtr; + +typedef struct _virCapsHostSecModelLabel virCapsHostSecModelLabel; +typedef virCapsHostSecModelLabel *virCapsHostSecModelLabelPtr; + +typedef struct _virCapsHostSecModel virCapsHostSecModel; +typedef virCapsHostSecModel *virCapsHostSecModelPtr; + +typedef struct _virCapsHostCacheBank virCapsHostCacheBank; +typedef virCapsHostCacheBank *virCapsHostCacheBankPtr; + +typedef struct _virCapsHostCache virCapsHostCache; +typedef virCapsHostCache *virCapsHostCachePtr; + +typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; +typedef virCapsHostMemBWNode *virCapsHostMemBWNodePtr; + +typedef struct _virCapsHostMemBW virCapsHostMemBW; +typedef virCapsHostMemBW *virCapsHostMemBWPtr; + +typedef struct _virCapsHost virCapsHost; +typedef virCapsHost *virCapsHostPtr; + +typedef struct _virCapsStoragePool virCapsStoragePool; +typedef virCapsStoragePool *virCapsStoragePoolPtr; + +typedef struct _virDomainXMLNamespace virDomainXMLNamespace; +typedef virDomainXMLNamespace *virDomainXMLNamespacePtr; + +typedef struct _virCaps virCaps; +typedef virCaps *virCapsPtr; + +typedef struct _virCapsDomainData virCapsDomainData; +typedef virCapsDomainData *virCapsDomainDataPtr; + #endif /* LIBVIRT_VIRCONFTYPES_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list