提交 22f3ec27 编写于 作者: L Laine Stump 提交者: Daniel Veillard

Eliminate failure to delete empty storage pools

* src/storage/storage_backend_fs.c: virStorageBackendFileSystemDelete
  was incorrectly calling unlink() in an attempt to remove a directory.
  It should be calling rmdir() instead.
上级 a645c8f0
...@@ -693,9 +693,9 @@ virStorageBackendFileSystemDelete(virConnectPtr conn, ...@@ -693,9 +693,9 @@ virStorageBackendFileSystemDelete(virConnectPtr conn,
{ {
/* XXX delete all vols first ? */ /* XXX delete all vols first ? */
if (unlink(pool->def->target.path) < 0) { if (rmdir(pool->def->target.path) < 0) {
virReportSystemError(conn, errno, virReportSystemError(conn, errno,
_("cannot unlink path '%s'"), _("failed to remove pool '%s'"),
pool->def->target.path); pool->def->target.path);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册