]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: Remove unused 'virStorageFileParseChainIndex'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 25 Jan 2021 14:25:28 +0000 (15:25 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 27 Jan 2021 06:49:58 +0000 (07:49 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/libvirt_private.syms
src/util/virstoragefile.c
src/util/virstoragefile.h

index 0a2a54dfdf14614e7e5f64bad7ebc9a32fd4981e..4b6fca63d4c14d024e171131306e513a5fc26484 100644 (file)
@@ -3217,7 +3217,6 @@ virStorageFileCanonicalizePath;
 virStorageFileGetNPIVKey;
 virStorageFileGetSCSIKey;
 virStorageFileParseBackingStoreStr;
-virStorageFileParseChainIndex;
 
 
 # util/virstring.h
index d1e56db7086a89b2e0094a15e69548b69137cf99..9df891b57c043e852b5f62d24becfa27704e3bf7 100644 (file)
@@ -216,38 +216,6 @@ virStorageFileParseBackingStoreStr(const char *str,
 }
 
 
-int
-virStorageFileParseChainIndex(const char *diskTarget,
-                              const char *name,
-                              unsigned int *chainIndex)
-{
-    unsigned int idx = 0;
-    g_autofree char *target = NULL;
-
-    *chainIndex = 0;
-
-    if (!name || !diskTarget)
-        return 0;
-
-    if (virStorageFileParseBackingStoreStr(name, &target, &idx) < 0)
-        return 0;
-
-    if (idx == 0)
-        return 0;
-
-    if (STRNEQ(diskTarget, target)) {
-        virReportError(VIR_ERR_INVALID_ARG,
-                       _("requested target '%s' does not match target '%s'"),
-                       target, diskTarget);
-        return -1;
-    }
-
-    *chainIndex = idx;
-
-    return 0;
-}
-
-
 static char *
 virStorageFileCanonicalizeFormatPath(char **components,
                                      size_t ncomponents,
index 455a978a8df1ed5ee7413bf18bd6838efb79efa7..6b198858cc9d38b8d78d23eb6f9350d627340ffa 100644 (file)
 
 #include "internal.h"
 
-int virStorageFileParseChainIndex(const char *diskTarget,
-                                  const char *name,
-                                  unsigned int *chainIndex)
-    ATTRIBUTE_NONNULL(3);
-
 int virStorageFileParseBackingStoreStr(const char *str,
                                        char **target,
                                        unsigned int *chainIndex)