Commit 2d4244d0 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

show: use read_img to read pid-s of children and threads

Because amount of entries are known.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 32b5aa76
...@@ -370,8 +370,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect) ...@@ -370,8 +370,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
pr_msg("\\\n"); pr_msg("\\\n");
pr_msg(" +--- children: "); pr_msg(" +--- children: ");
while (e.nr_children--) { while (e.nr_children--) {
ret = read_img_eof(fd_pstree, &pid); ret = read_img(fd_pstree, &pid);
if (ret <= 0) if (ret < 0)
goto out; goto out;
pr_msg(" %6d", pid); pr_msg(" %6d", pid);
} }
...@@ -382,8 +382,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect) ...@@ -382,8 +382,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
pr_msg(" \\\n"); pr_msg(" \\\n");
pr_msg(" --- threads: "); pr_msg(" --- threads: ");
while (e.nr_threads--) { while (e.nr_threads--) {
ret = read_img_eof(fd_pstree, &pid); ret = read_img(fd_pstree, &pid);
if (ret <= 0) if (ret < 0)
goto out; goto out;
pr_msg(" %6d", pid); pr_msg(" %6d", pid);
if (item) if (item)
......
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