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

Rename qemuMonitorIOThreadsInfo* to qemuMonitorIOThreadInfo*

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