2019-12-25 15:57:42 +08:00
|
|
|
From 273a33174a35d31b7d56f99a9ce2a958d1ef3b17 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 11:25:45 +0800
|
2019-12-25 15:57:42 +08:00
|
|
|
Subject: [PATCH 051/131] if ocihook is empty
|
2019-09-30 11:03:07 -04:00
|
|
|
|
|
|
|
|
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
|
2019-12-25 15:57:42 +08:00
|
|
|
index 48e31aff..6ea8f9c1 100644
|
2019-09-30 11:03:07 -04:00
|
|
|
--- 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) {
|
|
|
|
|
--
|
2019-12-25 15:57:42 +08:00
|
|
|
2.23.0
|
2019-09-30 11:03:07 -04:00
|
|
|
|