On Wed, Mar 25, 2015 at 19:39:08 +0100, Ján Tomko wrote: > While it returns info about multiple threads, the version > without the plural is easier to read. > --- > daemon/remote.c | 12 ++++++------ > include/libvirt/libvirt-domain.h | 2 +- > src/driver-hypervisor.h | 4 ++-- > src/libvirt-domain.c | 14 +++++++------- > src/libvirt_public.syms | 2 +- > src/qemu/qemu_driver.c | 6 +++--- > src/remote/remote_driver.c | 20 ++++++++++---------- > src/remote/remote_protocol.x | 10 +++++----- > src/remote_protocol-structs | 6 +++--- > tools/virsh-domain.c | 2 +- > 10 files changed, 39 insertions(+), 39 deletions(-) > > diff --git a/daemon/remote.c b/daemon/remote.c > index be0febb..2f4df48 100644 > --- a/daemon/remote.c > +++ b/daemon/remote.c > @@ -2269,12 +2269,12 @@ remoteDispatchDomainGetVcpus(virNetServerPtr server ATTRIBUTE_UNUSED, > } > > static int > -remoteDispatchDomainGetIOThreadsInfo(virNetServerPtr server ATTRIBUTE_UNUSED, > +remoteDispatchDomainGetIOThreadInfo(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) > + remote_domain_get_iothread_info_args *args, > + remote_domain_get_iothread_info_ret *ret) The whole block is misaligned now. > { > int rv = -1; > size_t i; > @@ -2292,13 +2292,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; > } > > diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h > index 94b55b7..7be4219 100644 > --- a/include/libvirt/libvirt-domain.h > +++ b/include/libvirt/libvirt-domain.h > @@ -1607,7 +1607,7 @@ struct _virDomainIOThreadInfo { > > void virDomainIOThreadInfoFree(virDomainIOThreadInfoPtr info); > > -int virDomainGetIOThreadsInfo(virDomainPtr domain, > +int virDomainGetIOThreadInfo(virDomainPtr domain, > virDomainIOThreadInfoPtr **info, > unsigned int flags); Misaligned ... > int virDomainPinIOThread(virDomainPtr domain, > diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h > index 3f9bf02..9df593d 100644 > --- a/src/driver-hypervisor.h > +++ b/src/driver-hypervisor.h > @@ -381,7 +381,7 @@ typedef int > (*virDrvDomainGetMaxVcpus)(virDomainPtr domain); > > typedef int > -(*virDrvDomainGetIOThreadsInfo)(virDomainPtr domain, > +(*virDrvDomainGetIOThreadInfo)(virDomainPtr domain, > virDomainIOThreadInfoPtr **info, > unsigned int flags); Misaligned ... > > @@ -1271,7 +1271,7 @@ struct _virHypervisorDriver { > virDrvDomainGetEmulatorPinInfo domainGetEmulatorPinInfo; > virDrvDomainGetVcpus domainGetVcpus; > virDrvDomainGetMaxVcpus domainGetMaxVcpus; > - virDrvDomainGetIOThreadsInfo domainGetIOThreadsInfo; > + virDrvDomainGetIOThreadInfo domainGetIOThreadInfo; > virDrvDomainPinIOThread domainPinIOThread; > virDrvDomainGetSecurityLabel domainGetSecurityLabel; > virDrvDomainGetSecurityLabelList domainGetSecurityLabelList; > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index 73ab56d..f1608dc 100644 > --- a/src/libvirt-domain.c > +++ b/src/libvirt-domain.c > @@ -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. > */ > diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms > index 7163969..28347c6 100644 > --- a/src/libvirt_public.syms > +++ b/src/libvirt_public.syms > @@ -698,7 +698,7 @@ LIBVIRT_1.2.12 { > LIBVIRT_1.2.14 { > global: > virDomainIOThreadInfoFree; > - virDomainGetIOThreadsInfo; > + virDomainGetIOThreadInfo; > virDomainPinIOThread; > virDomainInterfaceAddresses; > virDomainInterfaceFree; > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index b2597ce..bef1223 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -5868,7 +5868,7 @@ qemuDomainGetIOThreadsConfig(virDomainDefPtr targetDef, > } > > static int > -qemuDomainGetIOThreadsInfo(virDomainPtr dom, > +qemuDomainGetIOThreadInfo(virDomainPtr dom, > virDomainIOThreadInfoPtr **info, > unsigned int flags) Misaligned. > { > @@ -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 */ > diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c > index 7172ada..8bd54e6 100644 > --- a/src/remote/remote_driver.c > +++ b/src/remote/remote_driver.c > @@ -2316,15 +2316,15 @@ remoteDomainGetVcpus(virDomainPtr domain, > } > > static int > -remoteDomainGetIOThreadsInfo(virDomainPtr dom, > +remoteDomainGetIOThreadInfo(virDomainPtr dom, > virDomainIOThreadInfoPtr **info, > unsigned int flags) Misaligned. > { > 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 */ > diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x > index eb862e1..d90e6b5 100644 > --- a/src/remote/remote_protocol.x > +++ b/src/remote/remote_protocol.x > @@ -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 > diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs > index b3e2e40..e614f77 100644 > --- a/src/remote_protocol-structs > +++ b/src/remote_protocol-structs > @@ -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, > }; > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c > index 0713b93..c8e0233 100644 > --- a/tools/virsh-domain.c > +++ b/tools/virsh-domain.c > @@ -6849,7 +6849,7 @@ cmdIOThreadsInfo(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; > } The rest looks good. I slightly prefer this version so ACK if you fix all the misalignments. (Unless obviously somebody protests until you push it). Peter > -- > 2.0.5 > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list