Commit c03a4c58 authored by Pavel Emelyanov's avatar Pavel Emelyanov

msg: Make final dump/restore more descriptive

Currently dump silently terminates and restore emits some
meaning-less messages in either case. Make these important
messages more informative.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c721df56
...@@ -1600,5 +1600,10 @@ err: ...@@ -1600,5 +1600,10 @@ err:
close_safe(&pidns_proc); close_safe(&pidns_proc);
if (ret)
pr_err("Dumping FAILED.\n");
else
pr_info("Dumping finished successfully\n");
return ret; return ret;
} }
...@@ -1272,7 +1272,6 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts) ...@@ -1272,7 +1272,6 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts)
out: out:
if (ret < 0) { if (ret < 0) {
struct pstree_item *pi; struct pstree_item *pi;
pr_err("Someone can't be restored\n");
if (current_ns_mask & CLONE_NEWPID) { if (current_ns_mask & CLONE_NEWPID) {
/* Kill init */ /* Kill init */
...@@ -1283,10 +1282,12 @@ out: ...@@ -1283,10 +1282,12 @@ out:
if (pi->pid.virt > 0) if (pi->pid.virt > 0)
kill(pi->pid.virt, SIGKILL); kill(pi->pid.virt, SIGKILL);
} }
pr_err("Restoring FAILED.\n");
return 1; return 1;
} }
pr_info("Go on!!!\n"); pr_info("Restore finised successfully. Resuming tasks.\n");
futex_set_and_wake(&task_entries->start, CR_STATE_COMPLETE); futex_set_and_wake(&task_entries->start, CR_STATE_COMPLETE);
if (!opts->restore_detach) if (!opts->restore_detach)
......
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