Commit 8a8ce9b3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

show: Don't forget to open sockets queue descriptor before accessing it

Otherwise I'm getting errors like

CR_FD_SK_QUEUES
----------------
Error (./include/util.h:102): Can't read img file: Bad file descriptor
----------------
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent a26d5240
...@@ -551,7 +551,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts) ...@@ -551,7 +551,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
LIST_HEAD(pstree_list); LIST_HEAD(pstree_list);
int i, ret = -1; int i, ret = -1;
cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE); cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE | CR_FD_DESC_SK_QUEUES);
if (!cr_fdset) if (!cr_fdset)
goto out; goto out;
......
...@@ -101,6 +101,7 @@ struct cr_fdset { ...@@ -101,6 +101,7 @@ struct cr_fdset {
#define CR_FD_DESC_USE(type) ((1 << (type))) #define CR_FD_DESC_USE(type) ((1 << (type)))
#define CR_FD_DESC_CORE CR_FD_DESC_USE(CR_FD_CORE) #define CR_FD_DESC_CORE CR_FD_DESC_USE(CR_FD_CORE)
#define CR_FD_DESC_PSTREE CR_FD_DESC_USE(CR_FD_PSTREE) #define CR_FD_DESC_PSTREE CR_FD_DESC_USE(CR_FD_PSTREE)
#define CR_FD_DESC_SK_QUEUES CR_FD_DESC_USE(CR_FD_SK_QUEUES)
#define CR_FD_DESC_TASK (\ #define CR_FD_DESC_TASK (\
CR_FD_DESC_USE(CR_FD_FDINFO) |\ CR_FD_DESC_USE(CR_FD_FDINFO) |\
CR_FD_DESC_USE(CR_FD_PAGES) |\ CR_FD_DESC_USE(CR_FD_PAGES) |\
......
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