[CRIU] [PATCH cr 3/3] show: use read_img to read pid-s of children
and threads
Andrey Vagin
avagin at openvz.org
Fri Apr 6 16:22:20 EDT 2012
Because amount of entries are known.
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-show.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cr-show.c b/cr-show.c
index d2a00a9..73ba056 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -369,8 +369,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
pr_msg("\\\n");
pr_msg(" +--- children: ");
while (e.nr_children--) {
- ret = read_img_eof(fd_pstree, &pid);
- if (ret <= 0)
+ ret = read_img(fd_pstree, &pid);
+ if (ret < 0)
goto out;
pr_msg(" %6d", pid);
}
@@ -381,8 +381,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
pr_msg(" \\\n");
pr_msg(" --- threads: ");
while (e.nr_threads--) {
- ret = read_img_eof(fd_pstree, &pid);
- if (ret <= 0)
+ ret = read_img(fd_pstree, &pid);
+ if (ret < 0)
goto out;
pr_msg(" %6d", pid);
if (item)
--
1.7.1
More information about the CRIU
mailing list