From nobody Mon Feb 9 07:06:33 2026 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=1642011095; cv=none; d=zohomail.com; s=zohoarc; b=C0ErldySs/bIdqYPUvmtNL+tWWA8tBNQ2ljW5+6AS5bI4hGGP0KZMUH9OVhaz/UmlHgOc8bfkGJkuau1WkJyOCfl/P29D7h4GwjruWWIaEzL8Hiz03mC4sI7ovZa/HRTMBct1V+JdKg53j/5ds7foy2ggTYwG6hCWDzfioBs/D0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642011095; 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=mahRdiA1uk/iWgJNxf5HfsLZ3duMs37bDOaWKNyl+7M=; b=RwWFmD0WaAgU0ixfSvfZAzVfpUFH5jNw0GyEcnhffEdsaTzRAl0D56jUJ+lV3KLdWZGN9ET4mFxfJvMfUarh+whURTQxbhpQ2NZuc8i3TyR///hWVKeIZz61B1bXTz7pUn+U4ilkppE/1P+89CH2nuz+zkT1izNtDRudoDIUi9c= 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 1642011095544860.5228721838254; Wed, 12 Jan 2022 10:11:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-141-quwwKETsN7mE5feONVUorA-1; Wed, 12 Jan 2022 13:11:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8941B100C62F; Wed, 12 Jan 2022 18:11:25 +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 5FCC5108F847; Wed, 12 Jan 2022 18:11:25 +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 F27851806D2B; Wed, 12 Jan 2022 18:11:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20CIAYG1003046 for ; Wed, 12 Jan 2022 13:10:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2CFE48BB04; Wed, 12 Jan 2022 18:10:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BAE48AD18 for ; Wed, 12 Jan 2022 18:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642011094; 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=mahRdiA1uk/iWgJNxf5HfsLZ3duMs37bDOaWKNyl+7M=; b=CCxFZFsxnJWTverrUiA213lRWYdmP6JWwWobReWp8KqyKgD1pjWc1fv8zJ7jep3Ga+qPnG 5qFA2VEUYLJLlTc0MseKY+btNRkgj3bWZbkFyYmDL/UYUxtSOjYqQr+oQ/M6tteO6675Gr Lrox1yOwsmDQhQjce0ZVp86VD8eaHn4= X-MC-Unique: quwwKETsN7mE5feONVUorA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/17] virDomainSnapshotAlignDisks: Convert @default_snapshot to virDomainSnapshotLocation Date: Wed, 12 Jan 2022 19:10:06 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 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: 1642011096422100005 Content-Type: text/plain; charset="utf-8" Use the appropriate type for the variable and fix all callers. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 4 ++-- src/conf/snapshot_conf.h | 2 +- src/qemu/qemu_snapshot.c | 2 +- src/test/test_driver.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index d7e18596bc..f0ded7919c 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -473,7 +473,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDef = *def, virDomainXMLOption *xmlopt, unsigned int flags) { - int align_location =3D VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL; + virDomainSnapshotLocation align_location =3D VIR_DOMAIN_SNAPSHOT_LOCAT= ION_INTERNAL; bool align_match =3D true; bool external =3D def->state =3D=3D VIR_DOMAIN_SNAPSHOT_DISK_SNAPSHOT = || virDomainSnapshotDefIsExternal(def); @@ -640,7 +640,7 @@ virDomainSnapshotDefAssignExternalNames(virDomainSnapsh= otDef *def) */ int virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapdef, - int default_snapshot, + virDomainSnapshotLocation default_snapshot, bool require_match) { virDomainDef *domdef =3D snapdef->parent.dom; diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index a3ec0cd410..e5d4d0fc45 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -126,7 +126,7 @@ char *virDomainSnapshotDefFormat(const char *uuidstr, virDomainXMLOption *xmlopt, unsigned int flags); int virDomainSnapshotAlignDisks(virDomainSnapshotDef *snapshot, - int default_snapshot, + virDomainSnapshotLocation default_snapshot, bool require_match); bool virDomainSnapshotDefIsExternal(virDomainSnapshotDef *def); diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index f92e00f9c0..51df0ed8df 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1630,7 +1630,7 @@ qemuSnapshotCreateAlignDisks(virDomainObj *vm, { g_autofree char *xml =3D NULL; qemuDomainObjPrivate *priv =3D vm->privateData; - int align_location =3D VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL; + virDomainSnapshotLocation align_location =3D VIR_DOMAIN_SNAPSHOT_LOCAT= ION_INTERNAL; bool align_match =3D true; /* Easiest way to clone inactive portion of vm->def is via diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 0e93b79922..2ff56cf03f 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -8717,7 +8717,7 @@ testDomainSnapshotAlignDisks(virDomainObj *vm, virDomainSnapshotDef *def, unsigned int flags) { - int align_location =3D VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL; + virDomainSnapshotLocation align_location =3D VIR_DOMAIN_SNAPSHOT_LOCAT= ION_INTERNAL; bool align_match =3D true; if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY) { --=20 2.31.1