Rename qemuMonitorIOThreadsInfo* to qemuMonitorIOThreadInfo*

It only deals with a single thread.
This commit is contained in:
Ján Tomko 2015-03-25 16:59:37 +01:00
parent cf8b828a72
commit 9e48f6cf9f
7 changed files with 18 additions and 18 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -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;

View File

@ -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;