Commit cb648fb9 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6201096c
...@@ -13,19 +13,21 @@ ...@@ -13,19 +13,21 @@
int open_detach_mount(char *dir) int open_detach_mount(char *dir)
{ {
int fd; int fd, ret;
fd = sys_open(dir, O_RDONLY | O_DIRECTORY, 0); fd = sys_open(dir, O_RDONLY | O_DIRECTORY, 0);
if (fd < 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)) { ret = sys_umount2(dir, MNT_DETACH);
pr_perror("Can't detach mount"); if (ret) {
pr_perror("Can't detach mount %s: %d\n", dir, ret);
goto err_close; goto err_close;
} }
if (sys_rmdir(dir)) { ret = sys_rmdir(dir);
pr_perror("Can't remove tmp dir"); if (ret) {
pr_perror("Can't remove tmp dir %s: %d\n", dir, ret);
goto err_close; goto err_close;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment