aboutsummaryrefslogtreecommitdiffstats
path: root/src/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage.c')
-rw-r--r--src/storage.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/storage.c b/src/storage.c
index f07f6d78..4d4607a6 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -1251,3 +1251,16 @@ int write_device_services(const bdaddr_t *sba, const bdaddr_t *dba,
return textfile_put(filename, addr, services);
}
+
+char *read_device_services(const bdaddr_t *sba, const bdaddr_t *dba)
+{
+ char filename[PATH_MAX + 1], addr[18];
+
+ create_filename(filename, PATH_MAX, sba, "primary");
+
+ create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+
+ ba2str(dba, addr);
+
+ return textfile_caseget(filename, addr);
+}