From nobody Wed Nov 27 18:51:32 2024 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 1541966425704888.9416319407821; Sun, 11 Nov 2018 12:00:25 -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 4750130BAB81; Sun, 11 Nov 2018 20:00:23 +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 09CA55D736; Sun, 11 Nov 2018 20:00:23 +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 A0EA24BB74; Sun, 11 Nov 2018 20:00:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wABJxmcC023642 for ; Sun, 11 Nov 2018 14:59:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9147B5C260; Sun, 11 Nov 2018 19:59:48 +0000 (UTC) Received: from cv1.redhat.com (ovpn-121-41.rdu2.redhat.com [10.10.121.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id AECDD5C227; Sun, 11 Nov 2018 19:59:47 +0000 (UTC) From: Chris Venteicher To: libvir-list@redhat.com Date: Sun, 11 Nov 2018 13:59:10 -0600 Message-Id: <20181111195930.17185-3-cventeic@redhat.com> In-Reply-To: <20181111195930.17185-1-cventeic@redhat.com> References: <20181111195930.17185-1-cventeic@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: walling@linux.ibm.com, Chris Venteicher , jdenemar@redhat.com, david@redhat.com Subject: [libvirt] [PATCH RFC 02/22] qemu_process: Use qemuProcess prefix 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: , MIME-Version: 1.0 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.47]); Sun, 11 Nov 2018 20:00:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" s/virQEMUCapsInitQMPCommand/qemuProcess/ No functionality change. Use appropriate prefix in moved code. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 +++++++------- src/qemu/qemu_process.c | 28 ++++++++++++++-------------- src/qemu/qemu_process.h | 22 +++++++++++----------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0f70fdf46d..f6d97648ce 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4219,15 +4219,15 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, gid_t runGid, char **qmperr) { - virQEMUCapsInitQMPCommandPtr cmd =3D NULL; + qemuProcessPtr cmd =3D NULL; int ret =3D -1; int rc; =20 - if (!(cmd =3D virQEMUCapsInitQMPCommandNew(qemuCaps->binary, libDir, - runUid, runGid, qmperr))) + if (!(proc =3D qemuProcessNew(qemuCaps->binary, libDir, + runUid, runGid, qmperr))) goto cleanup; =20 - if ((rc =3D virQEMUCapsInitQMPCommandRun(cmd, false)) !=3D 0) { + if ((rc =3D qemuProcessRun(cmd, false)) !=3D 0) { if (rc =3D=3D 1) ret =3D 0; goto cleanup; @@ -4237,8 +4237,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, goto cleanup; =20 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) { - virQEMUCapsInitQMPCommandAbort(cmd); - if ((rc =3D virQEMUCapsInitQMPCommandRun(cmd, true)) !=3D 0) { + qemuProcessAbort(cmd); + if ((rc =3D qemuProcessRun(cmd, true)) !=3D 0) { if (rc =3D=3D 1) ret =3D 0; goto cleanup; @@ -4251,7 +4251,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, ret =3D 0; =20 cleanup: - virQEMUCapsInitQMPCommandFree(cmd); + qemuProcessFree(cmd); return ret; } =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 0b3922fa39..dff0482856 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8081,12 +8081,12 @@ static qemuMonitorCallbacks callbacks =3D { =20 =20 void -virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd) +qemuProcessFree(qemuProcessPtr cmd) { if (!cmd) return; =20 - virQEMUCapsInitQMPCommandAbort(cmd); + qemuProcessAbort(cmd); VIR_FREE(cmd->binary); VIR_FREE(cmd->monpath); VIR_FREE(cmd->monarg); @@ -8095,14 +8095,14 @@ virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCom= mandPtr cmd) } =20 =20 -virQEMUCapsInitQMPCommandPtr -virQEMUCapsInitQMPCommandNew(char *binary, - const char *libDir, - uid_t runUid, - gid_t runGid, - char **qmperr) +qemuProcessPtr +qemuProcessNew(char *binary, + const char *libDir, + uid_t runUid, + gid_t runGid, + char **qmperr) { - virQEMUCapsInitQMPCommandPtr cmd =3D NULL; + qemuProcessPtr cmd =3D NULL; =20 if (VIR_ALLOC(cmd) < 0) goto error; @@ -8141,7 +8141,7 @@ virQEMUCapsInitQMPCommandNew(char *binary, return cmd; =20 error: - virQEMUCapsInitQMPCommandFree(cmd); + qemuProcessFree(cmd); return NULL; } =20 @@ -8151,8 +8151,8 @@ virQEMUCapsInitQMPCommandNew(char *binary, * 1 when probing QEMU failed */ int -virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd, - bool forceTCG) +qemuProcessRun(qemuProcessPtr cmd, + bool forceTCG) { virDomainXMLOptionPtr xmlopt =3D NULL; const char *machine; @@ -8222,7 +8222,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPComman= dPtr cmd, =20 cleanup: if (!cmd->mon) - virQEMUCapsInitQMPCommandAbort(cmd); + qemuProcessAbort(cmd); virObjectUnref(xmlopt); =20 return ret; @@ -8234,7 +8234,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPComman= dPtr cmd, =20 =20 void -virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd) +qemuProcessAbort(qemuProcessPtr cmd) { if (cmd->mon) virObjectUnlock(cmd->mon); diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 4ba3988e3d..5417cb416f 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -214,9 +214,9 @@ int qemuProcessStartManagedPRDaemon(virDomainObjPtr vm); =20 void qemuProcessKillManagedPRDaemon(virDomainObjPtr vm); =20 -typedef struct _virQEMUCapsInitQMPCommand virQEMUCapsInitQMPCommand; -typedef virQEMUCapsInitQMPCommand *virQEMUCapsInitQMPCommandPtr; -struct _virQEMUCapsInitQMPCommand { +typedef struct _qemuProcess qemuProcess; +typedef qemuProcess *qemuProcessPtr; +struct _qemuProcess { char *binary; uid_t runUid; gid_t runGid; @@ -231,16 +231,16 @@ struct _virQEMUCapsInitQMPCommand { virDomainObjPtr vm; }; =20 -virQEMUCapsInitQMPCommandPtr virQEMUCapsInitQMPCommandNew(char *binary, - const char *libD= ir, - uid_t runUid, - gid_t runGid, - char **qmperr); +qemuProcessPtr qemuProcessNew(char *binary, + const char *libDir, + uid_t runUid, + gid_t runGid, + char **qmperr); =20 -void virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd); +void qemuProcessFree(qemuProcessPtr cmd); =20 -int virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd, bool fo= rceTCG); +int qemuProcessRun(qemuProcessPtr cmd, bool forceTCG); =20 -void virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd); +void qemuProcessAbort(qemuProcessPtr cmd); =20 #endif /* __QEMU_PROCESS_H__ */ --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list