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:
parent
01cbfdfb3f
commit
3d33f178cc
|
@ -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, ...);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue