[lxc-devel] [lxc/master] Remove trailing newlines in log

stgraber on Github lxc-bot at linuxcontainers.org
Tue Mar 8 15:31:38 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/1083ca2a/attachment.bin>
-------------- next part --------------
From 1c9da8dac499d63979d6e8d51feb2524a4b4f833 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 8 Mar 2016 09:50:53 -0500
Subject: [PATCH] Remove trailing newlines in log
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/cgfsng.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lxc/cgfsng.c b/src/lxc/cgfsng.c
index aaa03b5..0622a81 100644
--- a/src/lxc/cgfsng.c
+++ b/src/lxc/cgfsng.c
@@ -830,7 +830,7 @@ static int cgroup_rmdir(char *dirname)
 
 		if (lstat(pathname, &mystat)) {
 			if (!r)
-				WARN("failed to stat %s\n", pathname);
+				WARN("failed to stat %s", pathname);
 			r = -1;
 			goto next;
 		}
@@ -880,7 +880,7 @@ void recursive_destroy(char *path, struct lxc_conf *conf)
 		r = cgroup_rmdir(path);
 
 	if (r < 0)
-		ERROR("Error destroying %s\n", path);
+		ERROR("Error destroying %s", path);
 }
 
 static void cgfsng_destroy(void *hdata, struct lxc_conf *conf)
@@ -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\n", fullpath);
+			ERROR("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\n", fullpath);
+			ERROR("Failed to enter %s", fullpath);
 			free(fullpath);
 			return false;
 		}
@@ -1385,7 +1385,7 @@ static bool cgfsng_setup_limits(void *hdata, struct lxc_list *cgroup_settings,
 	if (do_devices) {
 		h = get_hierarchy(d, "devices");
 		if (!h) {
-			ERROR("No devices cgroup setup for %s\n", d->name);
+			ERROR("No devices cgroup setup for %s", d->name);
 			return false;
 		}
 		listpath = must_make_path(h->fullcgpath, "devices.list", NULL);


More information about the lxc-devel mailing list