[libvirt] [PATCH RFC 05/22] qemu_process: Use consistent name for stop process function

Chris Venteicher posted 22 patches 6 years ago
[libvirt] [PATCH RFC 05/22] qemu_process: Use consistent name for stop process function
Posted by Chris Venteicher 6 years ago
s/qemuProcessAbort/qemuProcessStopQmp/ applied to change function name
used to stop QEMU processes in process code moved from
qemu_capabilities.

No functionality change.

The new name, qemuProcessStopQmp, is consistent with the existing
function qemuProcessStop used to stop Domain processes.

Qmp is added to the end of qemuProcessStop to differentiate between the
Domain and new non-domain version of the functions.  qemuProcessStartQmp
will be used in a future patch to mirror the qemuProcessStart function
with a non-domain equivalent.

Signed-off-by: Chris Venteicher <cventeic@redhat.com>
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_process.c      | 6 +++---
 src/qemu/qemu_process.h      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 1ea63000e2..73ec8e5c6e 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4237,7 +4237,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
         goto cleanup;
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
-        qemuProcessAbort(proc);
+        qemuProcessStopQmp(proc);
         if ((rc = qemuProcessRun(proc, true)) != 0) {
             if (rc == 1)
                 ret = 0;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e949547124..2571024e8e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8086,7 +8086,7 @@ qemuProcessFree(qemuProcessPtr proc)
     if (!proc)
         return;
 
-    qemuProcessAbort(proc);
+    qemuProcessStopQmp(proc);
     VIR_FREE(proc->binary);
     VIR_FREE(proc->monpath);
     VIR_FREE(proc->monarg);
@@ -8222,7 +8222,7 @@ qemuProcessRun(qemuProcessPtr proc,
 
  cleanup:
     if (!proc->mon)
-        qemuProcessAbort(proc);
+        qemuProcessStopQmp(proc);
     virObjectUnref(xmlopt);
 
     return ret;
@@ -8234,7 +8234,7 @@ qemuProcessRun(qemuProcessPtr proc,
 
 
 void
-qemuProcessAbort(qemuProcessPtr proc)
+qemuProcessStopQmp(qemuProcessPtr proc)
 {
     if (proc->mon)
         virObjectUnlock(proc->mon);
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index 161311d007..25343c4592 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -241,6 +241,6 @@ void qemuProcessFree(qemuProcessPtr proc);
 
 int qemuProcessRun(qemuProcessPtr proc, bool forceTCG);
 
-void qemuProcessAbort(qemuProcessPtr proc);
+void qemuProcessStopQmp(qemuProcessPtr proc);
 
 #endif /* __QEMU_PROCESS_H__ */
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH RFC 05/22] qemu_process: Use consistent name for stop process function
Posted by Jiri Denemark 6 years ago
On Sun, Nov 11, 2018 at 13:59:13 -0600, Chris Venteicher wrote:
> s/qemuProcessAbort/qemuProcessStopQmp/ applied to change function name
> used to stop QEMU processes in process code moved from
> qemu_capabilities.

Since the prefix will be qemuProcessQMP rather then qemuProcess, the
qemuProcessAbort will actually be renamed as qemuProcessQMPStop.

And qemuProcessRun (qemuProcessQMPRun with the new prefix) should be
called qemuProcessQMPStart for consistency (see also my reply to patch
10/22 where a similarly named function would be introduced).

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list