From nobody Tue May 14 08:15:52 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=1648626453; cv=none; d=zohomail.com; s=zohoarc; b=PuQ6YLqgXcokOjBa/wEO2pI2TPInHYa374V0ig5edhMuSHOC+nuK8L0YjuRFRmwxJmrjLRSqueQ6DxaOgTFF2KlkEUBoK5deAZ37txSVfZrTM+Rw7zJLg1E+YCVz+ceBHZs84y/QdgmGBDcP99vBI6lCzYGKHJdIlxyKHXCbqJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648626453; 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=FdTcXzsy5JyZDEcTUDTRroSlK0FFUd3oRGXTfHUZ1p4=; b=WqaBd+LhR0q1vX6fxD1c9SXXiSMuJTwL7c9qagTVB2GTR5IXp2VSEYCaV/6j5UDahiSQ2lwksxHZBG37itYWN0rEq3qxOqwBmCes7FSOAtmWZ7JY9k16OCnMtluWpTWgxqbUBJhzsqwWf2f0+CXMfk4ERQ0Ca2cvDOhEB2vgDjo= 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 1648626453503426.3244178939606; Wed, 30 Mar 2022 00:47:33 -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-659-av44EM3fPG6SUgfMxPVIgA-1; Wed, 30 Mar 2022 03:47:29 -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 3B93C85A5BE; Wed, 30 Mar 2022 07:47:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DF692026D6B; Wed, 30 Mar 2022 07:47:24 +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 5395219451EF; Wed, 30 Mar 2022 07:47:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5507119466DF for ; Wed, 30 Mar 2022 07:47:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3EF2640CF8F8; Wed, 30 Mar 2022 07:47:23 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E4D540CF8E4 for ; Wed, 30 Mar 2022 07:47:23 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 0B19C2401D8; Wed, 30 Mar 2022 09:47:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648626452; 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=FdTcXzsy5JyZDEcTUDTRroSlK0FFUd3oRGXTfHUZ1p4=; b=LquLmcg63p7UyJUVyrUpt+MnqgkVdedj9h8rU09pNGEAfqMANeA5ud0rFJRuKacefWQh8k Jxrz75EpojNGsU+7TGeNw41h4lIGLMcNnv7ydKdZtDH6BZX0qhFpulVdEtIL8TIaleaASs VuHnqB/mPqxGzlsQ50MRzNhDXuxGw3s= X-MC-Unique: av44EM3fPG6SUgfMxPVIgA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Rename virDomainAsyncJobPhase{From,To}String Date: Wed, 30 Mar 2022 09:47:14 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: , 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: 1648626455630100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Recent refactor (v8.1.0-217-ga193f4bef6) generalized job related enums and functions by changing "qemu" prefix to "vir" and moving them to src/hypervisor/domain_job.[ch]. This was in most cases a good thing, but async job phases are driver specific and the corresponding functions remained in src/qemu/qemu_domainjob.[ch], but still their prefix was changed to "vir". Let's change it back to "qemu". Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domainjob.c | 10 +++++----- src/qemu/qemu_domainjob.h | 4 ++-- src/qemu/qemu_migration.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c index 56a3f6cb19..1cddc7f2f0 100644 --- a/src/qemu/qemu_domainjob.c +++ b/src/qemu/qemu_domainjob.c @@ -74,7 +74,7 @@ qemuDomainJobSetStatsType(virDomainJobData *jobData, =20 =20 const char * -virDomainAsyncJobPhaseToString(virDomainAsyncJob job, +qemuDomainAsyncJobPhaseToString(virDomainAsyncJob job, int phase G_GNUC_UNUSED) { switch (job) { @@ -97,7 +97,7 @@ virDomainAsyncJobPhaseToString(virDomainAsyncJob job, } =20 int -virDomainAsyncJobPhaseFromString(virDomainAsyncJob job, +qemuDomainAsyncJobPhaseFromString(virDomainAsyncJob job, const char *phase) { if (!phase) @@ -682,7 +682,7 @@ qemuDomainObjSetJobPhase(virDomainObj *obj, =20 VIR_DEBUG("Setting '%s' phase to '%s'", virDomainAsyncJobTypeToString(priv->job.asyncJob), - virDomainAsyncJobPhaseToString(priv->job.asyncJob, phase)); + qemuDomainAsyncJobPhaseToString(priv->job.asyncJob, phase)); =20 if (priv->job.asyncOwner =3D=3D 0) { priv->job.asyncOwnerAPI =3D g_strdup(virThreadJobGet()); @@ -1191,7 +1191,7 @@ qemuDomainObjPrivateXMLFormatJob(virBuffer *buf, =20 if (priv->job.phase) { virBufferAsprintf(&attrBuf, " phase=3D'%s'", - virDomainAsyncJobPhaseToString(priv->job.asyncJo= b, + qemuDomainAsyncJobPhaseToString(priv->job.asyncJ= ob, priv->job.phase)= ); } =20 @@ -1244,7 +1244,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObj *vm, priv->job.asyncJob =3D async; =20 if ((tmp =3D virXPathString("string(@phase)", ctxt))) { - priv->job.phase =3D virDomainAsyncJobPhaseFromString(async, tm= p); + priv->job.phase =3D qemuDomainAsyncJobPhaseFromString(async, t= mp); if (priv->job.phase < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown job phase %s"), tmp); diff --git a/src/qemu/qemu_domainjob.h b/src/qemu/qemu_domainjob.h index faf47105a3..f67eace36c 100644 --- a/src/qemu/qemu_domainjob.h +++ b/src/qemu/qemu_domainjob.h @@ -119,9 +119,9 @@ struct _qemuDomainJobObj { void qemuDomainJobSetStatsType(virDomainJobData *jobData, qemuDomainJobStatsType type); =20 -const char *virDomainAsyncJobPhaseToString(virDomainAsyncJob job, +const char *qemuDomainAsyncJobPhaseToString(virDomainAsyncJob job, int phase); -int virDomainAsyncJobPhaseFromString(virDomainAsyncJob job, +int qemuDomainAsyncJobPhaseFromString(virDomainAsyncJob job, const char *phase); =20 void qemuDomainEventEmitJobCompleted(virQEMUDriver *driver, diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3e653543c6..98f82abe7c 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2190,7 +2190,7 @@ qemuMigrationSrcCleanup(virDomainObj *vm, VIR_DEBUG("vm=3D%s, conn=3D%p, asyncJob=3D%s, phase=3D%s", vm->def->name, conn, virDomainAsyncJobTypeToString(priv->job.asyncJob), - virDomainAsyncJobPhaseToString(priv->job.asyncJob, + qemuDomainAsyncJobPhaseToString(priv->job.asyncJob, priv->job.phase)); =20 if (!qemuMigrationJobIsActive(vm, VIR_ASYNC_JOB_MIGRATION_OUT)) --=20 2.35.1