From nobody Fri Nov 21 10:00:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762514888; cv=none; d=zohomail.com; s=zohoarc; b=iaQox0eYBihNKPUixKQwdtmNSQHNVqeWPuLSR1N9ohhTyXg11f84LYjRXTVrTXAW5PMVJetf1MtQkHDdzzgRJANUzvJZROsSmw1Qitz7CT3EnZ3JCMS0nQTlFJphT19BBsZ7mkwPFvtlZRvSxFvY8Mc70Ft8bR1tG8e/Nf9cStI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762514888; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=byAGGBg6pP1NeATdjNA9QhL1gKy0NLdgk8qbVe3hOPQ=; b=TtTJfqiuGA+cHi2dFEeGBZXL4/E/YrPzVxk8p3yC7Jxv2XPmQdVru807o4zeX2rmztVyUVo3MhxOzVfqivSs2B40P97i8GARew5O+CDRYNBHZ8wx66z91KAyKnwxe0tLcTk8l6wDwVzYzPehQ89YBvIdTNCAesv/XRDqjg8tcU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762514888892866.2426037383664; Fri, 7 Nov 2025 03:28:08 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4462541896; Fri, 7 Nov 2025 06:28:08 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 387A241C2F; Fri, 7 Nov 2025 06:26:35 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1EF0641B1E; Fri, 7 Nov 2025 06:25:07 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B9CF541AB5 for ; Fri, 7 Nov 2025 06:25:05 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-ileQRKvxN6-SvGfvHO67-A-1; Fri, 07 Nov 2025 06:25:04 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B0AF19560B0 for ; Fri, 7 Nov 2025 11:25:03 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D72E818002B6 for ; Fri, 7 Nov 2025 11:25:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514705; h=from:from: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; bh=byAGGBg6pP1NeATdjNA9QhL1gKy0NLdgk8qbVe3hOPQ=; b=V3k8lYXLny7SoHBpL4HN8hLmx13fkHF/FW9TKvbkSPSG0Ivz3/fNi07ooSDjciHgwhFH3A sT33XMtbYjueKmW6lPQDEWeRrhUOGlOdk0mhdX0gasUzp4OWclqwJE0nM8xOfIut/JoyzN eiSq3OYuTPiDgEHk1UF5L/OicIUOrqI= X-MC-Unique: ileQRKvxN6-SvGfvHO67-A-1 X-Mimecast-MFC-AGG-ID: ileQRKvxN6-SvGfvHO67-A_1762514703 To: devel@lists.libvirt.org Subject: [PATCH 1/5] ch_process: Avoid memleak in chProcessAddNetworkDevice() Date: Fri, 7 Nov 2025 12:24:55 +0100 Message-ID: <6be8ae4e1edf7ce827083e41f4a88ebf4820894a.1762514684.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -gWYlZcv524Suiy3Br7gtKKCu_7RJJmMscUpUHtA-GE_1762514703 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BMOWKP4W6H33Z5K5NRLW4IL7CTV3LI7G X-Message-ID-Hash: BMOWKP4W6H33Z5K5NRLW4IL7CTV3LI7G X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762514890601154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The 'payload' variable inside of chProcessAddNetworkDevice() is reused and thus the memory it points to just before its repurpose is not freed. Avoid reusing g_autofree variables. 128 bytes in 1 blocks are definitely lost in loss record 1,828 of 2,026 at 0x491A120: realloc (vg_replace_malloc.c:1801) by 0x4FEC251: g_realloc (in /usr/lib64/libglib-2.0.so.0.8400.4) by 0x500BB7E: g_string_expand (in /usr/lib64/libglib-2.0.so.0.8400.4) by 0x500BBF0: g_string_sized_new (in /usr/lib64/libglib-2.0.so.0.8400.4) by 0x4A114C0: virBufferInitialize (virbuffer.c:121) by 0x4A11890: virBufferAdd (virbuffer.c:160) by 0x4A67344: virJSONValueToBuffer (virjson.c:1562) by 0x4A673DB: virJSONValueToString (virjson.c:1599) by 0xBC878AB: virCHMonitorBuildNetJson (ch_monitor.c:466) by 0xBC8D4A9: chProcessAddNetworkDevice (ch_process.c:688) by 0xBC8FCE2: chDomainAttachDeviceLive (ch_hotplug.c:78) by 0xBC900CA: chDomainAttachDeviceLiveAndUpdateConfig (ch_hotplug.c:174) Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/ch/ch_process.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index a1f30f09e1..4ebb261805 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -637,6 +637,7 @@ chProcessAddNetworkDevice(virCHDriver *driver, g_auto(virBuffer) http_headers =3D VIR_BUFFER_INITIALIZER; g_autofree int *tapfds =3D NULL; g_autofree char *payload =3D NULL; + g_autofree char *netJSONPayload =3D NULL; g_autofree char *response =3D NULL; size_t tapfd_len; size_t payload_len; @@ -685,15 +686,15 @@ chProcessAddNetworkDevice(virCHDriver *driver, } =20 chAssignDeviceNetAlias(vmdef, net); - if (virCHMonitorBuildNetJson(net, &payload) < 0) { + if (virCHMonitorBuildNetJson(net, &netJSONPayload) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to build net json")); return -1; } =20 virBufferAsprintf(&buf, "%s", virBufferCurrentContent(&http_headers)); - virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(payload)= ); - virBufferAsprintf(&buf, "%s", payload); + virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(netJSONP= ayload)); + virBufferAddStr(&buf, netJSONPayload); payload_len =3D virBufferUse(&buf); payload =3D virBufferContentAndReset(&buf); =20 --=20 2.51.0 From nobody Fri Nov 21 10:00:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762514980; cv=none; d=zohomail.com; s=zohoarc; b=COK88mhVR2S665NTCykUW74+qo7HzmW3IfbSWlgZjV5XJUqBpT5mHFWi60kiCCSQnh2AbqEHcy0iN31HtIjKaPyiUDOXDZfYQTs5xzVKGgCjzJdnx/JJivysmaum1Re5JjspgZOLxvXA/g+qSQvwpDJhgenh8DVjBczhAa9mi+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762514980; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=wZq20wX+eyNWAXqGY4CNkDjzVztCLzL3eanFbBuo3Jc=; b=QeonGoLlhQlWX+o9doxQF56MEWS9DmB+pL9AQkdIAd9aMKPFF0kouy7cpf/wRDyAwIuUjiASt5UD19F8X+AWSUDvIj1MNoprxaszmjcNBctwxsoJNxmVjf5et6l6ElCnqTX8vwSD0eqfx1ivpzyMukmWDUFdxCkQlYFI9wyBCVM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762514980011315.8637452906288; Fri, 7 Nov 2025 03:29:40 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 33D01443F0; Fri, 7 Nov 2025 06:29:37 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B2C4C4438E; Fri, 7 Nov 2025 06:26:46 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 37D0D41A2A; Fri, 7 Nov 2025 06:25:08 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0C1BF4406A for ; Fri, 7 Nov 2025 06:25:07 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-164-1XfQh4zKN-a9iEgda-4W1w-1; Fri, 07 Nov 2025 06:25:05 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B188E1800561 for ; Fri, 7 Nov 2025 11:25:04 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0990918002B6 for ; Fri, 7 Nov 2025 11:25:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514706; h=from:from: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; bh=wZq20wX+eyNWAXqGY4CNkDjzVztCLzL3eanFbBuo3Jc=; b=IsOLZN4psNt26k7jbgtceBe2PfBm0PjzwprEk+WzXQpntxLMGtSqNGoJieO/m+BTjN2Ti9 0TaoCyCwu4Z/E32rIvtYTpRsT5+VH0jXN9ZPclt4DZaS04aFc0QH+yD02ow1sIl1sJGDRQ F3/f6AGsbLDnXSUoLmZgTXYVKc927TE= X-MC-Unique: 1XfQh4zKN-a9iEgda-4W1w-1 X-Mimecast-MFC-AGG-ID: 1XfQh4zKN-a9iEgda-4W1w_1762514704 To: devel@lists.libvirt.org Subject: [PATCH 2/5] ch: Use correct domain definition in chDomainGetXMLDesc() Date: Fri, 7 Nov 2025 12:24:56 +0100 Message-ID: <40654ea234061d00ff80b40bd83072ffda83fd30.1762514684.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: kDK0HnVqAdow23YihAFwg_eA5Toix5i_bXTYAd4yQrI_1762514704 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TGKCFG6DUK535GLJQX7BPB4WKABXPP6D X-Message-ID-Hash: TGKCFG6DUK535GLJQX7BPB4WKABXPP6D X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762514983266158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The chDomainGetXMLDesc() function claims to support VIR_DOMAIN_XML_INACTIVE to obtain the persistent definition of a running domain (in its call to virCheckFlags()) but in fact, it's always passing vm->def to virDomainDefFormat(). So far, there's no harm done because CH driver never sets domain def as transient. But that'll change. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/ch/ch_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index ad13306c4c..8ec90e1192 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -1277,6 +1277,7 @@ static char *chDomainGetXMLDesc(virDomainPtr dom, { virCHDriver *driver =3D dom->conn->privateData; virDomainObj *vm; + virDomainDef *def; char *ret =3D NULL; =20 virCheckFlags(VIR_DOMAIN_XML_COMMON_FLAGS, NULL); @@ -1287,7 +1288,13 @@ static char *chDomainGetXMLDesc(virDomainPtr dom, if (virDomainGetXMLDescEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; =20 - ret =3D virDomainDefFormat(vm->def, driver->xmlopt, + if ((flags & VIR_DOMAIN_XML_INACTIVE) && vm->newDef) { + def =3D vm->newDef; + } else { + def =3D vm->def; + } + + ret =3D virDomainDefFormat(def, driver->xmlopt, virDomainDefFormatConvertXMLFlags(flags)); =20 cleanup: --=20 2.51.0 From nobody Fri Nov 21 10:00:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762515105; cv=none; d=zohomail.com; s=zohoarc; b=QJ+uLmfnyXdDzq0tAJgtfWMzJHDLiPALyErj1V2NtC2Yw+zMkmc/dIrMg74q1YhXLbuhYGpmdG3G7ee8yBd052x8qN2OlRoX/IeNXWvIwlbravUCmm6Kmlmjj5W4KhdJd7IPwZpOx86Dol9zDubNyE+36GL0GZlKawxShEOOBIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762515105; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=CRFp1r9WWQGseXjAxG3FhQET2Pteg9tynHJsKa55yhw=; b=iRbI2feSChMVannpiIEYBdpVARsAFYlGBpPh8euTRjI3vKzUx+uCNi6zzDX/Oweqr4n3D52iAlTc+nWqCrkphbDlgLVCuepi3PjEBct/pqMY8OeZ958W9RtxyIOX77n5jI6oydjOYjRLgasYX6RTu3V4rIJ7JsgVD+O0wv3vG/Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762515105829610.8419399071435; Fri, 7 Nov 2025 03:31:45 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 26F54446DA; Fri, 7 Nov 2025 06:31:45 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 4C7474478C; Fri, 7 Nov 2025 06:26:55 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id E8F9B41AB5; Fri, 7 Nov 2025 06:25:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 50B1944049 for ; Fri, 7 Nov 2025 06:25:08 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-JpyT_uLBM1qsOIVAR7Ty8w-1; Fri, 07 Nov 2025 06:25:06 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D146C180034A for ; Fri, 7 Nov 2025 11:25:05 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2790918002A6 for ; Fri, 7 Nov 2025 11:25:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514708; h=from:from: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; bh=CRFp1r9WWQGseXjAxG3FhQET2Pteg9tynHJsKa55yhw=; b=QEIAJy0U141O9fts3Hf4FsXnmO55oCLeA5uF6OhW1QWpOZUfMIZ7aF50JTKZyfm8MDiq8f 0QLHLlVdiVru5RaywAmXsjYm606qGHxJAkstDjo89yOrlkBe6aT5ToFNrnfLh8XQ0/KgFM LDdCpWxo50JENS2I088mN9nRJpFNp5w= X-MC-Unique: JpyT_uLBM1qsOIVAR7Ty8w-1 X-Mimecast-MFC-AGG-ID: JpyT_uLBM1qsOIVAR7Ty8w_1762514706 To: devel@lists.libvirt.org Subject: [PATCH 3/5] ch: Set transient domain definition Date: Fri, 7 Nov 2025 12:24:57 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sS7EpYdBNNpSdTf_m1Bh14_d7mgNPkP5S4GkKtaStu0_1762514706 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IDZA7MMXQ6GQ7IYXXZSTTRWQ7NG5WXSK X-Message-ID-Hash: IDZA7MMXQ6GQ7IYXXZSTTRWQ7NG5WXSK X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762515108089154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Libvirt's philosophy is that for a running domain there are two (in general distinct) definitions: live definition (reflects the running state) and inactive definition (used to seed the live definition when domain is being created). That's why we have VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CONFIG flags to APIs that modify domain definitions. Well, the CH driver doesn't do this distinction. Fix this by making the domain definition transient when it's being created. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/ch/ch_process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 4ebb261805..f16f2b3916 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -951,6 +951,10 @@ virCHProcessStart(virCHDriver *driver, return -1; } =20 + VIR_DEBUG("Setting current domain def as transient"); + if (virDomainObjSetDefTransient(driver->xmlopt, vm, NULL) < 0) + return -1; + VIR_DEBUG("Creating domain log file for %s domain", vm->def->name); if (!(logCtxt =3D domainLogContextNew(cfg->stdioLogD, cfg->logDir, CH_DRIVER_NAME, @@ -1100,6 +1104,7 @@ virCHProcessStop(virCHDriver *driver, virHostdevReAttachDomainDevices(driver->hostdevMgr, CH_DRIVER_NAME, de= f, hostdev_flags); =20 + virDomainObjRemoveTransientDef(vm); virErrorRestore(&orig_err); return 0; } --=20 2.51.0 From nobody Fri Nov 21 10:00:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762515044; cv=none; d=zohomail.com; s=zohoarc; b=AmaN9no6H0gz2O+bP/nB9T9o4tp6GkKj3Kr/OB/qacydZFMsWp6hIJGAuk0t85Fp3I5ZdQgPB1QUel2X9jPlYMeaedcOArxegMOs+zaCDcKg9nzEjRQ++TLPw3HqUYLEHRitGd50G3P793MbD1K623RvAiLAF6fl/F3vkJMiZJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762515044; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=zD3bZltAm64vlUj127C8xjji51weRgoPHcfOG3SfNhI=; b=OtK3SdxcI2ZRClIhTbj6QiOapLIgx0B499xnTzjj1X42tVbEbNznM21A9MTMPYvEG0XUBHeVesE+n3JfcBDRJqQDBfIGcAIhK9Zup+fuDrk138xaBWGUQUwiIhQL0+DRVyKdnhLXXx4OkxaIeNK9of2MzrqNE0lgy9P2qYfmvJ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762515044570504.0259430772761; Fri, 7 Nov 2025 03:30:44 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id B1FD344B7A; Fri, 7 Nov 2025 06:30:42 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7B2DA444A5; Fri, 7 Nov 2025 06:26:50 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3AE4244062; Fri, 7 Nov 2025 06:25:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4122041AB5 for ; Fri, 7 Nov 2025 06:25:09 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-108-3rWuN3dfOxqEmD7SIFwKSQ-1; Fri, 07 Nov 2025 06:25:07 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EEC3E1801238 for ; Fri, 7 Nov 2025 11:25:06 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 458511800361 for ; Fri, 7 Nov 2025 11:25:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514708; h=from:from: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; bh=zD3bZltAm64vlUj127C8xjji51weRgoPHcfOG3SfNhI=; b=hDY/CUevOC+PbdPspS0ZlrbSDH3UP+Yi7H7yS4mCrZ8zW/N88uaS3asCFcmKoQT5NVke2R sHXgjS/+VUFY1lBODHhJzRAt7nOQTZNHbGHPG2ZpBZvdKBLjJ22SNc/83s6g4bwf072ctj 72Xm5BoGTWc4UZs9zaJI5eWoDqg83y4= X-MC-Unique: 3rWuN3dfOxqEmD7SIFwKSQ-1 X-Mimecast-MFC-AGG-ID: 3rWuN3dfOxqEmD7SIFwKSQ_1762514707 To: devel@lists.libvirt.org Subject: [PATCH 4/5] ch: Assign device alias early Date: Fri, 7 Nov 2025 12:24:58 +0100 Message-ID: <2e42345f06d26896c5950fa3538d57108f72d000.1762514684.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Rtq6lvgpWGGrsWDU4giYEyAmKNchNJMVhCphx-dmYw8_1762514707 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YNYBVOJVPM567ZF4W7T4SU7PMWGV33M3 X-Message-ID-Hash: YNYBVOJVPM567ZF4W7T4SU7PMWGV33M3 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762515046809158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Assigning device should happen from ch_hotplug.c (just like it's done for disks currently) not in ch_process.c. Move alias assignment out of chProcessAddNetworkDevice(). And while at it, mimic what's done with disks and have net hotplug handling done from a function. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/ch/ch_hotplug.c | 23 ++++++++++++++++++++--- src/ch/ch_process.c | 1 - 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/ch/ch_hotplug.c b/src/ch/ch_hotplug.c index fabca2a73a..b296fd11b1 100644 --- a/src/ch/ch_hotplug.c +++ b/src/ch/ch_hotplug.c @@ -53,6 +53,25 @@ chDomainAddDisk(virCHMonitor *mon, return 0; } =20 + +static int +chDomainAddNet(virCHDriver *driver, + virCHMonitor *mon, + virDomainObj *vm, + virDomainNetDef *net) +{ + chAssignDeviceNetAlias(vm->def, net); + + if (chProcessAddNetworkDevice(driver, mon, vm->def, net, NULL, NULL) <= 0) { + return -1; + } + + virDomainNetInsert(vm->def, net); + + return 0; +} + + static int chDomainAttachDeviceLive(virCHDriver *driver, virDomainObj *vm, @@ -75,12 +94,10 @@ chDomainAttachDeviceLive(virCHDriver *driver, break; =20 case VIR_DOMAIN_DEVICE_NET: - if (chProcessAddNetworkDevice(driver, mon, vm->def, dev->data.net, - NULL, NULL) < 0) { + if (chDomainAddNet(driver, mon, vm, dev->data.net) < 0) { break; } =20 - virDomainNetInsert(vm->def, dev->data.net); alias =3D dev->data.net->info.alias; dev->data.net =3D NULL; ret =3D 0; diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index f16f2b3916..29db853a7f 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -685,7 +685,6 @@ chProcessAddNetworkDevice(virCHDriver *driver, return -1; } =20 - chAssignDeviceNetAlias(vmdef, net); if (virCHMonitorBuildNetJson(net, &netJSONPayload) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to build net json")); --=20 2.51.0 From nobody Fri Nov 21 10:00:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762515165; cv=none; d=zohomail.com; s=zohoarc; b=Q+xrmI5igNl+PNzJnQsYJR0jGqmGCNzAwh7z+FS0HK4Vynpl+ghmqQS+O6G7j43AXk+XxBoGNeUaDqW+oHIXqX5lkEQx5m4pMZ4dO1abIoso8/0B8TJ6pkKT9Y65ItMYs8usjt8bv9hUKHJ7yZXi9XGIUgpOPVf/KstIAR9i4SE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762515165; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=R3S6uNIUyb//SFVavJUI2Cj99kov3gkYwzgynDO6LTU=; b=mjOo5aYwWLjKExI8cxek86vX8KVzvouDz3VusGl+DpSBHGzGGI3O3dRqYKnsW4eBbkWWianf0GiXKsWJR2EPh5f1JUneukYFwMkwX/AUcPZGpX/G5GXeQFIpOEP+yxBN1OtmMyBQIf/nEMFd0cACMN/3l4QIKePnbewVY7lBr6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762515165683149.71386274251404; Fri, 7 Nov 2025 03:32:45 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 2B39244369; Fri, 7 Nov 2025 06:32:45 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C93B644858; Fri, 7 Nov 2025 06:26:57 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 40A9941A2A; Fri, 7 Nov 2025 06:25:11 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 88B4C41A2A for ; Fri, 7 Nov 2025 06:25:10 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-306-qK7jrzyIPraD4wamIkRybA-1; Fri, 07 Nov 2025 06:25:08 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2360E19560B1 for ; Fri, 7 Nov 2025 11:25:08 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 638001800451 for ; Fri, 7 Nov 2025 11:25:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762514710; h=from:from: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; bh=R3S6uNIUyb//SFVavJUI2Cj99kov3gkYwzgynDO6LTU=; b=XyTI3kyJO9BxyDFZMPubdcnRnVT3d/Sk83qLWuENL5oeszdpz/eAr1LcSalre6D3r+LGpu TlLOJeufO8yVt1rH8UrxZnJjfmt6/dk8HQ/CGJL3uNm0AKIiS8+Z69OkIjzRMl49NraL+Z R702giHZam8/RFDplvsNKULwbxPJ0oA= X-MC-Unique: qK7jrzyIPraD4wamIkRybA-1 X-Mimecast-MFC-AGG-ID: qK7jrzyIPraD4wamIkRybA_1762514708 To: devel@lists.libvirt.org Subject: [PATCH 5/5] ch: Sort driver sources and drop header files Date: Fri, 7 Nov 2025 12:24:59 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: C7EzoF-hkHSTEIBN22N7KeVl0Mu2-om3paSg5rbR7pY_1762514708 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BBX5AACM6WWLP4QSFZUMBXHPREGDRNP6 X-Message-ID-Hash: BBX5AACM6WWLP4QSFZUMBXHPREGDRNP6 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762515168577154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Firstly, there's no need to list header files in ch_driver_sources (we don't do that anywhere else, and meson is smart enough to figure them out). And secondly, the list of source file is not sorted which means new source files are added in random order. Thus, drop header files from the list and sort it. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/ch/meson.build | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/ch/meson.build b/src/ch/meson.build index b3e9c03832..aef2d86533 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -1,26 +1,15 @@ ch_driver_sources =3D [ - 'ch_capabilities.h', + 'ch_alias.c', 'ch_capabilities.c', 'ch_conf.c', - 'ch_conf.h', 'ch_domain.c', - 'ch_domain.h', 'ch_driver.c', - 'ch_driver.h', 'ch_events.c', - 'ch_events.h', + 'ch_hostdev.c', + 'ch_hotplug.c', 'ch_interface.c', - 'ch_interface.h', 'ch_monitor.c', - 'ch_monitor.h', 'ch_process.c', - 'ch_process.h', - 'ch_hostdev.c', - 'ch_hostdev.h', - 'ch_hotplug.c', - 'ch_hotplug.h', - 'ch_alias.c', - 'ch_alias.h', ] =20 driver_source_files +=3D files(ch_driver_sources) --=20 2.51.0