[PATCH] build: rename Vcpupin to VcpuPin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We already have a public virDomainPinVcpu, which implies that
Pin and Vcpu are treated as separate words.  Commit e261987c
introduced virDomainGetVcpupinInfo as the first public API
that used Vcpupin, although we had prior internal uses of that
spelling.  For consistency, change the spelling to be two
words everywhere, regardless of whether pin comes first or last.

* daemon/remote.c: Treat vcpu and pin as separate words.
* include/libvirt/libvirt.h.in: Likewise.
* src/conf/domain_conf.c: Likewise.
* src/conf/domain_conf.h: Likewise.
* src/driver.h: Likewise.
* src/libvirt.c: Likewise.
* src/libvirt_private.syms: Likewise.
* src/libvirt_public.syms: Likewise.
* src/libxl/libxl_driver.c: Likewise.
* src/qemu/qemu_driver.c: Likewise.
* src/remote/remote_driver.c: Likewise.
* src/xen/xend_internal.c: Likewise.
* tools/virsh.c: Likewise.
* src/remote/remote_protocol.x: Likewise.
* src/remote_protocol-structs: Likewise.
Suggested by Matthias Bolte.
---

In response to http://www.redhat.com/archives/libvir-list/2011-June/msg01292.html

 daemon/remote.c              |    8 ++++----
 include/libvirt/libvirt.h.in |    2 +-
 src/conf/domain_conf.c       |   40 ++++++++++++++++++++--------------------
 src/conf/domain_conf.h       |   16 ++++++++--------
 src/driver.h                 |    4 ++--
 src/libvirt.c                |   12 ++++++------
 src/libvirt_private.syms     |    8 ++++----
 src/libvirt_public.syms      |    2 +-
 src/libxl/libxl_driver.c     |    2 +-
 src/qemu/qemu_driver.c       |   14 +++++++-------
 src/remote/remote_driver.c   |   16 ++++++++--------
 src/remote/remote_protocol.x |    6 +++---
 src/remote_protocol-structs  |    4 ++--
 src/xen/xend_internal.c      |    2 +-
 tools/virsh.c                |   10 +++++-----
 15 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/daemon/remote.c b/daemon/remote.c
index aa726cf..56361ea 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1048,13 +1048,13 @@ cleanup:
 }

 static int
-remoteDispatchDomainGetVcpupinInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
+remoteDispatchDomainGetVcpuPinInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
                                    struct qemud_client *client ATTRIBUTE_UNUSED,
                                    virConnectPtr conn,
                                    remote_message_header *hdr ATTRIBUTE_UNUSED,
                                    remote_error *rerr,
-                                   remote_domain_get_vcpupin_info_args *args,
-                                   remote_domain_get_vcpupin_info_ret *ret)
+                                   remote_domain_get_vcpu_pin_info_args *args,
+                                   remote_domain_get_vcpu_pin_info_ret *ret)
 {
     virDomainPtr dom = NULL;
     unsigned char *cpumaps = NULL;
@@ -1085,7 +1085,7 @@ remoteDispatchDomainGetVcpupinInfo(struct qemud_server *server ATTRIBUTE_UNUSED,
         VIR_ALLOC_N(cpumaps, args->ncpumaps * args->maplen) < 0)
         goto no_memory;

-    if ((num = virDomainGetVcpupinInfo(dom,
+    if ((num = virDomainGetVcpuPinInfo(dom,
                                        args->ncpumaps,
                                        cpumaps,
                                        args->maplen,
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 4f9f158..82e15f2 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1266,7 +1266,7 @@ int                     virDomainPinVcpuFlags   (virDomainPtr domain,
                                                  int maplen,
                                                  unsigned int flags);

-int                     virDomainGetVcpupinInfo (virDomainPtr domain,
+int                     virDomainGetVcpuPinInfo (virDomainPtr domain,
                                                  int ncpumaps,
                                                  unsigned char *cpumaps,
                                                  int maplen,
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3d290fb..60e0318 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -981,7 +981,7 @@ virDomainClockDefClear(virDomainClockDefPtr def)
 }

 static void
-virDomainVcpupinDefFree(virDomainVcpupinDefPtr *def,
+virDomainVcpuPinDefFree(virDomainVcpuPinDefPtr *def,
                         int nvcpupin)
 {
     int i;
@@ -1089,7 +1089,7 @@ void virDomainDefFree(virDomainDefPtr def)

     virCPUDefFree(def->cpu);

-    virDomainVcpupinDefFree(def->cputune.vcpupin, def->cputune.nvcpupin);
+    virDomainVcpuPinDefFree(def->cputune.vcpupin, def->cputune.nvcpupin);

     VIR_FREE(def->numatune.memory.nodemask);

@@ -5647,13 +5647,13 @@ cleanup:
 }

 /* Parse the XML definition for a vcpupin */
-static virDomainVcpupinDefPtr
-virDomainVcpupinDefParseXML(const xmlNodePtr node,
+static virDomainVcpuPinDefPtr
+virDomainVcpuPinDefParseXML(const xmlNodePtr node,
                             xmlXPathContextPtr ctxt,
                             int maxvcpus,
                             int flags ATTRIBUTE_UNUSED)
 {
-    virDomainVcpupinDefPtr def;
+    virDomainVcpuPinDefPtr def;
     xmlNodePtr oldnode = ctxt->node;
     unsigned int vcpuid;
     char *tmp = NULL;
@@ -5895,13 +5895,13 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
     }

     for (i = 0 ; i < n ; i++) {
-        virDomainVcpupinDefPtr vcpupin = NULL;
-        vcpupin = virDomainVcpupinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0);
+        virDomainVcpuPinDefPtr vcpupin = NULL;
+        vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0);

         if (!vcpupin)
             goto error;

-        if (virDomainVcpupinIsDuplicate(def->cputune.vcpupin,
+        if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
                                         def->cputune.nvcpupin,
                                         vcpupin->vcpuid)) {
             virDomainReportError(VIR_ERR_INTERNAL_ERROR,
@@ -8118,7 +8118,7 @@ virDomainCpuSetParse(const char **str, char sep,
 /* Check if vcpupin with same vcpuid already exists.
  * Return 1 if exists, 0 if not. */
 int
-virDomainVcpupinIsDuplicate(virDomainVcpupinDefPtr *def,
+virDomainVcpuPinIsDuplicate(virDomainVcpuPinDefPtr *def,
                             int nvcpupin,
                             int vcpu)
 {
@@ -8135,8 +8135,8 @@ virDomainVcpupinIsDuplicate(virDomainVcpupinDefPtr *def,
     return 0;
 }

-virDomainVcpupinDefPtr
-virDomainVcpupinFindByVcpu(virDomainVcpupinDefPtr *def,
+virDomainVcpuPinDefPtr
+virDomainVcpuPinFindByVcpu(virDomainVcpuPinDefPtr *def,
                            int nvcpupin,
                            int vcpu)
 {
@@ -8154,13 +8154,13 @@ virDomainVcpupinFindByVcpu(virDomainVcpupinDefPtr *def,
 }

 int
-virDomainVcpupinAdd(virDomainDefPtr def,
+virDomainVcpuPinAdd(virDomainDefPtr def,
                     unsigned char *cpumap,
                     int maplen,
                     int vcpu)
 {
-    virDomainVcpupinDefPtr *vcpupin_list = NULL;
-    virDomainVcpupinDefPtr vcpupin = NULL;
+    virDomainVcpuPinDefPtr *vcpupin_list = NULL;
+    virDomainVcpuPinDefPtr vcpupin = NULL;
     char *cpumask = NULL;
     int i;

@@ -8202,10 +8202,10 @@ virDomainVcpupinAdd(virDomainDefPtr def,

         def->cputune.vcpupin = vcpupin_list;
     } else {
-        if (virDomainVcpupinIsDuplicate(def->cputune.vcpupin,
+        if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
                                         def->cputune.nvcpupin,
                                         vcpu)) {
-            vcpupin = virDomainVcpupinFindByVcpu(def->cputune.vcpupin,
+            vcpupin = virDomainVcpuPinFindByVcpu(def->cputune.vcpupin,
                                                  def->cputune.nvcpupin,
                                                  vcpu);
             vcpupin->vcpuid = vcpu;
@@ -8236,11 +8236,11 @@ cleanup:
 }

 int
-virDomainVcpupinDel(virDomainDefPtr def, int vcpu)
+virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
 {
     int n;
     bool deleted = false;
-    virDomainVcpupinDefPtr *vcpupin_list = def->cputune.vcpupin;
+    virDomainVcpuPinDefPtr *vcpupin_list = def->cputune.vcpupin;

     /* No vcpupin exists yet */
     if (!def->cputune.nvcpupin) {
@@ -8253,7 +8253,7 @@ virDomainVcpupinDel(virDomainDefPtr def, int vcpu)
             VIR_FREE(vcpupin_list[n]);
             memmove(&vcpupin_list[n],
                     &vcpupin_list[n+1],
-                    (def->cputune.nvcpupin - n - 1) * sizeof(virDomainVcpupinDef *));
+                    (def->cputune.nvcpupin - n - 1) * sizeof(virDomainVcpuPinDef *));
             deleted = true;
             break;
         }
@@ -8263,7 +8263,7 @@ virDomainVcpupinDel(virDomainDefPtr def, int vcpu)
         return 0;

     if (--def->cputune.nvcpupin == 0) {
-        virDomainVcpupinDefFree(def->cputune.vcpupin, 0);
+        virDomainVcpuPinDefFree(def->cputune.vcpupin, 0);
     } else {
         if (VIR_REALLOC_N(def->cputune.vcpupin, def->cputune.nvcpupin) < 0) {
             virReportOOMError();
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index aa25e36..e81977c 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1101,18 +1101,18 @@ void virDomainSnapshotObjListRemove(virDomainSnapshotObjListPtr snapshots,
 int virDomainSnapshotHasChildren(virDomainSnapshotObjPtr snap,
                                 virDomainSnapshotObjListPtr snapshots);

-typedef struct _virDomainVcpupinDef virDomainVcpupinDef;
-typedef virDomainVcpupinDef *virDomainVcpupinDefPtr;
-struct _virDomainVcpupinDef {
+typedef struct _virDomainVcpuPinDef virDomainVcpuPinDef;
+typedef virDomainVcpuPinDef *virDomainVcpuPinDefPtr;
+struct _virDomainVcpuPinDef {
     int vcpuid;
     char *cpumask;
 };

-int virDomainVcpupinIsDuplicate(virDomainVcpupinDefPtr *def,
+int virDomainVcpuPinIsDuplicate(virDomainVcpuPinDefPtr *def,
                                 int nvcpupin,
                                 int vcpu);

-virDomainVcpupinDefPtr virDomainVcpupinFindByVcpu(virDomainVcpupinDefPtr *def,
+virDomainVcpuPinDefPtr virDomainVcpuPinFindByVcpu(virDomainVcpuPinDefPtr *def,
                                                   int nvcpupin,
                                                   int vcpu);

@@ -1171,7 +1171,7 @@ struct _virDomainDef {
     struct {
         unsigned long shares;
         int nvcpupin;
-        virDomainVcpupinDefPtr *vcpupin;
+        virDomainVcpuPinDefPtr *vcpupin;
     } cputune;

     virDomainNumatuneDef numatune;
@@ -1406,12 +1406,12 @@ int virDomainCpuSetParse(const char **str,
 char *virDomainCpuSetFormat(char *cpuset,
                             int maxcpu);

-int virDomainVcpupinAdd(virDomainDefPtr def,
+int virDomainVcpuPinAdd(virDomainDefPtr def,
                         unsigned char *cpumap,
                         int maplen,
                         int vcpu);

-int virDomainVcpupinDel(virDomainDefPtr def, int vcpu);
+int virDomainVcpuPinDel(virDomainDefPtr def, int vcpu);

 int virDomainDiskIndexByName(virDomainDefPtr def, const char *name);
 int virDomainDiskInsert(virDomainDefPtr def,
diff --git a/src/driver.h b/src/driver.h
index c15d0dd..60cd556 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -240,7 +240,7 @@ typedef int
                                          int maplen,
                                          unsigned int flags);
 typedef int
-        (*virDrvDomainGetVcpupinInfo)   (virDomainPtr domain,
+        (*virDrvDomainGetVcpuPinInfo)   (virDomainPtr domain,
                                          int ncpumaps,
                                          unsigned char *cpumaps,
                                          int maplen,
@@ -713,7 +713,7 @@ struct _virDriver {
     virDrvDomainGetVcpusFlags		domainGetVcpusFlags;
     virDrvDomainPinVcpu		domainPinVcpu;
     virDrvDomainPinVcpuFlags    domainPinVcpuFlags;
-    virDrvDomainGetVcpupinInfo  domainGetVcpupinInfo;
+    virDrvDomainGetVcpuPinInfo  domainGetVcpuPinInfo;
     virDrvDomainGetVcpus		domainGetVcpus;
     virDrvDomainGetMaxVcpus		domainGetMaxVcpus;
     virDrvDomainGetSecurityLabel     domainGetSecurityLabel;
diff --git a/src/libvirt.c b/src/libvirt.c
index 46a448b..a3f3267 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -7061,7 +7061,7 @@ error:
  * just live or both live and persistent state is changed.
  * Not all hypervisors can support all flag combinations.
  *
- * See also virDomainGetVcpupinInfo for querying this information.
+ * See also virDomainGetVcpuPinInfo for querying this information.
  *
  * Returns 0 in case of success, -1 in case of failure.
  *
@@ -7112,7 +7112,7 @@ error:
 }

 /**
- * virDomainGetVcpupinInfo:
+ * virDomainGetVcpuPinInfo:
  * @domain: pointer to domain object, or NULL for Domain0
  * @ncpumaps: the number of cpumap (listed first to match virDomainGetVcpus)
  * @cpumaps: pointer to a bit map of real CPUs for all vcpus of this
@@ -7136,7 +7136,7 @@ error:
  * -1 in case of failure.
  */
 int
-virDomainGetVcpupinInfo (virDomainPtr domain, int ncpumaps,
+virDomainGetVcpuPinInfo (virDomainPtr domain, int ncpumaps,
                          unsigned char *cpumaps, int maplen, unsigned int flags)
 {
     virConnectPtr conn;
@@ -7160,9 +7160,9 @@ virDomainGetVcpupinInfo (virDomainPtr domain, int ncpumaps,

     conn = domain->conn;

-    if (conn->driver->domainGetVcpupinInfo) {
+    if (conn->driver->domainGetVcpuPinInfo) {
         int ret;
-        ret = conn->driver->domainGetVcpupinInfo (domain, ncpumaps,
+        ret = conn->driver->domainGetVcpuPinInfo (domain, ncpumaps,
                                                   cpumaps, maplen, flags);
         if (ret < 0)
             goto error;
@@ -7197,7 +7197,7 @@ error:
  * and also in cpumaps if this pointer isn't NULL.  This call may fail
  * on an inactive domain.
  *
- * See also virDomainGetVcpupinInfo for querying just cpumaps, including on
+ * See also virDomainGetVcpuPinInfo for querying just cpumaps, including on
  * an inactive domain.
  *
  * Returns the number of info filled in case of success, -1 in case of failure.
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index afe9835..054c074 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -366,10 +366,10 @@ virDomainTimerTickpolicyTypeFromString;
 virDomainTimerTickpolicyTypeToString;
 virDomainTimerTrackTypeFromString;
 virDomainTimerTrackTypeToString;
-virDomainVcpupinAdd;
-virDomainVcpupinDel;
-virDomainVcpupinFindByVcpu;
-virDomainVcpupinIsDuplicate;
+virDomainVcpuPinAdd;
+virDomainVcpuPinDel;
+virDomainVcpuPinFindByVcpu;
+virDomainVcpuPinIsDuplicate;
 virDomainVideoDefFree;
 virDomainVideoDefaultRAM;
 virDomainVideoDefaultType;
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index c7dc3c5..5f2541a 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -453,7 +453,7 @@ LIBVIRT_0.9.2 {
 LIBVIRT_0.9.3 {
     global:
         virDomainGetControlInfo;
-        virDomainGetVcpupinInfo;
+        virDomainGetVcpuPinInfo;
         virDomainPinVcpuFlags;
         virDomainSendKey;
         virEventAddHandle;
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 5a5951f..7fd257d 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2393,7 +2393,7 @@ libxlDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, unsigned char *cpumap,
         goto cleanup;
     }

-    if (virDomainVcpupinAdd(vm->def, cpumap, maplen, vcpu) < 0) {
+    if (virDomainVcpuPinAdd(vm->def, cpumap, maplen, vcpu) < 0) {
         libxlError(VIR_ERR_INTERNAL_ERROR,
                    "%s", _("failed to update or add vcpupin xml"));
         goto cleanup;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d9099d5..c291e16 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3109,14 +3109,14 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
         }

         if (canResetting) {
-            if (virDomainVcpupinDel(vm->def, vcpu) < 0) {
+            if (virDomainVcpuPinDel(vm->def, vcpu) < 0) {
                 qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                                 _("failed to delete vcpupin xml of "
                                   "a running domain"));
                 goto cleanup;
             }
         } else {
-            if (virDomainVcpupinAdd(vm->def, cpumap, maplen, vcpu) < 0) {
+            if (virDomainVcpuPinAdd(vm->def, cpumap, maplen, vcpu) < 0) {
                 qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                                 _("failed to update or add vcpupin xml of "
                                   "a running domain"));
@@ -3129,14 +3129,14 @@ qemudDomainPinVcpuFlags(virDomainPtr dom,
     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {

         if (canResetting) {
-            if (virDomainVcpupinDel(persistentDef, vcpu) < 0) {
+            if (virDomainVcpuPinDel(persistentDef, vcpu) < 0) {
                 qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                                 _("failed to delete vcpupin xml of "
                                   "a persistent domain"));
                 goto cleanup;
             }
         } else {
-            if (virDomainVcpupinAdd(persistentDef, cpumap, maplen, vcpu) < 0) {
+            if (virDomainVcpuPinAdd(persistentDef, cpumap, maplen, vcpu) < 0) {
                 qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                                 _("failed to update or add vcpupin xml of "
                                   "a persistent domain"));
@@ -3166,7 +3166,7 @@ qemudDomainPinVcpu(virDomainPtr dom,
 }

 static int
-qemudDomainGetVcpupinInfo(virDomainPtr dom,
+qemudDomainGetVcpuPinInfo(virDomainPtr dom,
                           int ncpumaps,
                           unsigned char *cpumaps,
                           int maplen,
@@ -3180,7 +3180,7 @@ qemudDomainGetVcpupinInfo(virDomainPtr dom,
     bool isActive;
     int maxcpu, hostcpus, vcpu, pcpu;
     int n;
-    virDomainVcpupinDefPtr *vcpupin_list;
+    virDomainVcpuPinDefPtr *vcpupin_list;
     char *cpumask = NULL;
     unsigned char *cpumap;

@@ -8446,7 +8446,7 @@ static virDriver qemuDriver = {
     .domainGetVcpusFlags = qemudDomainGetVcpusFlags, /* 0.8.5 */
     .domainPinVcpu = qemudDomainPinVcpu, /* 0.4.4 */
     .domainPinVcpuFlags = qemudDomainPinVcpuFlags, /* 0.9.3 */
-    .domainGetVcpupinInfo = qemudDomainGetVcpupinInfo, /* 0.9.3 */
+    .domainGetVcpuPinInfo = qemudDomainGetVcpuPinInfo, /* 0.9.3 */
     .domainGetVcpus = qemudDomainGetVcpus, /* 0.4.4 */
     .domainGetMaxVcpus = qemudDomainGetMaxVcpus, /* 0.4.4 */
     .domainGetSecurityLabel = qemudDomainGetSecurityLabel, /* 0.6.1 */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 84a5eab..ac00128 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2142,7 +2142,7 @@ done:
 }

 static int
-remoteDomainGetVcpupinInfo (virDomainPtr domain,
+remoteDomainGetVcpuPinInfo (virDomainPtr domain,
                             int ncpumaps,
                             unsigned char *cpumaps,
                             int maplen,
@@ -2150,8 +2150,8 @@ remoteDomainGetVcpupinInfo (virDomainPtr domain,
 {
     int rv = -1;
     int i;
-    remote_domain_get_vcpupin_info_args args;
-    remote_domain_get_vcpupin_info_ret ret;
+    remote_domain_get_vcpu_pin_info_args args;
+    remote_domain_get_vcpu_pin_info_ret ret;
     struct private_data *priv = domain->conn->privateData;

     remoteDriverLock(priv);
@@ -2178,10 +2178,10 @@ remoteDomainGetVcpupinInfo (virDomainPtr domain,

     memset (&ret, 0, sizeof ret);

-    if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_VCPUPIN_INFO,
-              (xdrproc_t) xdr_remote_domain_get_vcpupin_info_args,
+    if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO,
+              (xdrproc_t) xdr_remote_domain_get_vcpu_pin_info_args,
               (char *) &args,
-              (xdrproc_t) xdr_remote_domain_get_vcpupin_info_ret,
+              (xdrproc_t) xdr_remote_domain_get_vcpu_pin_info_ret,
               (char *) &ret) == -1)
         goto done;

@@ -2207,7 +2207,7 @@ remoteDomainGetVcpupinInfo (virDomainPtr domain,
     rv = ret.num;

 cleanup:
-    xdr_free ((xdrproc_t) xdr_remote_domain_get_vcpupin_info_ret, (char *) &ret);
+    xdr_free ((xdrproc_t) xdr_remote_domain_get_vcpu_pin_info_ret, (char *) &ret);

 done:
     remoteDriverUnlock(priv);
@@ -6465,7 +6465,7 @@ static virDriver remote_driver = {
     .domainGetVcpusFlags = remoteDomainGetVcpusFlags, /* 0.8.5 */
     .domainPinVcpu = remoteDomainPinVcpu, /* 0.3.0 */
     .domainPinVcpuFlags = remoteDomainPinVcpuFlags, /* 0.9.3 */
-    .domainGetVcpupinInfo = remoteDomainGetVcpupinInfo, /* 0.9.3 */
+    .domainGetVcpuPinInfo = remoteDomainGetVcpuPinInfo, /* 0.9.3 */
     .domainGetVcpus = remoteDomainGetVcpus, /* 0.3.0 */
     .domainGetMaxVcpus = remoteDomainGetMaxVcpus, /* 0.3.0 */
     .domainGetSecurityLabel = remoteDomainGetSecurityLabel, /* 0.6.1 */
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index ee08b82..65a4432 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -903,14 +903,14 @@ struct remote_domain_pin_vcpu_flags_args {
     unsigned int flags;
 };

-struct remote_domain_get_vcpupin_info_args {
+struct remote_domain_get_vcpu_pin_info_args {
     remote_nonnull_domain dom;
     int ncpumaps;
     int maplen;
     unsigned int flags;
 };

-struct remote_domain_get_vcpupin_info_ret {
+struct remote_domain_get_vcpu_pin_info_ret {
     opaque cpumaps<REMOTE_CPUMAPS_MAX>;
     int num;
 };
@@ -2392,7 +2392,7 @@ enum remote_procedure {
     REMOTE_PROC_NODE_GET_CPU_STATS = 227, /* skipgen skipgen */
     REMOTE_PROC_NODE_GET_MEMORY_STATS = 228, /* skipgen skipgen */
     REMOTE_PROC_DOMAIN_GET_CONTROL_INFO = 229, /* autogen autogen */
-    REMOTE_PROC_DOMAIN_GET_VCPUPIN_INFO = 230  /* skipgen skipgen */
+    REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO = 230  /* skipgen skipgen */

     /*
      * Notice how the entries are grouped in sets of 10 ?
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index be98135..c07ba81 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -580,13 +580,13 @@ struct remote_domain_pin_vcpu_flags_args {
         } cpumap;
         u_int                      flags;
 };
-struct remote_domain_get_vcpupin_info_args {
+struct remote_domain_get_vcpu_pin_info_args {
         remote_nonnull_domain      dom;
         int                        ncpumaps;
         int                        maplen;
         u_int                      flags;
 };
-struct remote_domain_get_vcpupin_info_ret {
+struct remote_domain_get_vcpu_pin_info_ret {
         struct {
                 u_int              cpumaps_len;
                 char *             cpumaps_val;
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index f94dd8b..d418847 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -2332,7 +2332,7 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
         goto cleanup;

     if (ret == 0) {
-        if (virDomainVcpupinAdd(def, cpumap, maplen, vcpu) < 0) {
+        if (virDomainVcpuPinAdd(def, cpumap, maplen, vcpu) < 0) {
             virXendError(VIR_ERR_INTERNAL_ERROR,
                          "%s", _("failed to add vcpupin xml entry"));
             return (-1);
diff --git a/tools/virsh.c b/tools/virsh.c
index 31fbeb7..8e6439f 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2962,11 +2962,11 @@ cmdVcpuinfo(vshControl *ctl, const vshCmd *cmd)
         }
     } else {
         if (info.state == VIR_DOMAIN_SHUTOFF &&
-            (ncpus = virDomainGetVcpupinInfo(dom, info.nrVirtCpu,
+            (ncpus = virDomainGetVcpuPinInfo(dom, info.nrVirtCpu,
                                              cpumaps, cpumaplen,
                                              VIR_DOMAIN_AFFECT_CONFIG)) >= 0) {

-            /* fallback plan to use virDomainGetVcpupinInfo */
+            /* fallback plan to use virDomainGetVcpuPinInfo */

             for (n = 0; n < ncpus; n++) {
                 vshPrint(ctl, "%-15s %d\n", _("VCPU:"), n);
@@ -3015,7 +3015,7 @@ static const vshCmdOptDef opts_vcpupin[] = {
 };

 static bool
-cmdVcpupin(vshControl *ctl, const vshCmd *cmd)
+cmdVcpuPin(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainInfo info;
     virDomainPtr dom;
@@ -3101,7 +3101,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd *cmd)
             flags = VIR_DOMAIN_AFFECT_CURRENT;

         cpumaps = vshMalloc(ctl, info.nrVirtCpu * cpumaplen);
-        if ((ncpus = virDomainGetVcpupinInfo(dom, info.nrVirtCpu,
+        if ((ncpus = virDomainGetVcpuPinInfo(dom, info.nrVirtCpu,
                                              cpumaps, cpumaplen, flags)) >= 0) {

             vshPrint(ctl, "%s %s\n", _("VCPU:"), _("CPU Affinity"));
@@ -11674,7 +11674,7 @@ static const vshCmdDef domManagementCmds[] = {
      info_update_device, 0},
     {"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0},
     {"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0},
-    {"vcpupin", cmdVcpupin, opts_vcpupin, info_vcpupin, 0},
+    {"vcpupin", cmdVcpuPin, opts_vcpupin, info_vcpupin, 0},
     {"version", cmdVersion, opts_version, info_version, 0},
     {"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0},
     {NULL, NULL, NULL, NULL, 0}
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]