[lxc-devel] [lxc/master] cgfsng: enter/escape error msgs: differentiate and add errno

hallyn on Github lxc-bot at linuxcontainers.org
Tue Mar 8 17:03:36 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 353 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160308/8d978d3d/attachment.bin>
-------------- next part --------------
From d3b00a8f48a33877a06254924a03f93279a31de4 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge.hallyn at ubuntu.com>
Date: Tue, 8 Mar 2016 09:02:52 -0800
Subject: [PATCH] cgfsng: enter/escape error msgs: differentiate and add errno

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/lxc/cgfsng.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lxc/cgfsng.c b/src/lxc/cgfsng.c
index 0622a81..4b2d987 100644
--- a/src/lxc/cgfsng.c
+++ b/src/lxc/cgfsng.c
@@ -672,7 +672,7 @@ static bool parse_hierarchies(struct cgfsng_handler_data *d)
 		return false;
 
 	if ((f = fopen("/proc/self/mountinfo", "r")) == NULL) {
-		ERROR("Failed opening /proc/self/mountinfo");
+		SYSERROR("Failed opening /proc/self/mountinfo");
 		return false;
 	}
 
@@ -1009,7 +1009,7 @@ static bool cgfsng_enter(void *hdata, pid_t pid)
 		char *fullpath = must_make_path(d->hierarchies[i]->fullcgpath,
 						"cgroup.procs", NULL);
 		if (lxc_write_to_file(fullpath, pidstr, len, false) != 0) {
-			ERROR("Failed to enter %s", fullpath);
+			SYSERROR("Failed to enter %s", fullpath);
 			free(fullpath);
 			return false;
 		}
@@ -1178,7 +1178,7 @@ static bool cgfsng_escape(void *hdata)
 						d->hierarchies[i]->base_cgroup,
 						"cgroup.procs", NULL);
 		if (lxc_write_to_file(fullpath, "0", 2, false) != 0) {
-			ERROR("Failed to enter %s", fullpath);
+			SYSERROR("Failed to escape to %s", fullpath);
 			free(fullpath);
 			return false;
 		}


More information about the lxc-devel mailing list