summaryrefslogtreecommitdiff
path: root/serial
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-25 18:45:59 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-25 18:45:59 +0200
commit80541b6be466784326c9afb399afaabdc2333073 (patch)
treea8affde7cc04003ab514ff9ada4e9dd53111009e /serial
parent9d326306a1ff9cb6421ce47d07d4367e8ff46418 (diff)
downloadbluez-80541b6be466784326c9afb399afaabdc2333073.tar.gz
Remove unused function
Diffstat (limited to 'serial')
-rw-r--r--serial/storage.c33
-rw-r--r--serial/storage.h1
2 files changed, 0 insertions, 34 deletions
diff --git a/serial/storage.c b/serial/storage.c
index a6564a721..39b1e6ffa 100644
--- a/serial/storage.c
+++ b/serial/storage.c
@@ -136,36 +136,3 @@ done:
return err;
}
-int read_device_name(bdaddr_t *src, bdaddr_t *dst, char **name)
-{
- char filename[PATH_MAX + 1], *str;
- char src_addr[18], dst_addr[18];
- int len;
-
- ba2str(src, src_addr);
- ba2str(dst, dst_addr);
-
- create_name(filename, PATH_MAX, STORAGEDIR, src_addr, "names");
-
- str = textfile_get(filename, dst_addr);
- if (!str)
- return -ENOENT;
-
- len = strlen(str);
-
- /* Max remote device name */
- if (len < 248) {
- *name = str;
- return 0;
- }
-
- *name = g_try_malloc0(248);
- if (!*name)
- return -ENOMEM;
-
- snprintf(*name, 248, "%s", str);
-
- free(str);
-
- return 0;
-}
diff --git a/serial/storage.h b/serial/storage.h
index 655f26eb3..6d7007f44 100644
--- a/serial/storage.h
+++ b/serial/storage.h
@@ -27,4 +27,3 @@ int port_store(bdaddr_t *src, bdaddr_t *dst, int16_t id,
int proxy_delete(bdaddr_t *src, const char *tty);
int proxy_store(bdaddr_t *src, const char *uuid, const char *tty,
const char *name, uint8_t ch, int opts, struct termios *ti);
-int read_device_name(bdaddr_t *src, bdaddr_t *dst, char **name);