|
|
6ae9ed |
From 6a13af86bfba6f91cb86c4c2ff3a8f3e2edde275 Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <6a13af86bfba6f91cb86c4c2ff3a8f3e2edde275@dist-git>
|
|
|
6ae9ed |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
6ae9ed |
Date: Wed, 24 Aug 2016 16:11:07 -0400
|
|
|
6ae9ed |
Subject: [PATCH] qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Use a name that contains the command used to get the information.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
(cherry picked from commit 5965fa759c1b97be7e00369eff285f0af3eb2b15)
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
src/qemu/qemu_monitor.c | 4 ++--
|
|
|
6ae9ed |
src/qemu/qemu_monitor_json.c | 5 +++--
|
|
|
6ae9ed |
src/qemu/qemu_monitor_json.h | 4 ++--
|
|
|
6ae9ed |
src/qemu/qemu_monitor_text.c | 5 +++--
|
|
|
6ae9ed |
src/qemu/qemu_monitor_text.h | 4 ++--
|
|
|
6ae9ed |
tests/qemumonitorjsontest.c | 6 +++---
|
|
|
6ae9ed |
6 files changed, 15 insertions(+), 13 deletions(-)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
|
|
|
6ae9ed |
index 65e7a11..8a558ca 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_monitor.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_monitor.c
|
|
|
6ae9ed |
@@ -1667,9 +1667,9 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
QEMU_CHECK_MONITOR(mon);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
if (mon->json)
|
|
|
6ae9ed |
- return qemuMonitorJSONGetCPUInfo(mon, pids);
|
|
|
6ae9ed |
+ return qemuMonitorJSONQueryCPUs(mon, pids);
|
|
|
6ae9ed |
else
|
|
|
6ae9ed |
- return qemuMonitorTextGetCPUInfo(mon, pids);
|
|
|
6ae9ed |
+ return qemuMonitorTextQueryCPUs(mon, pids);
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
|
|
|
6ae9ed |
index fae589f..a45772e 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_monitor_json.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_monitor_json.c
|
|
|
6ae9ed |
@@ -1382,8 +1382,9 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
|
|
|
6ae9ed |
|
|
|
6ae9ed |
-int qemuMonitorJSONGetCPUInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
- int **pids)
|
|
|
6ae9ed |
+int
|
|
|
6ae9ed |
+qemuMonitorJSONQueryCPUs(qemuMonitorPtr mon,
|
|
|
6ae9ed |
+ int **pids)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
int ret = -1;
|
|
|
6ae9ed |
virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("query-cpus",
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
|
|
|
6ae9ed |
index 3fe5cf1..ef198b4 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_monitor_json.h
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_monitor_json.h
|
|
|
6ae9ed |
@@ -58,8 +58,8 @@ int qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
|
|
|
6ae9ed |
int qemuMonitorJSONSystemPowerdown(qemuMonitorPtr mon);
|
|
|
6ae9ed |
int qemuMonitorJSONSystemReset(qemuMonitorPtr mon);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
-int qemuMonitorJSONGetCPUInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
- int **pids);
|
|
|
6ae9ed |
+int qemuMonitorJSONQueryCPUs(qemuMonitorPtr mon,
|
|
|
6ae9ed |
+ int **pids);
|
|
|
6ae9ed |
int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
|
|
|
6ae9ed |
virDomainVirtType *virtType);
|
|
|
6ae9ed |
int qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr mon,
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
|
|
|
6ae9ed |
index 9295219..0b05587 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_monitor_text.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_monitor_text.c
|
|
|
6ae9ed |
@@ -500,8 +500,9 @@ int qemuMonitorTextSystemReset(qemuMonitorPtr mon)
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
|
|
|
6ae9ed |
|
|
|
6ae9ed |
-int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
- int **pids)
|
|
|
6ae9ed |
+int
|
|
|
6ae9ed |
+qemuMonitorTextQueryCPUs(qemuMonitorPtr mon,
|
|
|
6ae9ed |
+ int **pids)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
char *qemucpus = NULL;
|
|
|
6ae9ed |
char *line;
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_monitor_text.h b/src/qemu/qemu_monitor_text.h
|
|
|
6ae9ed |
index eeaca52..b7f0cab 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_monitor_text.h
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_monitor_text.h
|
|
|
6ae9ed |
@@ -49,8 +49,8 @@ int qemuMonitorTextGetStatus(qemuMonitorPtr mon,
|
|
|
6ae9ed |
int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon);
|
|
|
6ae9ed |
int qemuMonitorTextSystemReset(qemuMonitorPtr mon);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
-int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
- int **pids);
|
|
|
6ae9ed |
+int qemuMonitorTextQueryCPUs(qemuMonitorPtr mon,
|
|
|
6ae9ed |
+ int **pids);
|
|
|
6ae9ed |
int qemuMonitorTextGetVirtType(qemuMonitorPtr mon,
|
|
|
6ae9ed |
virDomainVirtType *virtType);
|
|
|
6ae9ed |
int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
|
|
|
6ae9ed |
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
index f698c14..1d245d0 100644
|
|
|
6ae9ed |
--- a/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
+++ b/tests/qemumonitorjsontest.c
|
|
|
6ae9ed |
@@ -1203,7 +1203,7 @@ GEN_TEST_FUNC(qemuMonitorJSONDetachCharDev, "serial1")
|
|
|
6ae9ed |
|
|
|
6ae9ed |
|
|
|
6ae9ed |
static int
|
|
|
6ae9ed |
-testQemuMonitorJSONqemuMonitorJSONGetCPUInfo(const void *data)
|
|
|
6ae9ed |
+testQemuMonitorJSONqemuMonitorJSONQueryCPUs(const void *data)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
|
|
|
6ae9ed |
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
|
|
|
6ae9ed |
@@ -1252,7 +1252,7 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUInfo(const void *data)
|
|
|
6ae9ed |
"}") < 0)
|
|
|
6ae9ed |
goto cleanup;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
- ncpupids = qemuMonitorJSONGetCPUInfo(qemuMonitorTestGetMonitor(test), &cpupids);
|
|
|
6ae9ed |
+ ncpupids = qemuMonitorJSONQueryCPUs(qemuMonitorTestGetMonitor(test), &cpupids);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
if (ncpupids != 4) {
|
|
|
6ae9ed |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
6ae9ed |
@@ -2420,7 +2420,7 @@ mymain(void)
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONSetBlockIoThrottle);
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONGetTargetArch);
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONGetMigrationCapability);
|
|
|
6ae9ed |
- DO_TEST(qemuMonitorJSONGetCPUInfo);
|
|
|
6ae9ed |
+ DO_TEST(qemuMonitorJSONQueryCPUs);
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONGetVirtType);
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONSendKey);
|
|
|
6ae9ed |
DO_TEST(qemuMonitorJSONGetDumpGuestMemoryCapability);
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.10.0
|
|
|
6ae9ed |
|