From: Peter Krempa <[email protected]>

All uses were replaced by 'qemuDomainStorageSourceProbeSize'.

Signed-off-by: Peter Krempa <[email protected]>
---
 src/qemu/qemu_domain.c | 38 --------------------------------------
 src/qemu/qemu_domain.h |  4 ----
 2 files changed, 42 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 1792b0e9d0..40b59a4f31 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11622,44 +11622,6 @@ qemuDomainStorageCloseStat(virStorageSource *src,
 }


-/**
- * qemuDomainStorageUpdatePhysical:
- * @cfg: qemu driver configuration object
- * @vm: domain object
- * @src: storage source to update
- *
- * Update the physical size of the disk by reading the actual size of the image
- * on disk.
- *
- * Returns 0 on successful update and -1 otherwise (some uncommon errors may be
- * reported but are reset (thus only logged)).
- */
-int
-qemuDomainStorageUpdatePhysical(virQEMUDriverConfig *cfg,
-                                virDomainObj *vm,
-                                virStorageSource *src)
-{
-    int ret;
-    int fd = -1;
-    struct stat sb;
-
-    if (virStorageSourceIsEmpty(src))
-        return 0;
-
-    if ((ret = qemuDomainStorageOpenStat(cfg, vm, src, &fd, &sb, true)) <= 0) {
-        if (ret < 0)
-            virResetLastError();
-        return -1;
-    }
-
-    ret = virStorageSourceGetSize(src, fd, &sb, NULL, &src->physical);
-
-    qemuDomainStorageCloseStat(src, &fd);
-
-    return ret;
-}
-
-
 /**
  * qemuDomainStorageSourceProbeSize:
  * @cfg: qemu driver configuration object
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 9bb8d0f97d..ec1c2a4779 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -1172,10 +1172,6 @@ qemuDomainStorageOpenStat(virQEMUDriverConfig *cfg,
 void
 qemuDomainStorageCloseStat(virStorageSource *src,
                            int *fd);
-int
-qemuDomainStorageUpdatePhysical(virQEMUDriverConfig *cfg,
-                                virDomainObj *vm,
-                                virStorageSource *src);

 int
 qemuDomainStorageSourceProbeSize(virQEMUDriverConfig *cfg,
-- 
2.54.0

Reply via email to