From 6fe93aa1877359365a07d9110e0e2dbfb3b0205f Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Fri, 16 Aug 2013 13:34:36 -0500 Subject: [PATCH] cgroup.c: remove spurious ERROR messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Because they are in probing functions. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- src/lxc/cgroup.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index 78083e8c9..d2737eaec 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -198,11 +198,8 @@ char *lxc_cgroup_path_get(const char *subsystem, const char *name, pid_t initpid = lxc_cmd_get_init_pid(name, lxcpath); int ret; - if (initpid < 0) { - ERROR("Error getting init pid for container %s:%s", - lxcpath, name); + if (initpid < 0) return NULL; - } cgpath = lxc_cmd_get_cgroup_path(name, lxcpath, subsystem); if (!cgpath) @@ -307,10 +304,8 @@ static bool cgroup_devices_has_deny(struct lxc_handler *h, char *v) return -1; } - if (!(f = fopen(path, "r"))) { - SYSERROR("Error opening devices.list"); + if (!(f = fopen(path, "r"))) return -1; - } while (getline(&line, &len, f) != -1) { size_t len = strlen(line); @@ -347,10 +342,8 @@ static bool cgroup_devices_has_allow(struct lxc_handler *h, char *v) return -1; } - if (!(f = fopen(path, "r"))) { - SYSERROR("Error opening devices.list"); + if (!(f = fopen(path, "r"))) return -1; - } while (getline(&line, &len, f) != -1) { size_t len = strlen(line); -- 2.47.2