mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
pie: don't use pr_perror in pie code
pr_perror uses errno, which is set by glibc wrappers. In pi return codes of syscalls should be printed Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
6201096cea
commit
cb648fb934
14
pie/util.c
14
pie/util.c
@@ -13,19 +13,21 @@
|
||||
|
||||
int open_detach_mount(char *dir)
|
||||
{
|
||||
int fd;
|
||||
int fd, ret;
|
||||
|
||||
fd = sys_open(dir, O_RDONLY | O_DIRECTORY, 0);
|
||||
if (fd < 0)
|
||||
pr_perror("Can't open directory");
|
||||
pr_err("Can't open directory %s: %d\n", dir, fd);
|
||||
|
||||
if (sys_umount2(dir, MNT_DETACH)) {
|
||||
pr_perror("Can't detach mount");
|
||||
ret = sys_umount2(dir, MNT_DETACH);
|
||||
if (ret) {
|
||||
pr_perror("Can't detach mount %s: %d\n", dir, ret);
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
if (sys_rmdir(dir)) {
|
||||
pr_perror("Can't remove tmp dir");
|
||||
ret = sys_rmdir(dir);
|
||||
if (ret) {
|
||||
pr_perror("Can't remove tmp dir %s: %d\n", dir, ret);
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user