]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo
authorPeter Krempa <pkrempa@redhat.com>
Fri, 8 Jul 2016 13:36:27 +0000 (15:36 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Aug 2016 06:03:58 +0000 (08:03 +0200)
Use a name that contains the command used to get the information.

src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.h
tests/qemumonitorjsontest.c

index 3455590f20403b39584d53021741670dc98244e9..83e12729a22feddab07e6beb50639d868af4cb8e 100644 (file)
@@ -1672,9 +1672,9 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
     QEMU_CHECK_MONITOR(mon);
 
     if (mon->json)
-        return qemuMonitorJSONGetCPUInfo(mon, pids);
+        return qemuMonitorJSONQueryCPUs(mon, pids);
     else
-        return qemuMonitorTextGetCPUInfo(mon, pids);
+        return qemuMonitorTextQueryCPUs(mon, pids);
 }
 
 
index c57c8b85105d8dd5a3c335442850b1f37cacb748..d455adf73db69ff3fdcc7bd77d4c48ed8c68b96f 100644 (file)
@@ -1376,8 +1376,9 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
 }
 
 
-int qemuMonitorJSONGetCPUInfo(qemuMonitorPtr mon,
-                              int **pids)
+int
+qemuMonitorJSONQueryCPUs(qemuMonitorPtr mon,
+                         int **pids)
 {
     int ret = -1;
     virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("query-cpus",
index 7f3222a477986c7f0ceefdbc8c6913033cd04748..174f0ef2c05c39ba085329f8b37b62735da1897f 100644 (file)
@@ -58,8 +58,8 @@ int qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
 int qemuMonitorJSONSystemPowerdown(qemuMonitorPtr mon);
 int qemuMonitorJSONSystemReset(qemuMonitorPtr mon);
 
-int qemuMonitorJSONGetCPUInfo(qemuMonitorPtr mon,
-                              int **pids);
+int qemuMonitorJSONQueryCPUs(qemuMonitorPtr mon,
+                             int **pids);
 int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
                                virDomainVirtType *virtType);
 int qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr mon,
index 2c31b5298f5c26610ff87560e37fe4a9db9511f2..ca04965f915743de98eed9fb061077d810575f2a 100644 (file)
@@ -500,8 +500,9 @@ int qemuMonitorTextSystemReset(qemuMonitorPtr mon)
 }
 
 
-int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
-                              int **pids)
+int
+qemuMonitorTextQueryCPUs(qemuMonitorPtr mon,
+                         int **pids)
 {
     char *qemucpus = NULL;
     char *line;
index eeaca52f298168d5687db0733497ef67a2bac126..b7f0cab4eedb657bde35a46d286bcf1fab1f45fd 100644 (file)
@@ -49,8 +49,8 @@ int qemuMonitorTextGetStatus(qemuMonitorPtr mon,
 int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon);
 int qemuMonitorTextSystemReset(qemuMonitorPtr mon);
 
-int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
-                              int **pids);
+int qemuMonitorTextQueryCPUs(qemuMonitorPtr mon,
+                             int **pids);
 int qemuMonitorTextGetVirtType(qemuMonitorPtr mon,
                                virDomainVirtType *virtType);
 int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
index e8946c263168423672a8369078d04dab0535919e..544b5696d319d760930c9231efa12a919ff0119f 100644 (file)
@@ -1203,7 +1203,7 @@ GEN_TEST_FUNC(qemuMonitorJSONDetachCharDev, "serial1")
 
 
 static int
-testQemuMonitorJSONqemuMonitorJSONGetCPUInfo(const void *data)
+testQemuMonitorJSONqemuMonitorJSONQueryCPUs(const void *data)
 {
     virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
     qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
@@ -1252,7 +1252,7 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUInfo(const void *data)
                                "}") < 0)
         goto cleanup;
 
-    ncpupids = qemuMonitorJSONGetCPUInfo(qemuMonitorTestGetMonitor(test), &cpupids);
+    ncpupids = qemuMonitorJSONQueryCPUs(qemuMonitorTestGetMonitor(test), &cpupids);
 
     if (ncpupids != 4) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -2420,7 +2420,7 @@ mymain(void)
     DO_TEST(qemuMonitorJSONSetBlockIoThrottle);
     DO_TEST(qemuMonitorJSONGetTargetArch);
     DO_TEST(qemuMonitorJSONGetMigrationCapability);
-    DO_TEST(qemuMonitorJSONGetCPUInfo);
+    DO_TEST(qemuMonitorJSONQueryCPUs);
     DO_TEST(qemuMonitorJSONGetVirtType);
     DO_TEST(qemuMonitorJSONSendKey);
     DO_TEST(qemuMonitorJSONGetDumpGuestMemoryCapability);