From nobody Fri May 3 11:31:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1637071012; cv=none; d=zohomail.com; s=zohoarc; b=eVei44fyDkbccKeo14M3PRzjUceQKLfKJoLSlQCJu5Xcxb02KxasaDj/QFbMqT3IBvHiDtZVBOnuE9qX++TLT1FZgiEiJXGH/FDljJOJT96uDdu175QrCqFJQLPZDpMmxm5kkyCLTRuuZktUxjVpxwH2AyqQPNK0hVjrTD7ttgY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637071012; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uC/o0LdXC3vXK3gMYG4MH45f2UjaK1t4VzrK6LTFp3Q=; b=YuoBP8xXWJ1QVG4lIN5o00GAecNWZAr8++K/y7xrOnTBZxByW1d9I3j3eUaiFAw7JM8Lx7U0aHPDRQfefxySiLM5n8JpYZ+4ZceFTp/05tjLmTLZp6bVYN5xd0Pu+kS3Z1Fc7tg4z5vSxSefh0k2rgeoiMBM5pqgn1wATSB6Jek= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1637071012600224.5768450493216; Tue, 16 Nov 2021 05:56:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-JIih-5CrOEywwITWzign5w-1; Tue, 16 Nov 2021 08:56:49 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0AD75804018; Tue, 16 Nov 2021 13:56:42 +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 F3B7560C9F; Tue, 16 Nov 2021 13:56:39 +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 7C3EE4A702; Tue, 16 Nov 2021 13:56:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AGDqSZB001360 for ; Tue, 16 Nov 2021 08:52:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4BE7B19D9B; Tue, 16 Nov 2021 13:52:28 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id C573899BE for ; Tue, 16 Nov 2021 13:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637071011; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uC/o0LdXC3vXK3gMYG4MH45f2UjaK1t4VzrK6LTFp3Q=; b=KSsRVOkyhYZ1P+nnKZkU0SwTs6GbotmJIsc/y1MWdIxydgnDZlE3TOAD9MPDchDhh9OFK7 eZg/Alz/GwtnCEmTbuFHEaNnnK1HMKvumzcTuyaRBgsIfQlYSOLIRGBCRZXKFTdVEG8Q6/ 2tiD1EdVDpZgzcXBUBsiIsheYyw4c78= X-MC-Unique: JIih-5CrOEywwITWzign5w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: device: compare drive address fields separately Date: Tue, 16 Nov 2021 14:52:06 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637071013496100001 Commit 3210c8b04 introduced a separate field 'diskbus' for internal use by the commandline formatter. Adjust the check for address equality to compare the relevant fields separately instead of the whole struct. This means that the changes of the 'diskbus' field added in commit 03ed14d2d4 no longer affect the outcome of the address equality check. https://bugzilla.redhat.com/show_bug.cgi?id=3D2023605 Fixes: 3210c8b047534f7e1d3ccde7ea3bcf11e7c92ad9 Fixes: 03ed14d2d4a4e51568b1ee5a6e6c9c3371bb4d34 Signed-off-by: J=C3=A1n Tomko --- src/conf/device_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index e587d90c59..cb523d3a0d 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -119,7 +119,10 @@ virDomainDeviceInfoAddressIsEqual(const virDomainDevic= eInfo *a, break; =20 case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE: - if (memcmp(&a->addr.drive, &b->addr.drive, sizeof(a->addr.drive))) + if (a->addr.drive.controller !=3D b->addr.drive.controller || + a->addr.drive.unit !=3D b->addr.drive.unit || + a->addr.drive.bus !=3D b->addr.drive.bus || + a->addr.drive.target !=3D b->addr.drive.target) return false; break; =20 --=20 2.31.1