Commit 64bf2b7d authored by Kinsbursky Stanislav's avatar Kinsbursky Stanislav Committed by Cyrill Gorcunov

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: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 29a7a81d
...@@ -391,7 +391,9 @@ static int dump_task_files(pid_t pid, struct cr_fdset *cr_fdset, ...@@ -391,7 +391,9 @@ static int dump_task_files(pid_t pid, struct cr_fdset *cr_fdset,
struct fd_parms p; struct fd_parms p;
int lfd; int lfd;
if (de->d_name[0] == '.') if (!strcmp(de->d_name, "."))
continue;
if (!strcmp(de->d_name, ".."))
continue; continue;
if (read_fd_params(pid, de->d_name, &p)) if (read_fd_params(pid, de->d_name, &p))
return -1; return -1;
......
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