Commit 0b5b2f99 authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

service: Add support for check request

Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9ccbf1bc
......@@ -217,6 +217,16 @@ exit:
return success ? 0 : 1;
}
static int check(int sk)
{
CriuResp resp = CRIU_RESP__INIT;
if (!cr_check())
resp.success = true;
return send_criu_msg(sk, &resp);
}
static int cr_service_work(int sk)
{
CriuReq *msg = 0;
......@@ -233,6 +243,8 @@ static int cr_service_work(int sk)
return dump_using_req(sk, msg->opts);
case CRIU_REQ_TYPE__RESTORE:
return restore_using_req(sk, msg->opts);
case CRIU_REQ_TYPE__CHECK:
return check(sk);
default: {
CriuResp resp = CRIU_RESP__INIT;
......
......@@ -24,6 +24,7 @@ enum criu_req_type {
EMPTY = 0;
DUMP = 1;
RESTORE = 2;
CHECK = 3;
}
/*
......
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