mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] scripts: constify wirte_full input buffer
@ 2022-03-18 14:49 Ahmad Fatoum
  2022-03-28  8:56 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-03-18 14:49 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-28  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 14:49 [PATCH] scripts: constify wirte_full input buffer Ahmad Fatoum
2022-03-28  8:56 ` Sascha Hauer

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