diff options
-rw-r--r-- | src/storage.c | 45 | ||||
-rw-r--r-- | src/storage.h | 2 |
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, |