[PATCH BlueZ v2 2/5] Remove create_file calls for read operations

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

 



This patch fixes some read only functions in storage.c removing
create_file function calls.
---
 src/storage.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/storage.c b/src/storage.c
index 8511823..8d3a39d 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -1110,8 +1110,6 @@ int read_device_pairable(bdaddr_t *bdaddr, gboolean *mode)
 
 	create_filename(filename, PATH_MAX, bdaddr, "config");
 
-	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
 	str = textfile_get(filename, "pairable");
 	if (!str)
 		return -ENOENT;
@@ -1238,8 +1236,6 @@ char *read_device_services(const bdaddr_t *sba, const bdaddr_t *dba)
 
 	create_filename(filename, PATH_MAX, sba, "primary");
 
-	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
 	ba2str(dba, addr);
 
 	return textfile_caseget(filename, addr);
@@ -1268,8 +1264,6 @@ char *read_device_characteristics(const bdaddr_t *sba, const bdaddr_t *dba,
 
 	create_filename(filename, PATH_MAX, sba, "characteristic");
 
-	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
 	ba2str(dba, addr);
 
 	snprintf(key, sizeof(key), "%17s#%04X", addr, handle);
@@ -1299,7 +1293,5 @@ int read_device_attributes(const bdaddr_t *sba, textfile_cb func, void *data)
 
 	create_filename(filename, PATH_MAX, sba, "attributes");
 
-	create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
 	return textfile_foreach(filename, func, data);
 }
-- 
1.7.6.1

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