]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/config.c
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus
[karo-tx-linux.git] / tools / perf / util / config.c
index 18dae745034f760566b03cdfa4e7ec6aa08dcdba..3d906dbbef74b768ed5c1f72f08af0948afc7535 100644 (file)
@@ -594,6 +594,19 @@ static int collect_config(const char *var, const char *value,
                        goto out_free;
        }
 
+       /* perf_config_set can contain both user and system config items.
+        * So we should know where each value is from.
+        * The classification would be needed when a particular config file
+        * is overwrited by setting feature i.e. set_config().
+        */
+       if (strcmp(config_file_name, perf_etc_perfconfig()) == 0) {
+               section->from_system_config = true;
+               item->from_system_config = true;
+       } else {
+               section->from_system_config = false;
+               item->from_system_config = false;
+       }
+
        ret = set_value(item, value);
        return ret;
 
@@ -602,6 +615,13 @@ out_free:
        return -1;
 }
 
+int perf_config_set__collect(struct perf_config_set *set, const char *file_name,
+                            const char *var, const char *value)
+{
+       config_file_name = file_name;
+       return collect_config(var, value, set);
+}
+
 static int perf_config_set__init(struct perf_config_set *set)
 {
        int ret = -1;