[CRIU] [PATCH 3/3] fsnotify: print correct error if open_by_handle_at failed
Andrey Vagin
avagin at openvz.org
Mon Feb 24 06:11:30 PST 2014
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
fsnotify.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fsnotify.c b/fsnotify.c
index c91f184..55f02d8 100644
--- a/fsnotify.c
+++ b/fsnotify.c
@@ -117,9 +117,11 @@ static int open_handle(unsigned int s_dev, unsigned long i_ino,
}
fd = sys_open_by_handle_at(mntfd, (void *)&handle, 0);
- if (fd < 0)
+ if (fd < 0) {
+ errno = -fd;
pr_perror("Can't open file handle for 0x%08x:0x%016lx",
s_dev, i_ino);
+ }
close(mntfd);
out:
--
1.8.3.1
More information about the CRIU
mailing list