提交 9e48f6cf 编写于 作者: J Ján Tomko

Rename qemuMonitorIOThreadsInfo* to qemuMonitorIOThreadInfo*

It only deals with a single thread.
上级 cf8b828a
......@@ -5715,7 +5715,7 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
virDomainIOThreadInfoPtr **info)
{
qemuDomainObjPrivatePtr priv;
qemuMonitorIOThreadsInfoPtr *iothreads = NULL;
qemuMonitorIOThreadInfoPtr *iothreads = NULL;
virDomainIOThreadInfoPtr *info_ret = NULL;
int niothreads = 0;
int hostcpus;
......@@ -5793,7 +5793,7 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
}
if (iothreads) {
for (i = 0; i < niothreads; i++)
qemuMonitorIOThreadsInfoFree(iothreads[i]);
qemuMonitorIOThreadInfoFree(iothreads[i]);
VIR_FREE(iothreads);
}
......
......@@ -4336,7 +4336,7 @@ qemuMonitorRTCResetReinjection(qemuMonitorPtr mon)
*/
int
qemuMonitorGetIOThreads(qemuMonitorPtr mon,
qemuMonitorIOThreadsInfoPtr **iothreads)
qemuMonitorIOThreadInfoPtr **iothreads)
{
VIR_DEBUG("mon=%p iothreads=%p", mon, iothreads);
......@@ -4356,7 +4356,7 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon,
return qemuMonitorJSONGetIOThreads(mon, iothreads);
}
void qemuMonitorIOThreadsInfoFree(qemuMonitorIOThreadsInfoPtr iothread)
void qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread)
{
if (!iothread)
return;
......
......@@ -872,17 +872,17 @@ int qemuMonitorGetGuestCPU(qemuMonitorPtr mon,
int qemuMonitorRTCResetReinjection(qemuMonitorPtr mon);
typedef struct _qemuMonitorIOThreadsInfo qemuMonitorIOThreadsInfo;
typedef qemuMonitorIOThreadsInfo *qemuMonitorIOThreadsInfoPtr;
typedef struct _qemuMonitorIOThreadInfo qemuMonitorIOThreadInfo;
typedef qemuMonitorIOThreadInfo *qemuMonitorIOThreadInfoPtr;
struct _qemuMonitorIOThreadsInfo {
struct _qemuMonitorIOThreadInfo {
char *name;
int thread_id;
};
int qemuMonitorGetIOThreads(qemuMonitorPtr mon,
qemuMonitorIOThreadsInfoPtr **iothreads);
qemuMonitorIOThreadInfoPtr **iothreads);
void qemuMonitorIOThreadsInfoFree(qemuMonitorIOThreadsInfoPtr iothread);
void qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread);
typedef struct _qemuMonitorMemoryDeviceInfo qemuMonitorMemoryDeviceInfo;
typedef qemuMonitorMemoryDeviceInfo *qemuMonitorMemoryDeviceInfoPtr;
......
......@@ -6411,13 +6411,13 @@ qemuMonitorJSONRTCResetReinjection(qemuMonitorPtr mon)
*/
int
qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
qemuMonitorIOThreadsInfoPtr **iothreads)
qemuMonitorIOThreadInfoPtr **iothreads)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
qemuMonitorIOThreadsInfoPtr *infolist = NULL;
qemuMonitorIOThreadInfoPtr *infolist = NULL;
int n = 0;
size_t i;
......@@ -6455,7 +6455,7 @@ qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
for (i = 0; i < n; i++) {
virJSONValuePtr child = virJSONValueArrayGet(data, i);
const char *tmp;
qemuMonitorIOThreadsInfoPtr info;
qemuMonitorIOThreadInfoPtr info;
if (VIR_ALLOC(info) < 0)
goto cleanup;
......@@ -6486,7 +6486,7 @@ qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
cleanup:
if (ret < 0 && infolist) {
for (i = 0; i < n; i++)
qemuMonitorIOThreadsInfoFree(infolist[i]);
qemuMonitorIOThreadInfoFree(infolist[i]);
VIR_FREE(infolist);
}
virJSONValueFree(cmd);
......
......@@ -467,7 +467,7 @@ int qemuMonitorJSONGetGuestCPU(qemuMonitorPtr mon,
int qemuMonitorJSONRTCResetReinjection(qemuMonitorPtr mon);
int qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
qemuMonitorIOThreadsInfoPtr **iothreads)
qemuMonitorIOThreadInfoPtr **iothreads)
ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitorPtr mon,
......
......@@ -2224,7 +2224,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
int asyncJob)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuMonitorIOThreadsInfoPtr *iothreads = NULL;
qemuMonitorIOThreadInfoPtr *iothreads = NULL;
int niothreads = 0;
int ret = -1;
size_t i;
......@@ -2267,7 +2267,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
cleanup:
if (iothreads) {
for (i = 0; i < niothreads; i++)
qemuMonitorIOThreadsInfoFree(iothreads[i]);
qemuMonitorIOThreadInfoFree(iothreads[i]);
VIR_FREE(iothreads);
}
return ret;
......
......@@ -2241,7 +2241,7 @@ testQemuMonitorJSONGetIOThreads(const void *data)
{
virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
qemuMonitorIOThreadsInfoPtr *info;
qemuMonitorIOThreadInfoPtr *info;
int ninfo = 0;
int ret = -1;
size_t i;
......@@ -2300,7 +2300,7 @@ testQemuMonitorJSONGetIOThreads(const void *data)
cleanup:
qemuMonitorTestFree(test);
for (i = 0; i < ninfo; i++)
qemuMonitorIOThreadsInfoFree(info[i]);
qemuMonitorIOThreadInfoFree(info[i]);
VIR_FREE(info);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册