summaryrefslogtreecommitdiffstats
path: root/hcid/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/storage.c')
-rw-r--r--hcid/storage.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hcid/storage.c b/hcid/storage.c
index f811bca7..586d73f0 100644
--- a/hcid/storage.c
+++ b/hcid/storage.c
@@ -676,3 +676,18 @@ GSList *list_trusts(bdaddr_t *local, const char *service)
return list.trusts;
}
+
+int write_device_profiles(bdaddr_t *src, bdaddr_t *dst, const char *profiles)
+{
+ char filename[PATH_MAX + 1], addr[18];
+
+ if (!profiles)
+ return -EINVAL;
+
+ create_filename(filename, PATH_MAX, src, "profiles");
+
+ create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+
+ ba2str(dst, addr);
+ return textfile_put(filename, addr, profiles);
+}