From d71e5e44f1345dae1703dba60dcc22ea7aa1ee22 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 10 Apr 2012 15:38:33 +0400 Subject: [PATCH] dump: Factor out dump-regs logging Signed-off-by: Pavel Emelyanov --- cr-dump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cr-dump.c b/cr-dump.c index 1e73109c0..8ecbfb4a6 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -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}; int ret = -1; + pr_info("Dumping GP/FPU registers ... "); + if (ctl) regs = ctl->regs_orig; else { @@ -917,11 +919,9 @@ static int dump_task_core_all(pid_t pid, const struct proc_pid_stat *stat, if (ret) goto err_free; - pr_info("Dumping GP/FPU registers ... "); ret = get_task_regs(pid, core, ctl); if (ret) goto err_free; - pr_info("OK\n"); pr_info("Obtainting 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) goto err; - pr_info("Dumping GP/FPU registers ... "); ret = get_task_regs(pid, core, NULL); if (ret) goto err_free;