lxc/0053-destroy-empty-cgroup-path-return-ture.patch
LiFeng c1c967d9bc lxc: make lxc-libs package
Signed-off-by: LiFeng <lifeng68@huawei.com>
2020-02-14 06:13:22 -05:00

32 lines
792 B
Diff

From 930e729ff7705532bf0248ec0c35017dbd8fbd9c Mon Sep 17 00:00:00 2001
From: liuhao <liuhao27@huawei.com>
Date: Tue, 22 Jan 2019 14:45:54 +0800
Subject: [PATCH 053/139] destroy empty cgroup path return ture
destroy empty cgroup path return ture
Signed-off-by: liuhao <liuhao27@huawei.com>
Signed-off-by: LiFeng <lifeng68@huawei.com>
---
src/lxc/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lxc/utils.c b/src/lxc/utils.c
index c8fb993..24e975b 100644
--- a/src/lxc/utils.c
+++ b/src/lxc/utils.c
@@ -1776,6 +1776,10 @@ int recursive_destroy(char *dirname)
dir = opendir(dirname);
if (!dir) {
+ if (errno == ENOENT) {
+ WARN("Destroy path: %s do not exist");
+ return 0;
+ }
SYSERROR("Failed to open dir \"%s\"", dirname);
return -1;
}
--
1.8.3.1