diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-10-09 14:11:57 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-09 18:37:28 +0200 |
commit | a77aa417a13205af360c318a809dd99c7d92c484 (patch) | |
tree | 9b0649ec2757b8f44969caca8c3609436b3d5978 /src | |
parent | 39533d30090ba7692da21954543d4431e8ca6089 (diff) |
storage: Remove not used read_remote_eir
This function is not used. Previously it was used to determine if
remote device is legacy or not.
Diffstat (limited to 'src')
-rw-r--r-- | src/storage.c | 41 | ||||
-rw-r--r-- | src/storage.h | 2 |
2 files changed, 0 insertions, 43 deletions
diff --git a/src/storage.c b/src/storage.c index 55dc5913..d4189c56 100644 --- a/src/storage.c +++ b/src/storage.c @@ -435,47 +435,6 @@ done: return 0; } -int read_remote_eir(const bdaddr_t *local, const bdaddr_t *peer, - uint8_t peer_type, uint8_t *data) -{ - char filename[PATH_MAX + 1], key[18], *str; - int i; - - create_filename(filename, PATH_MAX, local, "eir"); - - ba2str(peer, key); - sprintf(&key[17], "#%hhu", peer_type); - - str = textfile_get(filename, key); - if (str != NULL) - goto done; - - /* Try old format (address only) */ - key[17] = '\0'; - - str = textfile_get(filename, key); - if (!str) - return -ENOENT; - -done: - if (!data) { - free(str); - return 0; - } - - if (strlen(str) < 480) { - free(str); - return -EIO; - } - - for (i = 0; i < HCI_MAX_EIR_LENGTH; i++) - sscanf(str + (i * 2), "%02hhX", &data[i]); - - free(str); - - return 0; -} - int write_version_info(const bdaddr_t *local, const bdaddr_t *peer, uint16_t manufacturer, uint8_t lmp_ver, uint16_t lmp_subver) diff --git a/src/storage.h b/src/storage.h index d6aa8ecc..0a91d477 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_eir(const bdaddr_t *local, const bdaddr_t *peer, - uint8_t peer_type, uint8_t *data); int write_version_info(const bdaddr_t *local, const bdaddr_t *peer, uint16_t manufacturer, uint8_t lmp_ver, uint16_t lmp_subver); |