mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
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 <kir@openvz.org> Acked-by: Andrew Vagin <avagin@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
53f8c31459
commit
15f914f20a
10
mount.c
10
mount.c
@@ -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:
|
|||||||
|
|
||||||
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:
|
|||||||
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)
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user