[PATCH 6/9] storage: Remove not used write_features_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was used in hciops.

---
 src/storage.c |   32 --------------------------------
 src/storage.h |    2 --
 2 files changed, 34 deletions(-)

diff --git a/src/storage.c b/src/storage.c
index 4dc2d17..297aba7 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -435,38 +435,6 @@ done:
 	return 0;
 }
 
-int write_features_info(const bdaddr_t *local, const bdaddr_t *peer,
-				unsigned char *page1, unsigned char *page2)
-{
-	char filename[PATH_MAX + 1], addr[18];
-	char str[] = "0000000000000000 0000000000000000";
-	char *old_value;
-	int i;
-
-	ba2str(peer, addr);
-
-	create_filename(filename, PATH_MAX, local, "features");
-	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
-	old_value = textfile_get(filename, addr);
-
-	if (page1)
-		for (i = 0; i < 8; i++)
-			sprintf(str + (i * 2), "%2.2X", page1[i]);
-	else if (old_value && strlen(old_value) >= 16)
-		strncpy(str, old_value, 16);
-
-	if (page2)
-		for (i = 0; i < 8; i++)
-			sprintf(str + 17 + (i * 2), "%2.2X", page2[i]);
-	else if (old_value && strlen(old_value) >= 33)
-		strncpy(str + 17, old_value + 17, 16);
-
-	free(old_value);
-
-	return textfile_put(filename, addr, str);
-}
-
 static int decode_bytes(const char *str, unsigned char *bytes, size_t len)
 {
 	unsigned int i;
diff --git a/src/storage.h b/src/storage.h
index e19e67f..8293ba8 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 write_features_info(const bdaddr_t *local, const bdaddr_t *peer,
-				unsigned char *page1, unsigned char *page2);
 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,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux