[PATCH] scripts: constify wirte_full input buffer

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

 



Buffer written is read-only, so align prototype with <libfile.h>.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 scripts/common.c | 2 +-
 scripts/common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/common.c b/scripts/common.c
index 2be41615ea9e..0eb263d041a5 100644
--- a/scripts/common.c
+++ b/scripts/common.c
@@ -148,7 +148,7 @@ int read_full(int fd, void *buf, size_t size)
 	return insize;
 }
 
-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;
diff --git a/scripts/common.h b/scripts/common.h
index 820108c52c2d..399729c338f3 100644
--- a/scripts/common.h
+++ b/scripts/common.h
@@ -5,6 +5,6 @@ int read_file_2(const char *filename, size_t *size, void **outbuf, size_t max_si
 void *read_file(const char *filename, size_t *size);
 int write_file(const char *filename, const void *buf, size_t size);
 int read_full(int fd, void *buf, size_t size);
-int write_full(int fd, void *buf, size_t size);
+int write_full(int fd, const void *buf, size_t size);
 
 #endif /* __COMMON_H */
-- 
2.30.2


_______________________________________________
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