mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-25 11:04:35 +00:00
dump: Don't push parasite-ctl into fns needing pid only
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
c2dec75bbd
commit
cd0075abbd
1 changed files with 4 additions and 7 deletions
11
cr-dump.c
11
cr-dump.c
|
|
@ -463,12 +463,11 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int dump_task_mm(struct parasite_ctl *ctl, const struct proc_pid_stat *stat,
|
||||
static int dump_task_mm(pid_t pid, const struct proc_pid_stat *stat,
|
||||
const struct parasite_dump_misc *misc, const struct cr_fdset *fdset)
|
||||
{
|
||||
MmEntry mme = MM_ENTRY__INIT;
|
||||
int ret = -1;
|
||||
pid_t pid = ctl->pid.real;
|
||||
|
||||
mme.mm_start_code = stat->start_code;
|
||||
mme.mm_end_code = stat->end_code;
|
||||
|
|
@ -644,15 +643,13 @@ int dump_thread_core(int pid, CoreEntry *core, const struct parasite_dump_thread
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int dump_task_core_all(struct parasite_ctl *ctl,
|
||||
CoreEntry *core,
|
||||
static int dump_task_core_all(pid_t pid, CoreEntry *core,
|
||||
const struct proc_pid_stat *stat,
|
||||
const struct parasite_dump_misc *misc,
|
||||
const struct cr_fdset *cr_fdset)
|
||||
{
|
||||
int fd_core = fdset_fd(cr_fdset, CR_FD_CORE);
|
||||
int ret = -1;
|
||||
pid_t pid = ctl->pid.real;
|
||||
|
||||
pr_info("\n");
|
||||
pr_info("Dumping core (pid: %d)\n", pid);
|
||||
|
|
@ -1500,13 +1497,13 @@ static int dump_one_task(struct pstree_item *item)
|
|||
goto err_cure;
|
||||
}
|
||||
|
||||
ret = dump_task_mm(parasite_ctl, &pps_buf, &misc, cr_fdset);
|
||||
ret = dump_task_mm(pid, &pps_buf, &misc, cr_fdset);
|
||||
if (ret) {
|
||||
pr_err("Dump mm (pid: %d) failed with %d\n", pid, ret);
|
||||
goto err_cure;
|
||||
}
|
||||
|
||||
ret = dump_task_core_all(parasite_ctl, item->core[0], &pps_buf, &misc, cr_fdset);
|
||||
ret = dump_task_core_all(pid, item->core[0], &pps_buf, &misc, cr_fdset);
|
||||
if (ret) {
|
||||
pr_err("Dump core (pid: %d) failed with %d\n", pid, ret);
|
||||
goto err_cure;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue