From 15f914f20a79f399dee0a8e44fb083103a881be9 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 7 Oct 2015 09:19:53 -0700 Subject: [PATCH] pr_perror(): don't supply \n pr_perror() is special, it adds \n at the end so there is no need to supply one. Signed-off-by: Kir Kolyshkin Acked-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- mount.c | 10 +++++----- sk-unix.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mount.c b/mount.c index 40613b5e8..39677f7dd 100644 --- a/mount.c +++ b/mount.c @@ -1990,7 +1990,7 @@ static int do_new_mount(struct mount_info *mi) if (mflags && mount(NULL, mi->mountpoint, NULL, MS_REMOUNT | MS_BIND | mflags, NULL)) { - pr_perror("Unable to apply bind-mount options\n"); + pr_perror("Unable to apply bind-mount options"); return -1; } @@ -2054,14 +2054,14 @@ do_bind: if (S_ISDIR(st.st_mode)) { if (mkdir(root, (st.st_mode & ~S_IFMT))) { - pr_perror("Can't re-create deleted directory %s\n", root); + pr_perror("Can't re-create deleted directory %s", root); return -1; } } else if (S_ISREG(st.st_mode)) { int fd = open(root, O_WRONLY | O_CREAT | O_EXCL, st.st_mode & ~S_IFMT); if (fd < 0) { - pr_perror("Can't re-create deleted file %s\n", root); + pr_perror("Can't re-create deleted file %s", root); return -1; } close(fd); @@ -2087,12 +2087,12 @@ do_bind: if (unlikely(mi->deleted)) { if (S_ISDIR(st.st_mode)) { if (rmdir(root)) { - pr_perror("Can't remove deleted directory %s\n", root); + pr_perror("Can't remove deleted directory %s", root); return -1; } } else if (S_ISREG(st.st_mode)) { if (unlink(root)) { - pr_perror("Can't unlink deleted file %s\n", root); + pr_perror("Can't unlink deleted file %s", root); return -1; } } diff --git a/sk-unix.c b/sk-unix.c index 21f5e47f5..c61d74608 100644 --- a/sk-unix.c +++ b/sk-unix.c @@ -846,7 +846,7 @@ static int prep_unix_sk_cwd(struct unix_sk_info *ui, int *prev_cwd_fd) return -1; } if (chdir(ui->name_dir)) { - pr_perror("Can't change working dir %s\n", + pr_perror("Can't change working dir %s", ui->name_dir); close(*prev_cwd_fd); *prev_cwd_fd = -1;