From nobody Mon Feb 9 12:29:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1657188485; cv=none; d=zohomail.com; s=zohoarc; b=UYg62+alWf23qiQUK3+iYKJWlM3w5VYDifPNY/d9yPEIBRcZfZ3nwuZ5mKSWoVANIWc4aVJ1HsjAZKd3sTuNvQiVk+P3EV9zIxogqq/VPe7jOR769XB9sKFK/B4Bf13tAFIpDJCfUl+emrK6Rp8UFvJ4oDPX65PnlDF1kGiKoag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657188485; 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; bh=Z4lwxCjIAebUadUtQP5+MaR1HuVTrOH3J1EdRVj/uts=; b=ILnsCzx2+Znd6T8/3/wLea6RnW6Ze6GOVCRYz6KDdBu4GD3ZWL9ZrRS8FhmaycTdW6KWQW3UypuZKbH9nAv2fqspXj/FSWYXqRvdsF3thmsQzKjY6r+rtd4WtTZjbOd/7gz1rZjoi2jGKtxkyM6UDB+tGBPIDBhv7Mj7lGX8gxo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1657188485700883.7055822225967; Thu, 7 Jul 2022 03:08:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-BD4cmebMPri5rnvFXUO51g-1; Thu, 07 Jul 2022 06:07:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4FD429324A4; Thu, 7 Jul 2022 10:07:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 539C2C3597A; Thu, 7 Jul 2022 10:07:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A6EF01947079; Thu, 7 Jul 2022 10:07:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A78A51947067 for ; Thu, 7 Jul 2022 10:07:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 99A93C2811A; Thu, 7 Jul 2022 10:07:11 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42956C28129 for ; Thu, 7 Jul 2022 10:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657188484; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Z4lwxCjIAebUadUtQP5+MaR1HuVTrOH3J1EdRVj/uts=; b=WSSmSj+Fh8s7kMnZYA2WAfF1F1mo0hj9Z9TGhfq2Pwm8QJFDR8FXd5Ga/31FdYzUuXSZdG La4Q21+UjV11hUuOzx0dfBb53cROTxl2HjB8p34x0PiJaUOnto1zX9qHYiGu1EAi0obSEF vBmeMdBlrVu6Wa0AW2SH0pvLfF4Qzgs= X-MC-Unique: BD4cmebMPri5rnvFXUO51g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/3] domain_conf: Unexport virDomainDefPostParseDeviceIteratorData Date: Thu, 7 Jul 2022 12:07:07 +0200 Message-Id: <42c61a993286537188f847d0f1037ae5b9d03723.1657188411.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657188486202100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The virDomainDefPostParseDeviceIteratorData struct is exported in domain_conf.h because it's used in both domain_conf.c and domain_validate.c. However, the latter usage is not warranted, it's just a shortcut so that we don't have to introduce a similar struct just for domain_validate.c. Well, do the extra step and introduce a separate structure for domain_validate.c. This allows us to move post parse code later on. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 7 +++++++ src/conf/domain_conf.h | 6 ------ src/conf/domain_validate.c | 11 +++++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2c2f23242e..c67fcd337d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6031,6 +6031,13 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDef *d= ev, } =20 =20 +struct virDomainDefPostParseDeviceIteratorData { + virDomainXMLOption *xmlopt; + void *parseOpaque; + unsigned int parseFlags; +}; + + static int virDomainDefPostParseDeviceIterator(virDomainDef *def, virDomainDeviceDef *dev, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4c8c42b7eb..543b343be9 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3302,12 +3302,6 @@ struct _virDomainXMLOption { }; G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainXMLOption, virObjectUnref); =20 -struct virDomainDefPostParseDeviceIteratorData { - virDomainXMLOption *xmlopt; - void *parseOpaque; - unsigned int parseFlags; -}; - bool virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, const virDomainDeviceDriveAddress *addr); diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 57d4e63a26..814922cd46 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1889,13 +1889,20 @@ virDomainDefValidateInternal(const virDomainDef *de= f, } =20 =20 +struct virDomainDefValidateDeviceIteratorData { + virDomainXMLOption *xmlopt; + void *parseOpaque; + unsigned int parseFlags; +}; + + static int virDomainDefValidateDeviceIterator(virDomainDef *def, virDomainDeviceDef *dev, virDomainDeviceInfo *info G_GNUC_UNUSED, void *opaque) { - struct virDomainDefPostParseDeviceIteratorData *data =3D opaque; + struct virDomainDefValidateDeviceIteratorData *data =3D opaque; return virDomainDeviceDefValidate(dev, def, data->parseFlags, data->xmlopt, data->parseOpaque); @@ -1924,7 +1931,7 @@ virDomainDefValidate(virDomainDef *def, virDomainXMLOption *xmlopt, void *parseOpaque) { - struct virDomainDefPostParseDeviceIteratorData data =3D { + struct virDomainDefValidateDeviceIteratorData data =3D { .xmlopt =3D xmlopt, .parseFlags =3D parseFlags, .parseOpaque =3D parseOpaque, --=20 2.35.1