From nobody Sun Feb 8 19:24:21 2026 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 1530217422463314.935442610357; Thu, 28 Jun 2018 13:23:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4BC9300151A; Thu, 28 Jun 2018 20:23:40 +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 810C62015660; Thu, 28 Jun 2018 20:23:40 +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 558FB4A464; Thu, 28 Jun 2018 20:23:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5SKNbSo017908 for ; Thu, 28 Jun 2018 16:23:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id C572A2142F22; Thu, 28 Jun 2018 20:23:37 +0000 (UTC) Received: from dhcp-17-130.bos.redhat.com (dhcp-17-130.bos.redhat.com [10.18.17.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB14D2142F20; Thu, 28 Jun 2018 20:23:37 +0000 (UTC) From: Anya Harter To: libvir-list@redhat.com Date: Thu, 28 Jun 2018 16:23:26 -0400 Message-Id: <2fb621d0fddb46762a05e643d54e97757707085a.1530217253.git.aharter@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Anya Harter Subject: [libvirt] [PATCH 1/2] qemu: move qemuDomainCCWAddrSetCreateFromDomain 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: , MIME-Version: 1.0 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 28 Jun 2018 20:23:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" from src/qemu/qemu_domain_address.[ch] to src/conf/domain_addr.[ch] Signed-off-by: Anya Harter --- src/conf/domain_addr.c | 24 ++++++++++++++++++++++++ src/conf/domain_addr.h | 4 ++++ src/qemu/qemu_domain_address.c | 22 ---------------------- src/qemu/qemu_domain_address.h | 4 ---- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 39f22b82eb..6c39608e01 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1209,6 +1209,30 @@ virDomainCCWAddressSetCreate(void) } =20 =20 +virDomainCCWAddressSetPtr +qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def) +{ + virDomainCCWAddressSetPtr addrs =3D NULL; + + if (!(addrs =3D virDomainCCWAddressSetCreate())) + goto error; + + if (virDomainDeviceInfoIterate(def, virDomainCCWAddressValidate, + addrs) < 0) + goto error; + + if (virDomainDeviceInfoIterate(def, virDomainCCWAddressAllocate, + addrs) < 0) + goto error; + + return addrs; + + error: + virDomainCCWAddressSetFree(addrs); + return NULL; +} + + #define VIR_DOMAIN_DEFAULT_VIRTIO_SERIAL_PORTS 31 =20 =20 diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 3236b7d6de..039efcaaf1 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -205,6 +205,10 @@ int virDomainCCWAddressReleaseAddr(virDomainCCWAddress= SetPtr addrs, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); virDomainCCWAddressSetPtr virDomainCCWAddressSetCreate(void); =20 +virDomainCCWAddressSetPtr +qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def) + ATTRIBUTE_NONNULL(1); + struct _virDomainVirtioSerialController { unsigned int idx; virBitmapPtr ports; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index e9f460d77a..b1aef64d89 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -376,28 +376,6 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr d= ef, } } =20 -virDomainCCWAddressSetPtr -qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def) -{ - virDomainCCWAddressSetPtr addrs =3D NULL; - - if (!(addrs =3D virDomainCCWAddressSetCreate())) - goto error; - - if (virDomainDeviceInfoIterate(def, virDomainCCWAddressValidate, - addrs) < 0) - goto error; - - if (virDomainDeviceInfoIterate(def, virDomainCCWAddressAllocate, - addrs) < 0) - goto error; - - return addrs; - - error: - virDomainCCWAddressSetFree(addrs); - return NULL; -} =20 /* * Three steps populating CCW devnos diff --git a/src/qemu/qemu_domain_address.h b/src/qemu/qemu_domain_address.h index 83f8e81cad..89d7a5ac3e 100644 --- a/src/qemu/qemu_domain_address.h +++ b/src/qemu/qemu_domain_address.h @@ -59,10 +59,6 @@ void qemuDomainReleaseDeviceAddress(virDomainObjPtr vm, virDomainDeviceInfoPtr info, const char *devstr); =20 -virDomainCCWAddressSetPtr -qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def) - ATTRIBUTE_NONNULL(1); - int qemuDomainAssignMemoryDeviceSlot(virDomainDefPtr def, virDomainMemoryDefPtr mem); =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list