From abfc590fb1e563792172622e3e9ccc61fcd6fa04 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 14 Dec 2012 11:40:18 +0200 Subject: [PATCH] core: Remove unused read_local_class function --- src/storage.c | 22 ---------------------- src/storage.h | 1 - 2 files changed, 23 deletions(-) diff --git a/src/storage.c b/src/storage.c index 6a2bf73cc..713a421ca 100644 --- a/src/storage.c +++ b/src/storage.c @@ -144,28 +144,6 @@ int read_local_name(const bdaddr_t *bdaddr, char *name) return 0; } -int read_local_class(const bdaddr_t *bdaddr, uint8_t *class) -{ - char filename[PATH_MAX + 1], tmp[3], *str; - int i; - - create_filename(filename, PATH_MAX, bdaddr, "config"); - - str = textfile_get(filename, "class"); - if (!str) - return -ENOENT; - - memset(tmp, 0, sizeof(tmp)); - for (i = 0; i < 3; i++) { - memcpy(tmp, str + (i * 2) + 2, 2); - class[2 - i] = (uint8_t) strtol(tmp, NULL, 16); - } - - free(str); - - return 0; -} - int read_remote_appearance(const bdaddr_t *local, const bdaddr_t *peer, uint8_t bdaddr_type, uint16_t *appearance) { diff --git a/src/storage.h b/src/storage.h index 984370468..d150f1546 100644 --- a/src/storage.h +++ b/src/storage.h @@ -27,7 +27,6 @@ int read_discoverable_timeout(const char *src, int *timeout); int read_pairable_timeout(const char *src, int *timeout); int read_on_mode(const char *src, char *mode, int length); int read_local_name(const bdaddr_t *bdaddr, char *name); -int read_local_class(const bdaddr_t *bdaddr, uint8_t *class); int write_remote_appearance(const bdaddr_t *local, const bdaddr_t *peer, uint8_t bdaddr_type, uint16_t appearance); int read_remote_appearance(const bdaddr_t *local, const bdaddr_t *peer, -- 2.47.3