]> git.proxmox.com Git - lxc.git/blob - debian/patches/pve/0004-confile-coding-style-fixes-for-set_config_cgroup_con.patch
import LXC 4.0.9 and update patches
[lxc.git] / debian / patches / pve / 0004-confile-coding-style-fixes-for-set_config_cgroup_con.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Christian Brauner <christian.brauner@ubuntu.com>
3 Date: Fri, 3 Apr 2020 20:10:58 +0200
4 Subject: [PATCH] confile: coding style fixes for
5 set_config_cgroup_container_inner_dir()
6
7 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 ---
9 src/lxc/confile.c | 11 +++--------
10 1 file changed, 3 insertions(+), 8 deletions(-)
11
12 diff --git a/src/lxc/confile.c b/src/lxc/confile.c
13 index daf8ee474..ae6e72c22 100644
14 --- a/src/lxc/confile.c
15 +++ b/src/lxc/confile.c
16 @@ -1828,19 +1828,14 @@ static int set_config_cgroup_container_inner_dir(const char *key,
17 void *data)
18 {
19 if (lxc_config_value_empty(value))
20 - return clr_config_cgroup_container_inner_dir(key, lxc_conf,
21 - NULL);
22 + return clr_config_cgroup_container_inner_dir(key, lxc_conf, NULL);
23
24 if (strchr(value, '/') ||
25 strcmp(value, ".") == 0 ||
26 strcmp(value, "..") == 0)
27 - {
28 - ERROR("lxc.cgroup.dir.container.inner must be a single directory name");
29 - return -1;
30 - }
31 + return log_error_errno(-EINVAL, EINVAL, "lxc.cgroup.dir.container.inner must be a single directory name");
32
33 - return set_config_string_item(&lxc_conf->cgroup_meta.namespace_dir,
34 - value);
35 + return set_config_string_item(&lxc_conf->cgroup_meta.namespace_dir, value);
36 }
37
38 static int set_config_cgroup_relative(const char *key, const char *value,