[PATCH BlueZ v3 14/18] storage: Rename primary file to primaries

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

From: Claudio Takahasi <claudio.takahasi@xxxxxxxxxxxxx>

This patch renames the "primary" file to "primaries" to be more suitable
with its content.
---
 src/adapter.c |    6 +++---
 src/storage.c |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index a7e9e77..1e0ed36 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1940,7 +1940,7 @@ static GSList *string_to_primary_list(char *str)
 	return l;
 }
 
-static void create_stored_device_from_primary(char *key, char *value,
+static void create_stored_device_from_primaries(char *key, char *value,
 							void *user_data)
 {
 	struct btd_adapter *adapter = user_data;
@@ -1999,8 +1999,8 @@ static void load_devices(struct btd_adapter *adapter)
 	textfile_foreach(filename, create_stored_device_from_profiles,
 								adapter);
 
-	create_name(filename, PATH_MAX, STORAGEDIR, srcaddr, "primary");
-	textfile_foreach(filename, create_stored_device_from_primary,
+	create_name(filename, PATH_MAX, STORAGEDIR, srcaddr, "primaries");
+	textfile_foreach(filename, create_stored_device_from_primaries,
 								adapter);
 
 	create_name(filename, PATH_MAX, STORAGEDIR, srcaddr, "linkkeys");
diff --git a/src/storage.c b/src/storage.c
index 8693552..33dcace 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -1186,7 +1186,7 @@ int write_device_services(const bdaddr_t *sba, const bdaddr_t *dba,
 {
 	char filename[PATH_MAX + 1], key[20];
 
-	create_filename(filename, PATH_MAX, sba, "primary");
+	create_filename(filename, PATH_MAX, sba, "primaries");
 
 	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
@@ -1248,7 +1248,7 @@ int delete_device_service(const bdaddr_t *sba, const bdaddr_t *dba,
 	create_filename(filename, PATH_MAX, sba, "ccc");
 	delete_by_pattern(filename, key);
 
-	create_filename(filename, PATH_MAX, sba, "primary");
+	create_filename(filename, PATH_MAX, sba, "primaries");
 
 	return textfile_del(filename, key);
 }
@@ -1258,7 +1258,7 @@ char *read_device_services(const bdaddr_t *sba, const bdaddr_t *dba,
 {
 	char filename[PATH_MAX + 1], key[20];
 
-	create_filename(filename, PATH_MAX, sba, "primary");
+	create_filename(filename, PATH_MAX, sba, "primaries");
 
 	ba2str(dba, key);
 	sprintf(&key[17], "#%hhu", bdaddr_type);
-- 
1.7.7.6

--
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


[Bluez Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Bluez Devel]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]

Add to Google Powered by Linux