From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] libfile: Make write_file buffer const
Date: Wed, 31 Jan 2018 08:58:55 +0100 [thread overview]
Message-ID: <20180131075855.32425-1-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2018-01-31 7:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180131075855.32425-1-s.hauer@pengutronix.de \
--to=s.hauer@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