Rename DomainGetIOThreadsInfo to DomainGetIOThreadInfo

While it returns info about multiple threads, the version
without the plural is easier to read.
This commit is contained in:
Ján Tomko 2015-03-25 17:02:26 +01:00
parent 9e48f6cf9f
commit a96b68e7a4
11 changed files with 48 additions and 49 deletions

View File

@ -2270,12 +2270,12 @@ remoteDispatchDomainGetVcpus(virNetServerPtr server ATTRIBUTE_UNUSED,
}
static int
remoteDispatchDomainGetIOThreadsInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
remote_domain_get_iothreads_info_args *args,
remote_domain_get_iothreads_info_ret *ret)
remoteDispatchDomainGetIOThreadInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
remote_domain_get_iothread_info_args *args,
remote_domain_get_iothread_info_ret *ret)
{
int rv = -1;
size_t i;
@ -2293,13 +2293,13 @@ remoteDispatchDomainGetIOThreadsInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
goto cleanup;
if ((ninfo = virDomainGetIOThreadsInfo(dom, &info, args->flags)) < 0)
if ((ninfo = virDomainGetIOThreadInfo(dom, &info, args->flags)) < 0)
goto cleanup;
if (ninfo > REMOTE_IOTHREADS_INFO_MAX) {
if (ninfo > REMOTE_IOTHREAD_INFO_MAX) {
virReportError(VIR_ERR_RPC,
_("Too many IOThreads in info: %d for limit %d"),
ninfo, REMOTE_IOTHREADS_INFO_MAX);
ninfo, REMOTE_IOTHREAD_INFO_MAX);
goto cleanup;
}

View File

@ -1607,7 +1607,7 @@ struct _virDomainIOThreadInfo {
void virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr info);
int virDomainGetIOThreadsInfo(virDomainPtr domain,
int virDomainGetIOThreadInfo(virDomainPtr domain,
virDomainIOThreadInfoPtr **info,
unsigned int flags);
int virDomainPinIOThread(virDomainPtr domain,

View File

@ -381,9 +381,9 @@ typedef int
(*virDrvDomainGetMaxVcpus)(virDomainPtr domain);
typedef int
(*virDrvDomainGetIOThreadsInfo)(virDomainPtr domain,
virDomainIOThreadInfoPtr **info,
unsigned int flags);
(*virDrvDomainGetIOThreadInfo)(virDomainPtr domain,
virDomainIOThreadInfoPtr **info,
unsigned int flags);
typedef int
(*virDrvDomainPinIOThread)(virDomainPtr domain,
@ -1271,7 +1271,7 @@ struct _virHypervisorDriver {
virDrvDomainGetEmulatorPinInfo domainGetEmulatorPinInfo;
virDrvDomainGetVcpus domainGetVcpus;
virDrvDomainGetMaxVcpus domainGetMaxVcpus;
virDrvDomainGetIOThreadsInfo domainGetIOThreadsInfo;
virDrvDomainGetIOThreadInfo domainGetIOThreadInfo;
virDrvDomainPinIOThread domainPinIOThread;
virDrvDomainGetSecurityLabel domainGetSecurityLabel;
virDrvDomainGetSecurityLabelList domainGetSecurityLabelList;

View File

@ -7894,7 +7894,7 @@ virDomainGetMaxVcpus(virDomainPtr domain)
/**
* virDomainGetIOThreadsInfo:
* virDomainGetIOThreadInfo:
* @dom: a domain object
* @info: pointer to an array of virDomainIOThreadInfo structures (OUT)
* @flags: bitwise-OR of virDomainModificationImpact
@ -7910,9 +7910,9 @@ virDomainGetMaxVcpus(virDomainPtr domain)
* then calling free() on @info. On error, @info is set to NULL.
*/
int
virDomainGetIOThreadsInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
virDomainGetIOThreadInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
{
VIR_DOMAIN_DEBUG(dom, "info=%p flags=%x", info, flags);
@ -7932,9 +7932,9 @@ virDomainGetIOThreadsInfo(virDomainPtr dom,
goto error;
}
if (dom->conn->driver->domainGetIOThreadsInfo) {
if (dom->conn->driver->domainGetIOThreadInfo) {
int ret;
ret = dom->conn->driver->domainGetIOThreadsInfo(dom, info, flags);
ret = dom->conn->driver->domainGetIOThreadInfo(dom, info, flags);
if (ret < 0)
goto error;
return ret;
@ -7993,7 +7993,7 @@ virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr info)
* just live or both live and persistent state is changed.
* Not all hypervisors can support all flag combinations.
*
* See also virDomainGetIOThreadsInfo for querying this information.
* See also virDomainGetIOThreadInfo for querying this information.
*
* Returns 0 in case of success, -1 in case of failure.
*/

View File

@ -698,7 +698,7 @@ LIBVIRT_1.2.12 {
LIBVIRT_1.2.14 {
global:
virDomainIOThreadInfoFree;
virDomainGetIOThreadsInfo;
virDomainGetIOThreadInfo;
virDomainPinIOThread;
virDomainInterfaceAddresses;
virDomainInterfaceFree;

View File

@ -5868,9 +5868,9 @@ qemuDomainGetIOThreadsConfig(virDomainDefPtr targetDef,
}
static int
qemuDomainGetIOThreadsInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
qemuDomainGetIOThreadInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
@ -5884,7 +5884,7 @@ qemuDomainGetIOThreadsInfo(virDomainPtr dom,
if (!(vm = qemuDomObjFromDomain(dom)))
goto cleanup;
if (virDomainGetIOThreadsInfoEnsureACL(dom->conn, vm->def) < 0)
if (virDomainGetIOThreadInfoEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
@ -19824,7 +19824,7 @@ static virHypervisorDriver qemuHypervisorDriver = {
.domainGetEmulatorPinInfo = qemuDomainGetEmulatorPinInfo, /* 0.10.0 */
.domainGetVcpus = qemuDomainGetVcpus, /* 0.4.4 */
.domainGetMaxVcpus = qemuDomainGetMaxVcpus, /* 0.4.4 */
.domainGetIOThreadsInfo = qemuDomainGetIOThreadsInfo, /* 1.2.14 */
.domainGetIOThreadInfo = qemuDomainGetIOThreadInfo, /* 1.2.14 */
.domainPinIOThread = qemuDomainPinIOThread, /* 1.2.14 */
.domainGetSecurityLabel = qemuDomainGetSecurityLabel, /* 0.6.1 */
.domainGetSecurityLabelList = qemuDomainGetSecurityLabelList, /* 0.10.0 */

View File

@ -2316,15 +2316,15 @@ remoteDomainGetVcpus(virDomainPtr domain,
}
static int
remoteDomainGetIOThreadsInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
remoteDomainGetIOThreadInfo(virDomainPtr dom,
virDomainIOThreadInfoPtr **info,
unsigned int flags)
{
int rv = -1;
size_t i;
struct private_data *priv = dom->conn->privateData;
remote_domain_get_iothreads_info_args args;
remote_domain_get_iothreads_info_ret ret;
remote_domain_get_iothread_info_args args;
remote_domain_get_iothread_info_ret ret;
remote_domain_iothread_info *src;
virDomainIOThreadInfoPtr *info_ret = NULL;
@ -2336,17 +2336,17 @@ remoteDomainGetIOThreadsInfo(virDomainPtr dom,
memset(&ret, 0, sizeof(ret));
if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_IOTHREADS_INFO,
(xdrproc_t)xdr_remote_domain_get_iothreads_info_args,
if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO,
(xdrproc_t)xdr_remote_domain_get_iothread_info_args,
(char *)&args,
(xdrproc_t)xdr_remote_domain_get_iothreads_info_ret,
(xdrproc_t)xdr_remote_domain_get_iothread_info_ret,
(char *)&ret) == -1)
goto done;
if (ret.info.info_len > REMOTE_IOTHREADS_INFO_MAX) {
if (ret.info.info_len > REMOTE_IOTHREAD_INFO_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Too many IOThreads in info: %d for limit %d"),
ret.info.info_len, REMOTE_IOTHREADS_INFO_MAX);
ret.info.info_len, REMOTE_IOTHREAD_INFO_MAX);
goto cleanup;
}
@ -2385,7 +2385,7 @@ remoteDomainGetIOThreadsInfo(virDomainPtr dom,
virDomainIOThreadInfoFree(info_ret[i]);
VIR_FREE(info_ret);
}
xdr_free((xdrproc_t)xdr_remote_domain_get_iothreads_info_ret,
xdr_free((xdrproc_t)xdr_remote_domain_get_iothread_info_ret,
(char *) &ret);
done:
@ -8208,7 +8208,7 @@ static virHypervisorDriver hypervisor_driver = {
.domainGetEmulatorPinInfo = remoteDomainGetEmulatorPinInfo, /* 0.10.0 */
.domainGetVcpus = remoteDomainGetVcpus, /* 0.3.0 */
.domainGetMaxVcpus = remoteDomainGetMaxVcpus, /* 0.3.0 */
.domainGetIOThreadsInfo = remoteDomainGetIOThreadsInfo, /* 1.2.14 */
.domainGetIOThreadInfo = remoteDomainGetIOThreadInfo, /* 1.2.14 */
.domainPinIOThread = remoteDomainPinIOThread, /* 1.2.14 */
.domainGetSecurityLabel = remoteDomainGetSecurityLabel, /* 0.6.1 */
.domainGetSecurityLabelList = remoteDomainGetSecurityLabelList, /* 0.10.0 */

View File

@ -86,7 +86,7 @@ const REMOTE_VCPUINFO_MAX = 16384;
const REMOTE_CPUMAPS_MAX = 8388608;
/* Upper limit on number of info fields returned by virDomainGetIOThreads. */
const REMOTE_IOTHREADS_INFO_MAX = 16384;
const REMOTE_IOTHREAD_INFO_MAX = 16384;
/* Upper limit on migrate cookie. */
const REMOTE_MIGRATE_COOKIE_MAX = 4194304;
@ -1195,13 +1195,13 @@ struct remote_domain_iothread_info {
opaque cpumap<REMOTE_CPUMAP_MAX>;
};
struct remote_domain_get_iothreads_info_args {
struct remote_domain_get_iothread_info_args {
remote_nonnull_domain dom;
unsigned int flags;
};
struct remote_domain_get_iothreads_info_ret {
remote_domain_iothread_info info<REMOTE_IOTHREADS_INFO_MAX>;
struct remote_domain_get_iothread_info_ret {
remote_domain_iothread_info info<REMOTE_IOTHREAD_INFO_MAX>;
unsigned int ret;
};
@ -5629,7 +5629,7 @@ enum remote_procedure {
* @generate: none
* @acl: domain:read
*/
REMOTE_PROC_DOMAIN_GET_IOTHREADS_INFO = 351,
REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO = 351,
/**
* @generate: both

View File

@ -814,11 +814,11 @@ struct remote_domain_iothread_info {
char * cpumap_val;
} cpumap;
};
struct remote_domain_get_iothreads_info_args {
struct remote_domain_get_iothread_info_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_iothreads_info_ret {
struct remote_domain_get_iothread_info_ret {
struct {
u_int info_len;
remote_domain_iothread_info * info_val;
@ -3014,7 +3014,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE = 348,
REMOTE_PROC_DOMAIN_GET_FSINFO = 349,
REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS = 350,
REMOTE_PROC_DOMAIN_GET_IOTHREADS_INFO = 351,
REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO = 351,
REMOTE_PROC_DOMAIN_PIN_IOTHREAD = 352,
REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES = 353,
};

View File

@ -67,7 +67,6 @@ sub fixup_name {
$name =~ s/Fsfreeze$/FSFreeze/;
$name =~ s/Fsthaw$/FSThaw/;
$name =~ s/Fsinfo$/FSInfo/;
$name =~ s/Iothreads$/IOThreads/;
$name =~ s/Iothread$/IOThread/;
$name =~ s/Scsi/SCSI/;
$name =~ s/Wwn$/WWN/;

View File

@ -6849,7 +6849,7 @@ cmdIOThreadInfo(vshControl *ctl, const vshCmd *cmd)
if ((maxcpu = vshNodeGetCPUCount(ctl->conn)) < 0)
goto cleanup;
if ((niothreads = virDomainGetIOThreadsInfo(dom, &info, flags)) < 0) {
if ((niothreads = virDomainGetIOThreadInfo(dom, &info, flags)) < 0) {
vshError(ctl, _("Unable to get domain IOThreads information"));
goto cleanup;
}