[PATCH] libfile: Make write_file buffer const

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

 



Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 include/libfile.h | 2 +-
 lib/libfile.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libfile.h b/include/libfile.h
index dd0b00f988..eb4311d0bc 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -11,7 +11,7 @@ void *read_file(const char *filename, size_t *size);
 int read_file_2(const char *filename, size_t *size, void **outbuf,
 		loff_t max_size);
 
-int write_file(const char *filename, void *buf, size_t size);
+int write_file(const char *filename, const void *buf, size_t size);
 
 int copy_file(const char *src, const char *dst, int verbose);
 
diff --git a/lib/libfile.c b/lib/libfile.c
index 6b70306dbd..1face96c82 100644
--- a/lib/libfile.c
+++ b/lib/libfile.c
@@ -230,7 +230,7 @@ EXPORT_SYMBOL(read_file);
  *
  * Return: 0 for success or negative error value
  */
-int write_file(const char *filename, void *buf, size_t size)
+int write_file(const char *filename, const void *buf, size_t size)
 {
 	int fd, ret;
 
-- 
2.15.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux