9
0
Fork 0

libfile: Change write_full to be have const buf

write() uses a const pointer so write_full should do the same.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Markus Pargmann 2016-07-06 10:19:42 +02:00 committed by Sascha Hauer
parent 01cbfdfb3f
commit 3d33f178cc
2 changed files with 2 additions and 2 deletions

View File

@ -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, ...);

View File

@ -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;