[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v6 02/33] qemu_process: Use qemuProcessQMP prefix



s/virQEMUCapsInitQMPCommand/qemuProcessQMP/

No functionality change.

Use file appropriate prefix in moved code.

Signed-off-by: Chris Venteicher <cventeic redhat com>
---
 src/qemu/qemu_capabilities.c | 14 +++++++-------
 src/qemu/qemu_process.c      | 28 ++++++++++++++--------------
 src/qemu/qemu_process.h      | 24 ++++++++++++------------
 3 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index acd88d990e..60ad8ad68d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4359,15 +4359,15 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
                    gid_t runGid,
                    char **qmperr)
 {
-    virQEMUCapsInitQMPCommandPtr cmd = NULL;
+    qemuProcessQMPPtr cmd = NULL;
     int ret = -1;
     int rc;
 
-    if (!(cmd = virQEMUCapsInitQMPCommandNew(qemuCaps->binary, libDir,
-                                             runUid, runGid, qmperr)))
+    if (!(cmd = qemuProcessQMPNew(qemuCaps->binary, libDir,
+                                  runUid, runGid, qmperr)))
         goto cleanup;
 
-    if ((rc = virQEMUCapsInitQMPCommandRun(cmd, false)) != 0) {
+    if ((rc = qemuProcessQMPRun(cmd, false)) != 0) {
         if (rc == 1)
             ret = 0;
         goto cleanup;
@@ -4377,8 +4377,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
         goto cleanup;
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
-        virQEMUCapsInitQMPCommandAbort(cmd);
-        if ((rc = virQEMUCapsInitQMPCommandRun(cmd, true)) != 0) {
+        qemuProcessQMPAbort(cmd);
+        if ((rc = qemuProcessQMPRun(cmd, true)) != 0) {
             if (rc == 1)
                 ret = 0;
             goto cleanup;
@@ -4391,7 +4391,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
     ret = 0;
 
  cleanup:
-    virQEMUCapsInitQMPCommandFree(cmd);
+    qemuProcessQMPFree(cmd);
     return ret;
 }
 
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 9698f5b9a1..dd3bd441e5 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8204,12 +8204,12 @@ static qemuMonitorCallbacks callbacks = {
 
 
 void
-virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd)
+qemuProcessQMPFree(qemuProcessQMPPtr cmd)
 {
     if (!cmd)
         return;
 
-    virQEMUCapsInitQMPCommandAbort(cmd);
+    qemuProcessQMPAbort(cmd);
     VIR_FREE(cmd->binary);
     VIR_FREE(cmd->monpath);
     VIR_FREE(cmd->monarg);
@@ -8218,14 +8218,14 @@ virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd)
 }
 
 
-virQEMUCapsInitQMPCommandPtr
-virQEMUCapsInitQMPCommandNew(char *binary,
-                             const char *libDir,
-                             uid_t runUid,
-                             gid_t runGid,
-                             char **qmperr)
+qemuProcessQMPPtr
+qemuProcessQMPNew(char *binary,
+                  const char *libDir,
+                  uid_t runUid,
+                  gid_t runGid,
+                  char **qmperr)
 {
-    virQEMUCapsInitQMPCommandPtr cmd = NULL;
+    qemuProcessQMPPtr cmd = NULL;
 
     if (VIR_ALLOC(cmd) < 0)
         goto error;
@@ -8264,7 +8264,7 @@ virQEMUCapsInitQMPCommandNew(char *binary,
     return cmd;
 
  error:
-    virQEMUCapsInitQMPCommandFree(cmd);
+    qemuProcessQMPFree(cmd);
     return NULL;
 }
 
@@ -8274,8 +8274,8 @@ virQEMUCapsInitQMPCommandNew(char *binary,
  *          1 when probing QEMU failed
  */
 int
-virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
-                             bool forceTCG)
+qemuProcessQMPRun(qemuProcessQMPPtr cmd,
+                  bool forceTCG)
 {
     virDomainXMLOptionPtr xmlopt = NULL;
     const char *machine;
@@ -8345,7 +8345,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
 
  cleanup:
     if (!cmd->mon)
-        virQEMUCapsInitQMPCommandAbort(cmd);
+        qemuProcessQMPAbort(cmd);
     virObjectUnref(xmlopt);
 
     return ret;
@@ -8357,7 +8357,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
 
 
 void
-virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd)
+qemuProcessQMPAbort(qemuProcessQMPPtr cmd)
 {
     if (cmd->mon)
         virObjectUnlock(cmd->mon);
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index f76613a7f7..4843210f76 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -214,9 +214,9 @@ int qemuProcessStartManagedPRDaemon(virDomainObjPtr vm);
 
 void qemuProcessKillManagedPRDaemon(virDomainObjPtr vm);
 
-typedef struct _virQEMUCapsInitQMPCommand virQEMUCapsInitQMPCommand;
-typedef virQEMUCapsInitQMPCommand *virQEMUCapsInitQMPCommandPtr;
-struct _virQEMUCapsInitQMPCommand {
+typedef struct _qemuProcessQMP qemuProcessQMP;
+typedef qemuProcessQMP *qemuProcessQMPPtr;
+struct _qemuProcessQMP {
     char *binary;
     uid_t runUid;
     gid_t runGid;
@@ -231,17 +231,17 @@ struct _virQEMUCapsInitQMPCommand {
     virDomainObjPtr vm;
 };
 
-virQEMUCapsInitQMPCommandPtr virQEMUCapsInitQMPCommandNew(char *binary,
-                                                          const char *libDir,
-                                                          uid_t runUid,
-                                                          gid_t runGid,
-                                                          char **qmperr);
+qemuProcessQMPPtr qemuProcessQMPNew(char *binary,
+                                    const char *libDir,
+                                    uid_t runUid,
+                                    gid_t runGid,
+                                    char **qmperr);
 
-void virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd);
+void qemuProcessQMPFree(qemuProcessQMPPtr cmd);
 
-int virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
-                                 bool forceTCG);
+int qemuProcessQMPRun(qemuProcessQMPPtr cmd,
+                      bool forceTCG);
 
-void virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd);
+void qemuProcessQMPAbort(qemuProcessQMPPtr cmd);
 
 #endif /* LIBVIRT_QEMU_PROCESS_H */
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]