mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 15:55:53 +00:00
Fix pr_perror() usage
When using pr_perror(), format string should not end with \n, as it is added by the macro itself. 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
de9df91002
commit
b17962ad8d
@@ -649,12 +649,12 @@ static int check_aio_remap(void)
|
||||
|
||||
naddr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, 0, 0);
|
||||
if (naddr == MAP_FAILED) {
|
||||
pr_perror("Can't find place for new AIO ring\n");
|
||||
pr_perror("Can't find place for new AIO ring");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mremap((void *)ctx, len, len, MREMAP_FIXED | MREMAP_MAYMOVE, naddr) == MAP_FAILED) {
|
||||
pr_perror("Can't remap AIO ring\n");
|
||||
pr_perror("Can't remap AIO ring");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@@ -526,7 +526,7 @@ static int restore_one_fanotify(int fd, struct fsnotify_mark_info *mark)
|
||||
|
||||
target = openat(mntns_root, m->mountpoint, O_PATH);
|
||||
if (target == -1) {
|
||||
pr_perror("Unable to open %s\n", m->mountpoint);
|
||||
pr_perror("Unable to open %s", m->mountpoint);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@@ -286,7 +286,7 @@ int kerndat_fdinfo_has_lock()
|
||||
}
|
||||
|
||||
if (flock(fd, LOCK_SH)) {
|
||||
pr_perror("Can't take a lock\n");
|
||||
pr_perror("Can't take a lock");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
2
mount.c
2
mount.c
@@ -2595,7 +2595,7 @@ int prepare_mnt_ns(void)
|
||||
/* Unprivileged users can't reveal what is under a mount */
|
||||
if (root_ns_mask & CLONE_NEWUSER) {
|
||||
if (mount(opts.root, opts.root, NULL, MS_BIND | MS_REC, NULL)) {
|
||||
pr_perror("Can't remount bind-mount %s into itself\n", opts.root);
|
||||
pr_perror("Can't remount bind-mount %s into itself", opts.root);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@@ -607,7 +607,7 @@ static int check_user_ns(int pid)
|
||||
|
||||
chld = fork();
|
||||
if (chld == -1) {
|
||||
pr_perror("Unable to fork a process\n");
|
||||
pr_perror("Unable to fork a process");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ static int write_id_map(pid_t pid, UidGidExtent **extents, int n, char *id_map)
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
if (write(fd, buf, off) != off) {
|
||||
pr_perror("Unable to write into %s\n", id_map);
|
||||
pr_perror("Unable to write into %s", id_map);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user