Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/storage/storage_util.c | 3 +--
src/util/virstoragefile.c | 12 +-----------
src/util/virstoragefile.h | 3 +--
3 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index f71abbd729..8e43c7868d 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -3358,8 +3358,7 @@ storageBackendProbeTarget(virStorageSourcePtr target,
if (!(meta = virStorageFileGetMetadataFromFD(target->path,
fd,
- VIR_STORAGE_FILE_AUTO,
- NULL)))
+ VIR_STORAGE_FILE_AUTO)))
return -1;
if (meta->backingStoreRaw) {
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 94805e8741..d5ac5970f1 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1161,21 +1161,14 @@ virStorageFileGetMetadataFromBuf(const char *path,
virStorageSourcePtr
virStorageFileGetMetadataFromFD(const char *path,
int fd,
- int format,
- int *backingFormat)
+ int format)
{
ssize_t len = VIR_STORAGE_MAX_HEADER;
struct stat sb;
- int dummy;
g_autofree char *buf = NULL;
g_autoptr(virStorageSource) meta = NULL;
- if (!backingFormat)
- backingFormat = &dummy;
-
- *backingFormat = VIR_STORAGE_FILE_NONE;
-
if (fstat(fd, &sb) < 0) {
virReportSystemError(errno,
_("cannot stat file '%s'"), path);
@@ -1206,9 +1199,6 @@ virStorageFileGetMetadataFromFD(const char *path,
if (virStorageFileGetMetadataInternal(meta, buf, len) < 0)
return NULL;
- if (backingFormat)
- *backingFormat = meta->backingStoreRawFormat;
-
if (S_ISREG(sb.st_mode))
meta->type = VIR_STORAGE_TYPE_FILE;
else if (S_ISBLK(sb.st_mode))
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 32f2c82147..5b995d54ab 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -381,8 +381,7 @@ int virStorageFileProbeFormat(const char *path, uid_t uid, gid_t
gid);
virStorageSourcePtr virStorageFileGetMetadataFromFD(const char *path,
int fd,
- int format,
- int *backingFormat);
+ int format);
virStorageSourcePtr virStorageFileGetMetadataFromBuf(const char *path,
char *buf,
size_t len,
--
2.24.1