From: Markus Pargmann <mpa@pengutronix.de>
To: barebox@lists.infradead.org
Cc: mgr@pengutronix.de
Subject: [PATCH v3 1/4] libfile: Change write_full to be have const buf
Date: Wed, 6 Jul 2016 10:19:42 +0200 [thread overview]
Message-ID: <1467793185-3709-2-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1467793185-3709-1-git-send-email-mpa@pengutronix.de>
write() uses a const pointer so write_full should do the same.
Signed-off-by: Markus Pargmann <mpa@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 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-07-06 8:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 8:19 [PATCH v3 0/4] state: Refactor backend Markus Pargmann
2016-07-06 8:19 ` Markus Pargmann [this message]
2016-07-06 8:19 ` [PATCH v3 2/4] state: Refactor state framework Markus Pargmann
2016-07-06 8:19 ` [PATCH v3 3/4] docs: Add/Update state documentation Markus Pargmann
2016-07-06 8:19 ` [PATCH v3 4/4] state: also append backend storage stridesize Markus Pargmann
2016-07-08 7:03 ` [PATCH v3 0/4] state: Refactor backend 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=1467793185-3709-2-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=mgr@pengutronix.de \
/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