lxc/0051-if-ocihook-is-empty.patch
2019-09-30 11:03:07 -04:00

35 lines
830 B
Diff

From 4fc938241a649307d87700e90dc380651da4c550 Mon Sep 17 00:00:00 2001
From: liuhao <liuhao27@huawei.com>
Date: Tue, 22 Jan 2019 11:25:45 +0800
Subject: [PATCH 051/122] if ocihook is empty
return success
Signed-off-by: liuhao <liuhao27@huawei.com>
Signed-off-by: LiFeng <lifeng68@huawei.com>
---
src/lxc/conf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 48e31af..6ea8f9c 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -4782,9 +4782,12 @@ static int run_oci_hooks(const char *name, const char *lxcpath, struct lxc_conf
int ret = 0;
char *rootpath;
- if (!lc || !lc->ocihooks) {
+ if (!lc) {
return -1;
}
+ if (!lc->ocihooks) {
+ return 0;
+ }
rootpath = get_root_path(lc->rootfs.path, lc->rootfs.bdev_type);
if (!rootpath) {
--
1.8.3.1