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

32 lines
793 B
Diff
Raw Normal View History

2019-12-25 15:57:42 +08:00
From 814e6298692f74480fcd807eedc1588b94b3f961 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
2019-12-25 15:57:42 +08:00
Subject: [PATCH 053/131] 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
2019-12-25 15:57:42 +08:00
index c8fb9931..24e975bc 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;
}
--
2019-12-25 15:57:42 +08:00
2.23.0
2019-09-30 11:03:07 -04:00