mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo
Use a name that contains the command used to get the information.
This commit is contained in:
parent
8f56b5baaf
commit
5965fa759c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user