From nobody Mon Feb 9 10:33:24 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 1550849581316699.367848821058; Fri, 22 Feb 2019 07:33:01 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5AFD6300207F; Fri, 22 Feb 2019 15:32:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 335975D71D; Fri, 22 Feb 2019 15:32:59 +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 DCD5B181A00B; Fri, 22 Feb 2019 15:32:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1MFWfux009247 for ; Fri, 22 Feb 2019 10:32:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 869A55D9E2; Fri, 22 Feb 2019 15:32:41 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3EE05D9D5; Fri, 22 Feb 2019 15:32:40 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Fri, 22 Feb 2019 16:32:30 +0100 Message-Id: <42a3a3ea147f1790f498d6230b4a1bf624131aa5.1550849325.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [libvirt-go PATCH 3/3] Enforce new flags types in DomainSaveImageGetXMLDesc and GetXMLDesc 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 22 Feb 2019 15:33:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This breaks API compatibility! Recently libvirt introduced 2 new separate flag enums in order to stop recycling the old virDomainXMLFlags since 2/3 flags were discouraged to use. While it's fine for libvirt to introduce such a change since it uses plain 'int' for flags, not so much for the Go bindings which already enforced the now deprecated DomainXMLFlags type. Signed-off-by: Erik Skultety --- connect.go | 2 +- domain_snapshot.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connect.go b/connect.go index f77d10d..0d5118c 100644 --- a/connect.go +++ b/connect.go @@ -2038,7 +2038,7 @@ func (c *Connect) DomainSaveImageDefineXML(file strin= g, xml string, flags Domain } =20 // See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomain= SaveImageGetXMLDesc -func (c *Connect) DomainSaveImageGetXMLDesc(file string, flags DomainXMLFl= ags) (string, error) { +func (c *Connect) DomainSaveImageGetXMLDesc(file string, flags DomainSaveI= mageXMLFlags) (string, error) { cfile :=3D C.CString(file) defer C.free(unsafe.Pointer(cfile)) =20 diff --git a/domain_snapshot.go b/domain_snapshot.go index 86c7c51..282217f 100644 --- a/domain_snapshot.go +++ b/domain_snapshot.go @@ -161,7 +161,7 @@ func (s *DomainSnapshot) HasMetadata(flags uint32) (boo= l, error) { } =20 // See also https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html#= virDomainSnapshotGetXMLDesc -func (s *DomainSnapshot) GetXMLDesc(flags DomainXMLFlags) (string, error) { +func (s *DomainSnapshot) GetXMLDesc(flags DomainSnapshotXMLFlags) (string,= error) { var err C.virError result :=3D C.virDomainSnapshotGetXMLDescWrapper(s.ptr, C.uint(flags), &e= rr) if result =3D=3D nil { --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list