提交 5965fa75 编写于 作者: P Peter Krempa

qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo

Use a name that contains the command used to get the information.
上级 8f56b5ba
......@@ -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);
}
......
......@@ -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",
......
......@@ -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,
......
......@@ -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;
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册