[PATCH 4/6] storage: delete: Don't unlink stateFile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PoolDelete only works on an inactive VM, which shouldn't have a
stateFile on disk, so this isn't the place to attempt to remove it.
---
 src/storage/storage_driver.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 45f00e0..9e97f62 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1133,7 +1133,6 @@ storagePoolDelete(virStoragePoolPtr obj,
 {
     virStoragePoolObjPtr pool;
     virStorageBackendPtr backend;
-    char *stateFile = NULL;
     int ret = -1;
 
     if (!(pool = virStoragePoolObjFromStoragePool(obj)))
@@ -1161,14 +1160,6 @@ storagePoolDelete(virStoragePoolPtr obj,
         goto cleanup;
     }
 
-    if (!(stateFile = virFileBuildPath(driver->stateDir,
-                                       pool->def->name,
-                                       ".xml")))
-        goto cleanup;
-
-    unlink(stateFile);
-    VIR_FREE(stateFile);
-
     if (!backend->deletePool) {
         virReportError(VIR_ERR_NO_SUPPORT,
                        "%s", _("pool does not support pool deletion"));
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]