mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +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:
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,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user