[CRIU] [PATCH 2/2]v3 service: add support for check request

Ruslan Kuprieiev kupruser at gmail.com
Tue Nov 19 15:53:24 PST 2013


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-service.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/cr-service.c b/cr-service.c
index 65710fd..1867b2e 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -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;
-- 
1.8.1.2



More information about the CRIU mailing list