Commit 19ce784d authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

dump: Add missing FD_PARMS_INIT assignments

struct fd_parms is reused for two calls, so don't
forget to initialize it before dump_one_reg_file
call.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4c3fe872
...@@ -269,6 +269,7 @@ static int dump_task_fs(pid_t pid, struct parasite_dump_misc *misc, struct cr_fd ...@@ -269,6 +269,7 @@ static int dump_task_fs(pid_t pid, struct parasite_dump_misc *misc, struct cr_fd
if (fd < 0) if (fd < 0)
return -1; return -1;
p = FD_PARMS_INIT;
if (fstat(fd, &p.stat) < 0) { if (fstat(fd, &p.stat) < 0) {
pr_perror("Can't stat root"); pr_perror("Can't stat root");
return -1; return -1;
......
...@@ -30,7 +30,7 @@ struct fd_parms { ...@@ -30,7 +30,7 @@ struct fd_parms {
}; };
#define FD_PARMS_INIT \ #define FD_PARMS_INIT \
{ \ (struct fd_parms) { \
.fd = FD_DESC_INVALID, \ .fd = FD_DESC_INVALID, \
.fown = FOWN_ENTRY__INIT, \ .fown = FOWN_ENTRY__INIT, \
} }
......
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