summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2012-10-09 14:12:00 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-10-09 18:37:42 +0200
commit95c71594587c7cabb234858e95fda5e7951ded51 (patch)
tree35ddedf427b09fbb36d6225ce6e3f00cf5f71b66 /src
parent67fbf83a6fc0d9a241abdd61be3430a2dd92498b (diff)
storage: Remove not used read_remote_features
It was only usefull with hciops.
Diffstat (limited to 'src')
-rw-r--r--src/storage.c45
-rw-r--r--src/storage.h2
2 files changed, 0 insertions, 47 deletions
diff --git a/src/storage.c b/src/storage.c
index 297aba76..ac660219 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -435,51 +435,6 @@ done:
return 0;
}
-static int decode_bytes(const char *str, unsigned char *bytes, size_t len)
-{
- unsigned int i;
-
- for (i = 0; i < len; i++) {
- if (sscanf(str + (i * 2), "%02hhX", &bytes[i]) != 1)
- return -EINVAL;
- }
-
- return 0;
-}
-
-int read_remote_features(const bdaddr_t *local, const bdaddr_t *peer,
- unsigned char *page1, unsigned char *page2)
-{
- char filename[PATH_MAX + 1], addr[18], *str;
- size_t len;
- int err;
-
- if (page1 == NULL && page2 == NULL)
- return -EINVAL;
-
- create_filename(filename, PATH_MAX, local, "features");
-
- ba2str(peer, addr);
-
- str = textfile_get(filename, addr);
- if (!str)
- return -ENOENT;
-
- len = strlen(str);
-
- err = -ENOENT;
-
- if (page1 && len >= 16)
- err = decode_bytes(str, page1, 8);
-
- if (page2 && len >= 33)
- err = decode_bytes(str + 17, page2, 8);
-
- free(str);
-
- return err;
-}
-
int write_lastseen_info(const bdaddr_t *local, const bdaddr_t *peer,
uint8_t peer_type, struct tm *tm)
{
diff --git a/src/storage.h b/src/storage.h
index 8293ba8b..e3348285 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -50,8 +50,6 @@ int write_device_name(const bdaddr_t *local, const bdaddr_t *peer,
uint8_t peer_type, const char *name);
int read_device_name(const char *src, const char *dst, uint8_t dst_type,
char *name);
-int read_remote_features(const bdaddr_t *local, const bdaddr_t *peer,
- unsigned char *page1, unsigned char *page2);
int write_lastseen_info(const bdaddr_t *local, const bdaddr_t *peer,
uint8_t peer_type, struct tm *tm);
int write_lastused_info(const bdaddr_t *local, const bdaddr_t *peer,