lxc/0053-destroy-empty-cgroup-path-return-ture.patch

32 lines
792 B
Diff
Raw Normal View History

From 930e729ff7705532bf0248ec0c35017dbd8fbd9c Mon Sep 17 00:00:00 2001
2019-09-30 11:03:07 -04:00
From: liuhao <liuhao27@huawei.com>
Date: Tue, 22 Jan 2019 14:45:54 +0800
Subject: [PATCH 053/139] destroy empty cgroup path return ture
2019-09-30 11:03:07 -04:00
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
2019-09-30 11:03:07 -04:00
--- 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
2019-09-30 11:03:07 -04:00