From: Serge Hallyn Date: Fri, 16 Aug 2013 18:34:36 +0000 (-0500) Subject: cgroup.c: remove spurious ERROR messages X-Git-Tag: lxc-1.0.0.alpha1~1^2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fe93aa1877359365a07d9110e0e2dbfb3b0205f;p=thirdparty%2Flxc.git cgroup.c: remove spurious ERROR messages Because they are in probing functions. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- 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);