[CRIU] [crtools-bot for Kinsbursky Stanislav ] dump: fix check for
service dentries
Cyrill Gorcunov
gorcunov at openvz.org
Thu Mar 1 04:01:08 EST 2012
The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 64bf2b7d4b6e05cfbd638d76207474724682f930
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date: Thu Mar 1 11:35:29 2012 +0300
dump: fix check for service dentries
Without the patch all files starting with "." will be ommited.
Use of strcmp() - explicit check for "." and ".." looks clearer.
Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
Acked-by: Pavel Emelyanov <xemul at parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
cr-dump.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cr-dump.c b/cr-dump.c
index b99e023..7d43b74 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -391,7 +391,9 @@ static int dump_task_files(pid_t pid, struct cr_fdset *cr_fdset,
struct fd_parms p;
int lfd;
- if (de->d_name[0] == '.')
+ if (!strcmp(de->d_name, "."))
+ continue;
+ if (!strcmp(de->d_name, ".."))
continue;
if (read_fd_params(pid, de->d_name, &p))
return -1;
More information about the CRIU
mailing list