summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2018-06-01 20:07:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-08 09:10:07 +0200
commitfd3ecff9ec5e45bf66d27da979c58bf23cd307da (patch)
treec5733a0b1388bebdf14fd679c3edc5f0c37032ed /include
parentbf8b6d46db9274c364947a22163b16e05f74211c (diff)
downloadbarebox-fd3ecff9ec5e45bf66d27da979c58bf23cd307da.tar.gz
libfile: implement new helper write_file_flash()
Compared to write_file() this new function also calls erase() to be suitable for flash devices. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/libfile.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libfile.h b/include/libfile.h
index fd2fadeaa8..2c5eef71f1 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -12,6 +12,7 @@ int read_file_2(const char *filename, size_t *size, void **outbuf,
loff_t max_size);
int write_file(const char *filename, const void *buf, size_t size);
+int write_file_flash(const char *filename, const void *buf, size_t size);
int copy_file(const char *src, const char *dst, int verbose);