From fdc61f050a7b17a60230f91de63bd5ebfc720687 Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Wed, 30 Sep 2015 13:53:46 +0300 Subject: [PATCH] [FIX] Disabling probes features Nofeature probes were also deleted from probe lists sended to the modules. Now it is fixed. Change-Id: Ieef1a305b806bf89ed6b505f40d97f08fa7e7a2f Signed-off-by: Alexander Aksenov --- daemon/da_inst.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/daemon/da_inst.c b/daemon/da_inst.c index 65d2646..736cfbe 100644 --- a/daemon/da_inst.c +++ b/daemon/da_inst.c @@ -1102,13 +1102,19 @@ int ld_add_probes_by_feature(uint64_t to_enable_features_0, LOGI("Set LD probes for %016LX <%s>\n", f.feature_value, &buf[0]); feature_add_lib_inst_list(f.feature_ld, &ld_lib_inst_list_new_add); - } else if ((f.feature_value & to_disable_features_0) || - (f.feature_value & to_disable_features_1 << 64)) { + } else if (((f.feature_value & to_disable_features_0) && + !(f.feature_value & ~to_disable_features_0) || + ((f.feature_value & to_disable_features_1 << 64) && + !(f.feature_value & ~(to_disable_features_1 << 64))))) { + /* If + * (feature_value & to_disable) == (feature_value & ~to_disable) + * then this is NOFEATURE probe, so, do not remove */ + buf[0] = '\0'; feature_code_str(f.feature_value, f.feature_value, &buf[0], sizeof(buf)); - LOGI("Set LD probes for %016LX <%s>\n", f.feature_value, &buf[0]); + LOGI("Remove LD probes for %016LX <%s>\n", f.feature_value, &buf[0]); feature_add_lib_inst_list(f.feature_ld, &ld_lib_inst_list_new_remove); } -- 2.7.4