diff --git a/cgroup.c b/cgroup.c index afa31b978..d4b71a368 100644 --- a/cgroup.c +++ b/cgroup.c @@ -311,7 +311,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; } diff --git a/cr-restore.c b/cr-restore.c index abbd8d7a9..0349e3e46 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 77e3332dd..f9e0d0a01 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 459dfee35..9bb8a1744 100644 --- a/mount.c +++ b/mount.c @@ -1304,7 +1304,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; } @@ -2007,7 +2007,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 8c1095227..6f56617a4 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 0d6369d94..2910da366 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 0fd9f1b91..bc2ac3333 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 4ff876813..58b3b88d7 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) {