mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
dump: Factor out dump-regs logging
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
dcc37a09e0
commit
d71e5e44f1
@ -762,6 +762,8 @@ static int get_task_regs(pid_t pid, struct core_entry *core, const struct parasi
|
|||||||
user_regs_struct_t regs = {-1};
|
user_regs_struct_t regs = {-1};
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
pr_info("Dumping GP/FPU registers ... ");
|
||||||
|
|
||||||
if (ctl)
|
if (ctl)
|
||||||
regs = ctl->regs_orig;
|
regs = ctl->regs_orig;
|
||||||
else {
|
else {
|
||||||
@ -917,11 +919,9 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
|
||||||
pr_info("Dumping GP/FPU registers ... ");
|
|
||||||
ret = get_task_regs(pid, core, ctl);
|
ret = get_task_regs(pid, core, ctl);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
pr_info("OK\n");
|
|
||||||
|
|
||||||
pr_info("Obtainting personality ... ");
|
pr_info("Obtainting personality ... ");
|
||||||
ret = get_task_personality(pid, &core->tc.personality);
|
ret = get_task_personality(pid, &core->tc.personality);
|
||||||
@ -1349,7 +1349,6 @@ static int dump_task_thread(struct parasite_ctl *parasite_ctl, pid_t pid)
|
|||||||
if (!core)
|
if (!core)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
pr_info("Dumping GP/FPU registers ... ");
|
|
||||||
ret = get_task_regs(pid, core, NULL);
|
ret = get_task_regs(pid, core, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user