From 23bdb6173c3579c2bb73f5fbd9564f0e1c6db162 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 14 Mar 2017 17:43:00 +0100 Subject: [PATCH] Remove bogus check in check_features The check_features RPC function required that both known fields are present. Without those fields it exited with an error. If RPC users where not specifying all parameters it would fail. It should, however, be possible to only check for a subset of options. Each supported option is checked separately anyway in the forked criu which does the actual check. Removing the check also enables RPC clients with older protobuf definitions to use the feature check. Signed-off-by: Adrian Reber Signed-off-by: Andrei Vagin --- criu/cr-service.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/criu/cr-service.c b/criu/cr-service.c index 2a4f37f58..9172a8c4b 100644 --- a/criu/cr-service.c +++ b/criu/cr-service.c @@ -869,13 +869,6 @@ static int handle_feature_check(int sk, CriuReq * msg) feat.has_lazy_pages = 1; feat.lazy_pages = false; - /* Check if the requested feature check can be answered. */ - if ((msg->features->has_mem_track != 1) || - (msg->features->has_lazy_pages != 1)) { - pr_warn("Feature checking for unknown feature.\n"); - goto out; - } - pid = fork(); if (pid < 0) { pr_perror("Can't fork");