[CRIU] [PATCH] criu: Drop redundant newline from pr_perror

Andrey Vagin avagin at openvz.org
Wed Aug 20 03:52:36 PDT 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cgroup.c           | 4 ++--
 cr-restore.c       | 2 +-
 fsnotify.c         | 2 +-
 mount.c            | 4 ++--
 parasite-syscall.c | 2 +-
 pie/util.c         | 4 ++--
 timerfd.c          | 2 +-
 util.c             | 4 ++--
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/cgroup.c b/cgroup.c
index 3c7e48a..9c45be5 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -307,7 +307,7 @@ static int read_cgroup_prop(struct cgroup_prop *property, const char *fullpath)
 	f = fopen(fullpath, "r");
 	if (!f) {
 		property->value = NULL;
-		pr_perror("Failed opening %s\n", fullpath);
+		pr_perror("Failed opening %s", fullpath);
 		return -1;
 	}
 
@@ -329,7 +329,7 @@ static int read_cgroup_prop(struct cgroup_prop *property, const char *fullpath)
 		strcpy(buf, "-1");
 
 	if (strcmp(endptr, "\n")) {
-		pr_perror("Failed parsing %s, with strtoll\n", buf);
+		pr_err("Failed parsing %s, with strtoll\n", buf);
 		return -1;
 	}
 
diff --git a/cr-restore.c b/cr-restore.c
index abbd8d7..0349e3e 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -562,7 +562,7 @@ static int unmap_guard_pages()
 			void *addr = decode_pointer(vma->premmaped_addr);
 
 			if (munmap(addr - PAGE_SIZE, PAGE_SIZE)) {
-				pr_perror("Can't unmap guard page\n");
+				pr_perror("Can't unmap guard page");
 				return -1;
 			}
 		}
diff --git a/fsnotify.c b/fsnotify.c
index 29845c2..7e9d3bd 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -115,7 +115,7 @@ static int open_handle(unsigned int s_dev, unsigned long i_ino,
 
 	mntfd = open_mount(s_dev);
 	if (mntfd < 0) {
-		pr_perror("Mount root for 0x%08x not found\n", s_dev);
+		pr_err("Mount root for 0x%08x not found\n", s_dev);
 		goto out;
 	}
 
diff --git a/mount.c b/mount.c
index 9a147ab..4373e40 100644
--- a/mount.c
+++ b/mount.c
@@ -1299,7 +1299,7 @@ static int restore_ext_mount(struct mount_info *mi)
 	pr_debug("Restoring external bind mount %s\n", mi->mountpoint);
 	ret = cr_plugin_restore_ext_mount(mi->mnt_id, mi->mountpoint, "/", NULL);
 	if (ret)
-		pr_perror("Can't restore ext mount (%d)\n", ret);
+		pr_err("Can't restore ext mount (%d)\n", ret);
 	return ret;
 }
 
@@ -2002,7 +2002,7 @@ int __mntns_get_root_fd(pid_t pid)
 		 */
 		fd = open("/", O_RDONLY | O_DIRECTORY);
 		if (fd < 0) {
-			pr_perror("Can't open root\n");
+			pr_perror("Can't open root");
 			return -1;
 		}
 
diff --git a/parasite-syscall.c b/parasite-syscall.c
index 8c10952..6f56617 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -267,7 +267,7 @@ static int __parasite_send_cmd(int sockfd, struct ctl_msg *m)
 
 	ret = send(sockfd, m, sizeof(*m), 0);
 	if (ret == -1) {
-		pr_perror("Failed to send command %d to daemon\n", m->cmd);
+		pr_perror("Failed to send command %d to daemon", m->cmd);
 		return -1;
 	} else if (ret != sizeof(*m)) {
 		pr_err("Message to daemon is trimmed (%d/%d)\n",
diff --git a/pie/util.c b/pie/util.c
index 0d6369d..2910da3 100644
--- a/pie/util.c
+++ b/pie/util.c
@@ -22,13 +22,13 @@ int open_detach_mount(char *dir)
 
 	ret = sys_umount2(dir, MNT_DETACH);
 	if (ret) {
-		pr_perror("Can't detach mount %s: %d\n", dir, ret);
+		pr_err("Can't detach mount %s: %d\n", dir, ret);
 		goto err_close;
 	}
 
 	ret = sys_rmdir(dir);
 	if (ret) {
-		pr_perror("Can't remove tmp dir %s: %d\n", dir, ret);
+		pr_err("Can't remove tmp dir %s: %d\n", dir, ret);
 		goto err_close;
 	}
 
diff --git a/timerfd.c b/timerfd.c
index 0fd9f1b..bc2ac33 100644
--- a/timerfd.c
+++ b/timerfd.c
@@ -143,7 +143,7 @@ static int timerfd_open(struct file_desc *d)
 
 	tmp = timerfd_create(tfe->clockid, 0);
 	if (tmp < 0) {
-		pr_perror("Can't create for %#x\n", tfe->id);
+		pr_perror("Can't create for %#x", tfe->id);
 		return -1;
 	}
 
diff --git a/util.c b/util.c
index 4ff8768..58b3b88 100644
--- a/util.c
+++ b/util.c
@@ -650,7 +650,7 @@ int vaddr_to_pfn(unsigned long vaddr, u64 *pfn)
 
 	off = (vaddr / PAGE_SIZE) * sizeof(u64);
 	if (lseek(fd, off, SEEK_SET) != off) {
-		pr_perror("Failed to seek address %lx\n", vaddr);
+		pr_perror("Failed to seek address %lx", vaddr);
 		goto out;
 	}
 
@@ -707,7 +707,7 @@ int mkdirp(const char *path)
 		if (pos)
 			*pos = '\0';
 		if (mkdir(made_path, 0755) < 0 && errno != EEXIST) {
-			pr_perror("couldn't mkdirpat directory\n");
+			pr_perror("couldn't mkdirpat directory");
 			return -1;
 		}
 		if (pos) {
-- 
1.9.3



More information about the CRIU mailing list