mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] libfile: Make write_file buffer const
@ 2018-01-31  7:58 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2018-01-31  7:58 UTC (permalink / raw)
  To: Barebox List

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-31  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  7:58 [PATCH] libfile: Make write_file buffer const Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox