[PATCH v2 1/6] libfile: Change write_full to be have const buf

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

 



write() uses a const pointer so write_full should do the same.

Signed-off-by: Markus Pargmann <mpa@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 de4f42dbd19c..dd0b00f98845 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -1,7 +1,7 @@
 #ifndef __LIBFILE_H
 #define __LIBFILE_H
 
-int write_full(int fd, void *buf, size_t size);
+int write_full(int fd, const void *buf, size_t size);
 int read_full(int fd, void *buf, size_t size);
 
 char *read_file_line(const char *fmt, ...);
diff --git a/lib/libfile.c b/lib/libfile.c
index 62e9b8ed2289..cba2f02a23a6 100644
--- a/lib/libfile.c
+++ b/lib/libfile.c
@@ -28,7 +28,7 @@
  * Like write, but guarantees to write the full buffer out, else
  * it returns with an error.
  */
-int write_full(int fd, void *buf, size_t size)
+int write_full(int fd, const void *buf, size_t size)
 {
 	size_t insize = size;
 	int now;
-- 
2.8.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