From 17b92fa542417538c2f95f233aabb182d43f8472 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 Oct 2015 09:19:48 -0700 Subject: [PATCH] Append newline when using pr_err() Signed-off-by: Kir Kolyshkin Acked-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- 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 75831f6f1..4842d9d6d 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 0d9ec5844..ea5bd54a1 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 f5fe1517d..40613b5e8 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 6f50445b6..7d0690c72 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 e9b5870f7..84737427f 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 a708383bb..c6b97257b 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 5e1db1f4d..23829a03f 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 c4584657f..f764ae7d3 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 965c7cbc4..ac4664be8 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 059896b7a..33f617cf7 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 fcdd54544..21f5e47f5 100644 --- a/sk-unix.c +++ b/sk-unix.c @@ -1051,7 +1051,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 b4d5d5a70..fdd885c80 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; }