mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
util: Remove unused 'virStorageFileParseChainIndex'
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
ab82d41f41
commit
225c568378
@ -3217,7 +3217,6 @@ virStorageFileCanonicalizePath;
|
||||
virStorageFileGetNPIVKey;
|
||||
virStorageFileGetSCSIKey;
|
||||
virStorageFileParseBackingStoreStr;
|
||||
virStorageFileParseChainIndex;
|
||||
|
||||
|
||||
# util/virstring.h
|
||||
|
@ -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,
|
||||
|
@ -23,11 +23,6 @@
|
||||
|
||||
#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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user