All entry in trusts file are set to [all] (if a device is not trusted it does not have entry in this file). So, we do not need to check entry value and set device (entry key) as trusted. --- src/adapter.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 7ba821e..bdea378 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2543,6 +2543,11 @@ static void convert_aliases_entry(GKeyFile *key_file, void *value) g_key_file_set_string(key_file, "General", "Alias", value); } +static void convert_trusts_entry(GKeyFile *key_file, void *value) +{ + g_key_file_set_boolean(key_file, "General", "Trusted", TRUE); +} + static void convert_entry(char *key, char *value, void *user_data) { struct device_converter *converter = user_data; @@ -2619,6 +2624,9 @@ static void convert_device_storage(struct btd_adapter *adapter) /* Convert aliases */ convert_file("aliases", address, convert_aliases_entry); + + /* Convert trusts */ + convert_file("trusts", address, convert_trusts_entry); } static void convert_config(struct btd_adapter *adapter, const char *filename, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html