[CRIU] [PATCH 2/7] Append newline when using pr_err()

Kir Kolyshkin kir at openvz.org
Wed Oct 7 09:19:48 PDT 2015


Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 cr-check.c       | 2 +-
 fsnotify.c       | 2 +-
 mount.c          | 4 ++--
 namespaces.c     | 2 +-
 net.c            | 2 +-
 pie/piegen/elf.c | 2 +-
 pie/restorer.c   | 4 ++--
 plugin.c         | 2 +-
 proc_parse.c     | 4 ++--
 seize.c          | 2 +-
 sk-unix.c        | 2 +-
 util.c           | 2 +-
 12 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/cr-check.c b/cr-check.c
index 75831f6..4842d9d 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -678,7 +678,7 @@ static int check_aio_remap(void)
 	int r;
 
 	if (sys_io_setup(16, &ctx) < 0) {
-		pr_err("No AIO syscall");
+		pr_err("No AIO syscall\n");
 		return -1;
 	}
 
diff --git a/fsnotify.c b/fsnotify.c
index 0d9ec58..ea5bd54 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -491,7 +491,7 @@ static int restore_one_inotify(int inotify_fd, struct fsnotify_mark_info *info)
 			ret = 0;
 			break;
 		} else if (wd > iwe->wd) {
-			pr_err("Unsorted watch 0x%x found for 0x%x with 0x%x", wd, inotify_fd, iwe->wd);
+			pr_err("Unsorted watch 0x%x found for 0x%x with 0x%x\n", wd, inotify_fd, iwe->wd);
 			break;
 		}
 
diff --git a/mount.c b/mount.c
index 00ce231..7f53b67 100644
--- a/mount.c
+++ b/mount.c
@@ -346,7 +346,7 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list, bool inser
 				if (!mounts_equal(root, m, true) ||
 				    strcmp(root->root, m->root)) {
 					pr_err("Nested mount namespaces with different "
-					       "roots %d (@%s %s) %d (@%s %s) are not supported yet",
+					       "roots %d (@%s %s) %d (@%s %s) are not supported yet\n",
 					       root->mnt_id, root->mountpoint, root->root,
 					       m->mnt_id, m->mountpoint, m->root);
 					return NULL;
@@ -816,7 +816,7 @@ static struct ns_id *find_ext_ns_id(void)
 			return ns;
 		}
 
-	pr_err("Failed to find criu pid's mount ns!");
+	pr_err("Failed to find criu pid's mount ns\n");
 	return NULL;
 }
 
diff --git a/namespaces.c b/namespaces.c
index 6f50445..7d0690c 100644
--- a/namespaces.c
+++ b/namespaces.c
@@ -740,7 +740,7 @@ static int do_dump_namespaces(struct ns_id *ns)
 		ret = dump_net_ns(ns->id);
 		break;
 	default:
-		pr_err("Unknown namespace flag %x", ns->nd->cflag);
+		pr_err("Unknown namespace flag %x\n", ns->nd->cflag);
 		break;
 	}
 
diff --git a/net.c b/net.c
index e9b5870..8473742 100644
--- a/net.c
+++ b/net.c
@@ -498,7 +498,7 @@ static int restore_links(int pid, NetnsEntry **netns)
 
 		ret = restore_link(nde, nlsk);
 		if (ret) {
-			pr_err("can not restore link");
+			pr_err("Can't restore link\n");
 			goto exit;
 		}
 
diff --git a/pie/piegen/elf.c b/pie/piegen/elf.c
index a708383..c6b9725 100644
--- a/pie/piegen/elf.c
+++ b/pie/piegen/elf.c
@@ -405,7 +405,7 @@ int handle_elf(void *mem, size_t size)
 					 place, value64);
 				/* check that we are dealing with the addi 2,2 instruction */
 				if (((*(uint32_t*)where) & 0xffff0000) != 0x38420000) {
-					pr_err("Unexpected instruction for R_PPC64_REL16_LO");
+					pr_err("Unexpected instruction for R_PPC64_REL16_LO\n");
 					goto err;
 				}
 				*(uint16_t *)where = value64 & 0xffff;
diff --git a/pie/restorer.c b/pie/restorer.c
index 5e1db1f..23829a0 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -412,7 +412,7 @@ long __export_restore_thread(struct thread_restore_args *args)
 	ksigfillset(&to_block);
 	ret = sys_sigprocmask(SIG_SETMASK, &to_block, NULL, sizeof(k_rtsigset_t));
 	if (ret) {
-		pr_err("Unable to block signals %d", ret);
+		pr_err("Unable to block signals %d\n", ret);
 		goto core_restore_end;
 	}
 
@@ -1217,7 +1217,7 @@ long __export_restore_task(struct task_restore_args *args)
 	ksigfillset(&to_block);
 	ret = sys_sigprocmask(SIG_SETMASK, &to_block, NULL, sizeof(k_rtsigset_t));
 	if (ret) {
-		pr_err("Unable to block signals %ld", ret);
+		pr_err("Unable to block signals %ld\n", ret);
 		goto core_restore_end;
 	}
 
diff --git a/plugin.c b/plugin.c
index c458465..f764ae7 100644
--- a/plugin.c
+++ b/plugin.c
@@ -96,7 +96,7 @@ static int cr_lib_load(int stage, char *path)
 
 	h = dlopen(path, RTLD_LAZY);
 	if (h == NULL) {
-		pr_err("Unable to load %s: %s", path, dlerror());
+		pr_err("Unable to load %s: %s\n", path, dlerror());
 		return -1;
 	}
 
diff --git a/proc_parse.c b/proc_parse.c
index 965c7cb..ac4664b 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -770,7 +770,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
 
 		if (!strncmp(str, "PPid:", 5)) {
 			if (sscanf(str, "PPid:\t%d", &cr->ppid) != 1) {
-				pr_err("Unable to parse: %s", str);
+				pr_err("Unable to parse: %s\n", str);
 				goto err_parse;
 			}
 			done++;
@@ -1683,7 +1683,7 @@ static int parse_file_lock_buf(char *buf, struct file_lock *fl,
 	}
 
 	if (num < 10) {
-		pr_err("Invalid file lock info (%d): %s", num, buf);
+		pr_err("Invalid file lock info (%d): %s\n", num, buf);
 		return -1;
 	}
 
diff --git a/seize.c b/seize.c
index 059896b..33f617c 100644
--- a/seize.c
+++ b/seize.c
@@ -47,7 +47,7 @@ static const char *get_freezer_state(int fd)
 	if (strcmp(path, thawed) == 0)
 		return thawed;
 
-	pr_err("Unknown freezer state: %s", path);
+	pr_err("Unknown freezer state: %s\n", path);
 err:
 	return NULL;
 }
diff --git a/sk-unix.c b/sk-unix.c
index def14fd..a47a663 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -1020,7 +1020,7 @@ static int open_unixsk_pair_slave(struct unix_sk_info *ui)
 
 	sk = recv_fd(fle->fe->fd);
 	if (sk < 0) {
-		pr_err("Can't recv pair slave");
+		pr_err("Can't recv pair slave\n");
 		return -1;
 	}
 	close(fle->fe->fd);
diff --git a/util.c b/util.c
index b4d5d5a..fdd885c 100644
--- a/util.c
+++ b/util.c
@@ -715,7 +715,7 @@ int mkdirpat(int fd, const char *path)
 	char made_path[PATH_MAX], *pos;
 
 	if (strlen(path) >= PATH_MAX) {
-		pr_err("path %s is longer than PATH_MAX", path);
+		pr_err("path %s is longer than PATH_MAX\n", path);
 		return -1;
 	}
 
-- 
2.4.3



More information about the CRIU mailing list