]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Rename virBitmapDataToString to virBitmapDataFormat
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 23 Aug 2017 07:05:41 +0000 (09:05 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Sat, 18 Nov 2017 09:45:10 +0000 (10:45 +0100)
It is literally only a wrapper around virBitmapNewData() and
virBitmapFormat(), only the naming was wrong since it was introduced.
And because we have virBitmap*String functions where the meaning of
the 'String' is constant, this might confuse someone.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/libvirt_private.syms
src/util/virbitmap.c
src/util/virbitmap.h
tests/virbitmaptest.c
tools/virsh-domain.c
tools/virsh-host.c

index 36f09a24839724d73c2ee5ce6742ea76102a95b5..79ce11b29c81817dcbf66cae18ff69f940807c10 100644 (file)
@@ -1350,7 +1350,7 @@ virBitmapClearBit;
 virBitmapClearBitExpand;
 virBitmapCopy;
 virBitmapCountBits;
-virBitmapDataToString;
+virBitmapDataFormat;
 virBitmapEqual;
 virBitmapFormat;
 virBitmapFree;
index e7d04e8c8b29476c84abd2ecf984c33c6f9341b7..f5700a6424b436895d639ce99055e7178f2d8d4e 100644 (file)
@@ -1046,7 +1046,7 @@ virBitmapCountBits(virBitmapPtr bitmap)
 }
 
 /**
- * virBitmapDataToString:
+ * virBitmapDataFormat:
  * @data: the data
  * @len: length of @data in bytes
  *
@@ -1056,8 +1056,8 @@ virBitmapCountBits(virBitmapPtr bitmap)
  * Returns: a string representation of the data, or NULL on error
  */
 char *
-virBitmapDataToString(const void *data,
-                      int len)
+virBitmapDataFormat(const void *data,
+                    int len)
 {
     virBitmapPtr map = NULL;
     char *ret = NULL;
index 99eb779d7188dd58938aa231a8f8fdf5b4dbd0ec..720b389cfe52515ecaf1d690e4fe4d4430c1d73c 100644 (file)
@@ -136,8 +136,8 @@ ssize_t virBitmapNextClearBit(virBitmapPtr bitmap, ssize_t pos)
 size_t virBitmapCountBits(virBitmapPtr bitmap)
     ATTRIBUTE_NONNULL(1);
 
-char *virBitmapDataToString(const void *data,
-                            int len)
+char *virBitmapDataFormat(const void *data,
+                          int len)
     ATTRIBUTE_NONNULL(1);
 bool virBitmapOverlaps(virBitmapPtr b1,
                        virBitmapPtr b2)
index c24d4a72f70a7d340f746a0fdb5e8d916f401fce..b666065346ee3ddd0c4650d5ec3bde16d24f6bea 100644 (file)
@@ -294,7 +294,7 @@ test4(const void *data ATTRIBUTE_UNUSED)
     return -1;
 }
 
-/* test for virBitmapNewData/ToData/DataToString */
+/* test for virBitmapNewData/ToData/DataFormat */
 static int
 test5(const void *v ATTRIBUTE_UNUSED)
 {
@@ -336,12 +336,12 @@ test5(const void *v ATTRIBUTE_UNUSED)
         data2[4] != 0x04)
         goto error;
 
-    if (!(str = virBitmapDataToString(data, sizeof(data))))
+    if (!(str = virBitmapDataFormat(data, sizeof(data))))
         goto error;
     if (STRNEQ(str, "0,9,34"))
         goto error;
     VIR_FREE(str);
-    if (!(str = virBitmapDataToString(data2, len2)))
+    if (!(str = virBitmapDataFormat(data2, len2)))
         goto error;
     if (STRNEQ(str, "0,2,9,15,34"))
         goto error;
index bf96f2e02f7edf0ce21a859963d1b76ac5cbcdcf..93cb02098b2518dfff2934724feb8dbf11a21240 100644 (file)
@@ -6527,7 +6527,7 @@ virshVcpuinfoPrintAffinity(vshControl *ctl,
 
     vshPrint(ctl, "%-15s ", _("CPU Affinity:"));
     if (pretty) {
-        if (!(str = virBitmapDataToString(cpumap, VIR_CPU_MAPLEN(maxcpu))))
+        if (!(str = virBitmapDataFormat(cpumap, VIR_CPU_MAPLEN(maxcpu))))
             goto cleanup;
         vshPrint(ctl, _("%s (out of %d)"), str, maxcpu);
     } else {
@@ -6781,7 +6781,7 @@ virshPrintPinInfo(vshControl *ctl,
 {
     char *str = NULL;
 
-    if (!(str = virBitmapDataToString(cpumap, cpumaplen)))
+    if (!(str = virBitmapDataFormat(cpumap, cpumaplen)))
         return false;
 
     vshPrint(ctl, "%s", str);
index 5509065fd606aeb8fb93bf35751b2e8f5a1503de..ecaf830e350d3af0762677300dbe73fc1329f548 100644 (file)
@@ -717,7 +717,7 @@ cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
 
     vshPrint(ctl, "%-15s ", _("CPU map:"));
     if (pretty) {
-        char *str = virBitmapDataToString(cpumap, VIR_CPU_MAPLEN(cpunum));
+        char *str = virBitmapDataFormat(cpumap, VIR_CPU_MAPLEN(cpunum));
 
         if (!str)
             goto cleanup;