mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
dump: Toss code withing dump_task_core_all
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
14
cr-dump.c
14
cr-dump.c
@@ -906,14 +906,15 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
|
||||
const struct parasite_dump_misc *misc, const struct parasite_ctl *ctl,
|
||||
const struct cr_fdset *cr_fdset)
|
||||
{
|
||||
struct core_entry *core = xzalloc(sizeof(*core));
|
||||
int ret = -1;
|
||||
struct core_entry *core;
|
||||
int ret = -1;
|
||||
unsigned long brk;
|
||||
|
||||
pr_info("\n");
|
||||
pr_info("Dumping core (pid: %d)\n", pid);
|
||||
pr_info("----------------------------------------\n");
|
||||
|
||||
core = xzalloc(sizeof(*core));
|
||||
if (!core)
|
||||
goto err;
|
||||
|
||||
@@ -921,6 +922,10 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
|
||||
if (ret)
|
||||
goto err_free;
|
||||
|
||||
ret = dump_task_mm(pid, stat, misc, cr_fdset);
|
||||
if (ret)
|
||||
goto err_free;
|
||||
|
||||
ret = get_task_regs(pid, core, ctl);
|
||||
if (ret)
|
||||
goto err_free;
|
||||
@@ -931,11 +936,6 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
|
||||
|
||||
strncpy((char *)core->tc.comm, stat->comm, TASK_COMM_LEN);
|
||||
core->tc.flags = stat->flags;
|
||||
|
||||
ret = dump_task_mm(pid, stat, misc, cr_fdset);
|
||||
if (ret)
|
||||
goto err_free;
|
||||
|
||||
BUILD_BUG_ON(sizeof(core->tc.blk_sigset) != sizeof(k_rtsigset_t));
|
||||
memcpy(&core->tc.blk_sigset, &misc->blocked, sizeof(k_rtsigset_t));
|
||||
|
||||
|
Reference in New Issue
Block a user