[CRIU] [PATCH 7/7] pr_perror(): don't supply \n
Kir Kolyshkin
kir at openvz.org
Wed Oct 7 09:19:53 PDT 2015
pr_perror() is special, it adds \n at the end so there is
no need to supply one.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
mount.c | 10 +++++-----
sk-unix.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/mount.c b/mount.c
index 7f53b67..442ac59 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 a47a663..e30db00 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -829,7 +829,7 @@ static int prep_unix_sk_cwd(struct unix_sk_info *ui)
{
if (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);
return -1;
}
--
2.4.3
More information about the CRIU
mailing list