From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] scripts: constify wirte_full input buffer
Date: Fri, 18 Mar 2022 15:49:24 +0100 [thread overview]
Message-ID: <20220318144924.497993-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2022-03-18 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 14:49 Ahmad Fatoum [this message]
2022-03-28 8:56 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318144924.497993-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox