We can't lseek on files provided by TFTP, so some code copies the file to operate on from TFTP to RAM before continuing. Make this a bit easier by providing some helper code. We now create /tmp/, provide make_temp() to create temporary files and also a single function to create a copy of a file in /tmp/. Changes since v1: - Integrated changes suggested by Stefan Lengfeld Sascha Hauer (8): startup: create /tmp fs: implement is_tftp_fs() libfile: implement make_temp libfile: implement a function to cache a file uimage: fix memory leak in error path uimage: Use is_tftp_fs() and cache_file() to ease TFTP workaround fs/uimagefs: Use is_tftp_fs() and cache_file() to ease TFTP workaround fs: remove now unused function can_lseek_backward() common/startup.c | 1 + common/uimage.c | 49 ++++++++++++++++++++++++------------------------ fs/fs.c | 22 ++++++++++++++++++++++ fs/uimagefs.c | 37 +++++++++++++----------------------- include/fs.h | 22 ++++++---------------- include/image.h | 1 + include/libfile.h | 4 ++++ include/uimagefs.h | 2 +- lib/libfile.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 127 insertions(+), 66 deletions(-) -- 2.15.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox