Commit 3835ff83 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

cr-service.c: rm extra error messages

setup_opts_from_req() prints an error message, so there's no need
for its caller to print another one.

While at it, simplify/unify error checking, treating any
non-zero value as an error.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b0e6ebc1
...@@ -260,10 +260,8 @@ static int dump_using_req(int sk, CriuOpts *req) ...@@ -260,10 +260,8 @@ static int dump_using_req(int sk, CriuOpts *req)
bool success = false; bool success = false;
bool self_dump = !req->pid; bool self_dump = !req->pid;
if (setup_opts_from_req(sk, req) == -1) { if (setup_opts_from_req(sk, req))
pr_perror("Arguments treating fail");
goto exit; goto exit;
}
/* /*
* FIXME -- cr_dump_tasks() may return code from custom * FIXME -- cr_dump_tasks() may return code from custom
...@@ -298,10 +296,8 @@ static int restore_using_req(int sk, CriuOpts *req) ...@@ -298,10 +296,8 @@ static int restore_using_req(int sk, CriuOpts *req)
opts.restore_detach = true; opts.restore_detach = true;
if (setup_opts_from_req(sk, req) == -1) { if (setup_opts_from_req(sk, req))
pr_perror("Arguments treating fail");
goto exit; goto exit;
}
if (cr_restore_tasks()) if (cr_restore_tasks())
goto exit; goto exit;
...@@ -346,10 +342,8 @@ static int pre_dump_using_req(int sk, CriuOpts *opts) ...@@ -346,10 +342,8 @@ static int pre_dump_using_req(int sk, CriuOpts *opts)
if (pid == 0) { if (pid == 0) {
int ret = 1; int ret = 1;
if (setup_opts_from_req(sk, opts)) { if (setup_opts_from_req(sk, opts))
pr_perror("Bad options");
goto cout; goto cout;
}
if (cr_pre_dump_tasks(opts->pid)) if (cr_pre_dump_tasks(opts->pid))
goto cout; goto cout;
......
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