Commit 15f914f2 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

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: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 53f8c314
...@@ -1990,7 +1990,7 @@ static int do_new_mount(struct mount_info *mi) ...@@ -1990,7 +1990,7 @@ static int do_new_mount(struct mount_info *mi)
if (mflags && mount(NULL, mi->mountpoint, NULL, if (mflags && mount(NULL, mi->mountpoint, NULL,
MS_REMOUNT | MS_BIND | mflags, 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; return -1;
} }
...@@ -2054,14 +2054,14 @@ do_bind: ...@@ -2054,14 +2054,14 @@ do_bind:
if (S_ISDIR(st.st_mode)) { if (S_ISDIR(st.st_mode)) {
if (mkdir(root, (st.st_mode & ~S_IFMT))) { 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; return -1;
} }
} else if (S_ISREG(st.st_mode)) { } else if (S_ISREG(st.st_mode)) {
int fd = open(root, O_WRONLY | O_CREAT | O_EXCL, int fd = open(root, O_WRONLY | O_CREAT | O_EXCL,
st.st_mode & ~S_IFMT); st.st_mode & ~S_IFMT);
if (fd < 0) { 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; return -1;
} }
close(fd); close(fd);
...@@ -2087,12 +2087,12 @@ do_bind: ...@@ -2087,12 +2087,12 @@ do_bind:
if (unlikely(mi->deleted)) { if (unlikely(mi->deleted)) {
if (S_ISDIR(st.st_mode)) { if (S_ISDIR(st.st_mode)) {
if (rmdir(root)) { if (rmdir(root)) {
pr_perror("Can't remove deleted directory %s\n", root); pr_perror("Can't remove deleted directory %s", root);
return -1; return -1;
} }
} else if (S_ISREG(st.st_mode)) { } else if (S_ISREG(st.st_mode)) {
if (unlink(root)) { if (unlink(root)) {
pr_perror("Can't unlink deleted file %s\n", root); pr_perror("Can't unlink deleted file %s", root);
return -1; return -1;
} }
} }
......
...@@ -846,7 +846,7 @@ static int prep_unix_sk_cwd(struct unix_sk_info *ui, int *prev_cwd_fd) ...@@ -846,7 +846,7 @@ static int prep_unix_sk_cwd(struct unix_sk_info *ui, int *prev_cwd_fd)
return -1; return -1;
} }
if (chdir(ui->name_dir)) { 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); ui->name_dir);
close(*prev_cwd_fd); close(*prev_cwd_fd);
*prev_cwd_fd = -1; *prev_cwd_fd = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment