[1/5] log: add line breaks to pr_warn

Submitted by Pavel Tikhomirov on Sept. 11, 2018, 8:09 a.m.

Details

Message ID 20180911080906.4555-2-ptikhomirov@virtuozzo.com
State Accepted
Series "minor fixes related to paths and logs"
Headers show

Commit Message

Pavel Tikhomirov Sept. 11, 2018, 8:09 a.m.
for i in $(find . -name "*.[ch]" -type f); do
	sed -i 's/\(pr_warn(".*[^n]\)\("[),]\)/\1\\n\2/' $i
done

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 compel/src/lib/infect.c | 2 +-
 criu/cr-restore.c       | 2 +-
 criu/crtools.c          | 2 +-
 criu/files-reg.c        | 2 +-
 criu/namespaces.c       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index 8ff05d6ea..abf3a0ab3 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -137,7 +137,7 @@  int compel_interrupt_task(int pid)
 	 */
 	ret = ptrace(PTRACE_INTERRUPT, pid, NULL, NULL);
 	if (ret < 0) {
-		pr_warn("SEIZE %d: can't interrupt task: %s", pid, strerror(errno));
+		pr_warn("SEIZE %d: can't interrupt task: %s\n", pid, strerror(errno));
 		if (ptrace(PTRACE_DETACH, pid, NULL, NULL))
 			pr_perror("Unable to detach from %d", pid);
 	}
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 4f8fc9179..6f22fb787 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2290,7 +2290,7 @@  static int restore_root_task(struct pstree_item *init)
 			kill(root_item->pid->real, SIGKILL);
 
 		if (waitpid(root_item->pid->real, &status, 0) < 0)
-			pr_warn("Unable to wait %d: %s",
+			pr_warn("Unable to wait %d: %s\n",
 				root_item->pid->real, strerror(errno));
 	} else {
 		struct pstree_item *pi;
diff --git a/criu/crtools.c b/criu/crtools.c
index aaddf83d8..eb5ff9b86 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -236,7 +236,7 @@  int main(int argc, char *argv[], char *envp[])
 			opts.restore_detach &&
 			opts.final_state == TASK_STOPPED &&
 			opts.shell_job)
-		pr_warn("Stopped and detached shell job will get SIGHUP from OS.");
+		pr_warn("Stopped and detached shell job will get SIGHUP from OS.\n");
 
 	if (chdir(opts.work_dir)) {
 		pr_perror("Can't change directory to %s", opts.work_dir);
diff --git a/criu/files-reg.c b/criu/files-reg.c
index 27afe2e53..c7fd7f35f 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -1396,7 +1396,7 @@  static int linkat_hard(int odir, char *opath, int ndir, char *npath, uid_t uid,
 
 	if (!( (errno == EPERM || errno == EOVERFLOW) && (root_ns_mask & CLONE_NEWUSER) )) {
 		errno_save = errno;
-		pr_warn("Can't link %s -> %s", opath, npath);
+		pr_warn("Can't link %s -> %s\n", opath, npath);
 		errno = errno_save;
 		return ret;
 	}
diff --git a/criu/namespaces.c b/criu/namespaces.c
index f58f310ad..e8908e8ff 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -52,7 +52,7 @@  int check_namespace_opts(void)
 		return -1;
 	}
 	if (join_ns_flags & CLONE_NEWUSER)
-		pr_warn("join-ns with user-namespace is not fully tested and dangerous");
+		pr_warn("join-ns with user-namespace is not fully tested and dangerous\n");
 
 	errno = 0;
 	return 0;