From nobody Fri Mar 29 01:49:46 2024 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=1652344285; cv=none; d=zohomail.com; s=zohoarc; b=GuzMrf88tS5LO4BlGP64oTgi9rPr1rlxmBndCO/7Uq9KaCT3vWE2leAvClAHCMSr+PxOAtteqOEvQYeG5CEJJmIkrZwm9Z5ToKQvbHmXhegq+BiD74l6IMjkwyL1oOhHtGiVEwKR1X9qrOdBq3bf/8lweg+VaLvbHr9TOAQHNcc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652344285; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=iLHXMh9DhE/B4dtYZKUsmD0yK10HjsqDGuCNsGYmfnc=; b=FAvk+qMh296dPwf5UICrB9U7H9HnqQWsjeKuTxSQ1PQWWMvF9R6+ua1LJ+WcrwKNnoRNPcBgn6s3eybbozQ1sCBl2mHO+Nv7lcbn5IJzFYK16HlnOOY/GhlOJDPfipzpHov+3lrTtoHIvPvuUlQzh4gj46bts+xGcxKUuTuQxFc= 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 1652344285525934.7579627724297; Thu, 12 May 2022 01:31:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-10-zhDAJxR8MmqF51QHt33mCg-1; Thu, 12 May 2022 04:31:20 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8C5E90E982; Thu, 12 May 2022 08:31:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B07452026D6A; Thu, 12 May 2022 08:31:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6D22E193220C; Thu, 12 May 2022 08:31:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EA446194F4BB for ; Thu, 12 May 2022 08:31:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CBBF4568CCA; Thu, 12 May 2022 08:31:15 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 569D856BC92; Thu, 12 May 2022 08:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652344284; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=iLHXMh9DhE/B4dtYZKUsmD0yK10HjsqDGuCNsGYmfnc=; b=SR01UR37Yrl5MIlNlEUoQuqYp+sdj3sQo77k3hnv/hbNfuOP7Ngmi8Zjg1EAXbnrdPz7bF uq3qNpvXKMlMGKHTT+Sp9L7/Hd6c5gz4LBVNhF1VurZ1tw4F4G5VDMqgCNVvxlhNE0nGSZ +hXJ4/Iy3N7wKRQiPQygvv7OMC+Uypg= X-MC-Unique: zhDAJxR8MmqF51QHt33mCg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] lib: Rename VIR_SAVE_PARAM_* to VIR_DOMAIN_SAVE_PARAM_* Date: Thu, 12 May 2022 10:31:10 +0200 Message-Id: <3959ecf2ef41679b7821eaed44b8f05a29ab3b89.1652343984.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cfontana@suse.de Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: 1652344285884100001 Content-Type: text/plain; charset="utf-8"; x-default="true" A few commits ago new APIs were introduced (virDomainSaveParams() and virDomainRestoreParams()) and with them new typed parameters: VIR_SAVE_PARAM_FILE and VIR_SAVE_PARAM_DXML. But their name does not suggest they apply to either of the APIs nor that they are intended for domain related APIs. Switch to VIR_DOMAIN_SAVE_PARAM prefix to make it obvious. It's true we already have VIR_DOMAIN_SAVE_* symbols which are part of virDomainSaveRestoreFlags enum, therefore stick also with '_PARAM_ ' part of the name to differentiate the two. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- include/libvirt/libvirt-domain.h | 8 ++++---- src/qemu/qemu_driver.c | 22 ++++++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index cf9d9efd51..24846046aa 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1579,16 +1579,16 @@ int virDomainRestoreParams (vi= rConnectPtr conn, unsigned int flags); =20 /** - * VIR_SAVE_PARAM_FILE: + * VIR_DOMAIN_SAVE_PARAM_FILE: * * the parameter used to specify the savestate file to save to or restore = from. * * Since: 8.4.0 */ -# define VIR_SAVE_PARAM_FILE "file" +# define VIR_DOMAIN_SAVE_PARAM_FILE "file" =20 /** - * VIR_SAVE_PARAM_DXML: + * VIR_DOMAIN_SAVE_PARAM_DXML: * * an optional parameter used to adjust guest xml on restore. * If the hypervisor supports it, it can be used to alter @@ -1598,7 +1598,7 @@ int virDomainRestoreParams (virC= onnectPtr conn, * * Since: 8.4.0 */ -# define VIR_SAVE_PARAM_DXML "dxml" +# define VIR_DOMAIN_SAVE_PARAM_DXML "dxml" =20 /* See below for virDomainSaveImageXMLFlags */ char * virDomainSaveImageGetXMLDesc (virConnectPtr conn, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e3582f62a7..41c6836390 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2823,14 +2823,18 @@ qemuDomainSaveParams(virDomainPtr dom, VIR_DOMAIN_SAVE_PAUSED, -1); =20 if (virTypedParamsValidate(params, nparams, - VIR_SAVE_PARAM_FILE, VIR_TYPED_PARAM_STRING, - VIR_SAVE_PARAM_DXML, VIR_TYPED_PARAM_STRING, + VIR_DOMAIN_SAVE_PARAM_FILE, + VIR_TYPED_PARAM_STRING, + VIR_DOMAIN_SAVE_PARAM_DXML, + VIR_TYPED_PARAM_STRING, NULL) < 0) return -1; =20 - if (virTypedParamsGetString(params, nparams, VIR_SAVE_PARAM_FILE, &to)= < 0) + if (virTypedParamsGetString(params, nparams, + VIR_DOMAIN_SAVE_PARAM_FILE, &to) < 0) return -1; - if (virTypedParamsGetString(params, nparams, VIR_SAVE_PARAM_DXML, &dxm= l) < 0) + if (virTypedParamsGetString(params, nparams, + VIR_DOMAIN_SAVE_PARAM_DXML, &dxml) < 0) return -1; =20 cfg =3D virQEMUDriverGetConfig(driver); @@ -5936,14 +5940,16 @@ qemuDomainRestoreParams(virConnectPtr conn, int ret =3D -1; =20 if (virTypedParamsValidate(params, nparams, - VIR_SAVE_PARAM_FILE, VIR_TYPED_PARAM_STRING, - VIR_SAVE_PARAM_DXML, VIR_TYPED_PARAM_STRING, + VIR_DOMAIN_SAVE_PARAM_FILE, VIR_TYPED_PARAM= _STRING, + VIR_DOMAIN_SAVE_PARAM_DXML, VIR_TYPED_PARAM= _STRING, NULL) < 0) return -1; =20 - if (virTypedParamsGetString(params, nparams, VIR_SAVE_PARAM_FILE, &pat= h) < 0) + if (virTypedParamsGetString(params, nparams, + VIR_DOMAIN_SAVE_PARAM_FILE, &path) < 0) return -1; - if (virTypedParamsGetString(params, nparams, VIR_SAVE_PARAM_DXML, &dxm= l) < 0) + if (virTypedParamsGetString(params, nparams, + VIR_DOMAIN_SAVE_PARAM_DXML, &dxml) < 0) return -1; =20 ret =3D qemuDomainRestoreInternal(conn, path, dxml, flags, --=20 2.35.1