]>
Commit | Line | Data |
---|---|---|
080abced WB |
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 | |
87c39e90 | 4 | Subject: [PATCH lxc] confile: coding style fixes for |
080abced WB |
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 | |
87c39e90 | 13 | index 23ed7837c..c7e7887f3 100644 |
080abced WB |
14 | --- a/src/lxc/confile.c |
15 | +++ b/src/lxc/confile.c | |
87c39e90 | 16 | @@ -1873,19 +1873,14 @@ static int set_config_cgroup_container_inner_dir(const char *key, |
080abced WB |
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, |