From nobody Mon Feb 9 04:04:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1623856023; cv=none; d=zohomail.com; s=zohoarc; b=U/Dw0ZFfJ4/49G8idhBu/B0b5fMmzjO/vb7lZ0DidnhjdtUD6/8VSvzK03EEVngBC9VtwyqK9NVk82rQC0t8VqHskFd/dMt541p/4pHpWSRNzj9QyOqk/7XZM+Cw5K1TBVbHzOUfemMmiy8coleru0mfgYYULzZzbtvbT98LbjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623856023; 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=d0Az2Xb7UQyI0c4o2UyuzQyZ2j7bK9qu9IayYBrBMtQ=; b=BPnunBaLSnnKokhG1QFC3hNVJ2XfA4EFK+LUr+MhXf8/YAZk+i1ekt6zdivkMlL3wICV+Ta6+CKKZJiUM8dHr1PyvGOmGl47MUn72z7KrtPFMorW3+tTjB1A8pff3DMEeTE1KKWWynczrIGpyklBUw/6I//vzHMBImN0AzPlF/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1623856023837114.39595587264353; Wed, 16 Jun 2021 08:07:03 -0700 (PDT) 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-598-91GFwNaXOA2SlvsShVqrOQ-1; Wed, 16 Jun 2021 11:06:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0816A91275; Wed, 16 Jun 2021 15:05:57 +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 D6A3D5D9F2; Wed, 16 Jun 2021 15:05:56 +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 9D6BC46F5D; Wed, 16 Jun 2021 15:05:56 +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 15GF5oSl012871 for ; Wed, 16 Jun 2021 11:05:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id DF2545D9E3; Wed, 16 Jun 2021 15:05:50 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 447375D9E2 for ; Wed, 16 Jun 2021 15:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623856022; 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=d0Az2Xb7UQyI0c4o2UyuzQyZ2j7bK9qu9IayYBrBMtQ=; b=OYn1gbCGoBBUpM0zcPyC7MX0/dhl6yrMZj9vcS8PDlm7KF1mCgCpngLGZ+WKra4XvQbxgS APwvADpqMBPBT9opC9IRkSy8+X5cy9IsYyzjEUPB8A4wJgRxwEXEY95iqjK/jxdIN66CBM v+MMKzj780Q2uKvkDJYnD1ZIDKZ3QUQ= X-MC-Unique: 91GFwNaXOA2SlvsShVqrOQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/7] conf: snapshot: rename variable holding memory snapshot file location Date: Wed, 16 Jun 2021 17:05:36 +0200 Message-Id: <157b3b5f4148210de114c7ecd03cfa7a5ab872ef.1623855902.git.pkrempa@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 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.14 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) Content-Type: text/plain; charset="utf-8" 'file' is too generic to know what's going on. Rename it to 'memorysnapshotfile'. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 10 +++++----- src/conf/snapshot_conf.h | 2 +- src/qemu/qemu_snapshot.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index df3f2a4c63..0592640dd9 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -125,7 +125,7 @@ virDomainSnapshotDefDispose(void *obj) virDomainSnapshotDef *def =3D obj; size_t i; - g_free(def->file); + g_free(def->memorysnapshotfile); for (i =3D 0; i < def->ndisks; i++) virDomainSnapshotDiskDefClear(&def->disks[i]); g_free(def->disks); @@ -360,13 +360,13 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt, "disk-only snapshot")); goto cleanup; } - def->file =3D g_steal_pointer(&memoryFile); + def->memorysnapshotfile =3D g_steal_pointer(&memoryFile); /* verify that memory path is absolute */ - if (def->file && !g_path_is_absolute(def->file)) { + if (def->memorysnapshotfile && !g_path_is_absolute(def->memorysnapshot= file)) { virReportError(VIR_ERR_XML_ERROR, _("memory snapshot file path (%s) must be absolute"= ), - def->file); + def->memorysnapshotfile); goto cleanup; } @@ -863,7 +863,7 @@ virDomainSnapshotDefFormatInternal(virBuffer *buf, if (def->memory) { virBufferAsprintf(buf, "memor= y)); - virBufferEscapeString(buf, " file=3D'%s'", def->file); + virBufferEscapeString(buf, " file=3D'%s'", def->memorysnapshotfile= ); virBufferAddLit(buf, "/>\n"); } diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h index 7d49a555cd..a3ec0cd410 100644 --- a/src/conf/snapshot_conf.h +++ b/src/conf/snapshot_conf.h @@ -82,7 +82,7 @@ struct _virDomainSnapshotDef { int state; /* virDomainSnapshotState */ int memory; /* virDomainMemorySnapshot */ - char *file; /* memory state file when snapshot is external */ + char *memorysnapshotfile; /* memory state file when snapshot is extern= al */ size_t ndisks; /* should not exceed dom->ndisks */ virDomainSnapshotDiskDef *disks; diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index dab386e455..99fc4b836f 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1451,9 +1451,9 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *drive= r, goto cleanup; xml =3D NULL; - if ((ret =3D qemuSaveImageCreate(driver, vm, snapdef->file, data, - compressor, 0, - QEMU_ASYNC_JOB_SNAPSHOT)) < 0) + if ((ret =3D qemuSaveImageCreate(driver, vm, snapdef->memorysnapsh= otfile, + data, compressor, 0, + QEMU_ASYNC_JOB_SNAPSHOT)) < 0) goto cleanup; /* the memory image was created, remove it on errors */ @@ -1522,7 +1522,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *drive= r, virQEMUSaveDataFree(data); if (memory_unlink && ret < 0) - unlink(snapdef->file); + unlink(snapdef->memorysnapshotfile); return ret; } --=20 2.31.1