diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-22 11:13:27 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-01-25 08:29:52 +0100 |
commit | e660e511ae29b914cfc47413f5ac1107c2da0693 (patch) | |
tree | 56d3303e0d46d603f585b3c97ba85e36b3826952 /include | |
parent | 94e561b3648a2c921a6c8faa6c79201c78f8ecfe (diff) | |
download | barebox-e660e511ae29b914cfc47413f5ac1107c2da0693.tar.gz barebox-e660e511ae29b914cfc47413f5ac1107c2da0693.tar.xz |
libfile: implement a function to cache a file
Due to the nature of TFTP which can't lseek and due to the silliness
of our filesystem implementation which can't cache accesses we have to
manually cache files on TFTP filesystems sometimes. Make it easier
for them by providing a cache_file() function which copies the file
from TFTP to RAM.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/libfile.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libfile.h b/include/libfile.h index 6dbb81a241..beec7cff79 100644 --- a/include/libfile.h +++ b/include/libfile.h @@ -28,4 +28,6 @@ int unlink_recursive(const char *path, char **failedpath); char *make_temp(const char *template); +int cache_file(const char *path, char **newpath); + #endif /* __LIBFILE_H */ |