mirror of https://gitee.com/openkylin/libvirt.git
virStorageFileGetMetadataFromFD: Remove unused 'backingFormat' argument
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
57df35aead
commit
c95656c995
|
@ -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) {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue