[CRIU] [PATCH 03/11] p.haul: fix memory tracking support detection

Nikita Spiridonov nspiridonov at virtuozzo.com
Mon Mar 21 09:35:18 PDT 2016


Fix bug in memory tracking support detection logic.

Signed-off-by: Nikita Spiridonov <nspiridonov at virtuozzo.com>
---
 phaul/iters.py |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/phaul/iters.py b/phaul/iters.py
index d68a1a3..1ac1fd2 100644
--- a/phaul/iters.py
+++ b/phaul/iters.py
@@ -88,13 +88,11 @@ class phaul_iter_worker:
 		resp = self.criu_connection.send_req(req)
 		if not resp.success:
 			raise Exception()
-		if resp.HasField('features'):
+		if not resp.HasField('features'):
 			return False
-		if resp.features.HasField('mem_track'):
+		if not resp.features.HasField('mem_track'):
 			return False
-		if resp.features.mem_track:
-			return True
-		return False
+		return resp.features.mem_track
 
 	def __check_use_pre_dumps(self):
 		logging.info("Checking for Dirty Tracking")
-- 
1.7.1



More information about the CRIU mailing list