From patchwork Thu Jun 23 00:12:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 70705 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp167626qgy; Wed, 22 Jun 2016 17:15:24 -0700 (PDT) X-Received: by 10.200.53.39 with SMTP id y36mr40085540qtb.92.1466640924682; Wed, 22 Jun 2016 17:15:24 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id u63si2781710qkh.176.2016.06.22.17.15.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 22 Jun 2016 17:15:24 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5N0CgDp016274; Wed, 22 Jun 2016 20:12:42 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5N0CLqi003811 for ; Wed, 22 Jun 2016 20:12:21 -0400 Received: from colepc.redhat.com (ovpn-116-65.rdu2.redhat.com [10.10.116.65]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5N0CHC5010243; Wed, 22 Jun 2016 20:12:21 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 22 Jun 2016 20:12:14 -0400 Message-Id: <9684351cab4b67d194cdbdd893bc11a31fb24b51.1466640165.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/6] storage: delete: Don't unlink stateFile X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com 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(-) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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"));